On Fri, Oct 21, 2016 at 10:32 AM, Richard Rodseth <rrods...@gmail.com>
wrote:

> I've had no problems using Futures within actors and piping the result to
> the actor, after mapping. I have had problems when an actor gets flooded
> and you get timeouts because you're simply starting up too many Futures.
> That, I think, is where back-pressure changes the landscape.
>

Ah -- okay, that's not the *traditional* problem with using ask() within
Actors (which, as you say, is somewhat about closing over state, although
it's even more about allowing code to access the Actor's state outside of
receive), but I can see how it could become an issue.

> Isn't your comment about "messes up the pseudo-single-threading invariant
of Actors" more about not closing over mutable state? In any case, you
can't avoid Futures if you're using Slick or HTTP clients, for example.

Correct, but you can corral those Futures to make them less risky -- that's
what Requester does.  (At least in Plain Old Akka Actors -- like I said, I
haven't done enough with streams to know how they would interact in that
environment.)

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to