You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I have recently found Pykka and really enjoy playing with it. During my Pykka sessions the following issue emerged:
My application has a RootActor, ManagerActor and EventActor. I need to get a list of information about events, therefore i need to ask each event for its info. The request for the list of information comes from a web api, therefore the result must be returned immediately (or a future). My current solution is as follows:
But because of the nested asks the type of f is Future[Future[Future[List]]]. I somehow need to get rid of the nested Future.
I could maybe not ask the EventActors, but tell them to send their result back to ManagerActor and he would somehow collect the results, send them back to RootActor, but how would he fill them in the future he has no clue about (hidden somewhere in ask() implementation)?
How would you recommend to solve this?
Thanks for help!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have recently found Pykka and really enjoy playing with it. During my Pykka sessions the following issue emerged:
My application has a RootActor, ManagerActor and EventActor. I need to get a list of information about events, therefore i need to ask each event for its info. The request for the list of information comes from a web api, therefore the result must be returned immediately (or a future). My current solution is as follows:
But because of the nested
asksthe type offisFuture[Future[Future[List]]]. I somehow need to get rid of the nestedFuture.I could maybe not
askthe EventActors, buttellthem to send their result back toManagerActorand he would somehow collect the results, send them back to RootActor, but how would he fill them in the future he has no clue about (hidden somewhere inask()implementation)?How would you recommend to solve this?
Thanks for help!
Beta Was this translation helpful? Give feedback.
All reactions