All right then, except I'm under the impression that to use that pattern we
need to create an application using the `spray.routing.HttpService` class,
and I could not find it in akka-http. Is it available under a different
name?
Thanks,
++nic
On Monday, June 15, 2015 at 3:51:27 PM UTC-3, Richard Bradley wrote:
>
> The situation is very much the same in Akka HTTP as it was in Spray 1.3.
> You should be able to translate the actor-per-request pattern into Akka
> with only superficial changes.
> If you didn't deal with large (streamed / chunked) requests, everything is
> very much the same from Routing on down.
>
> As to which is recommended -- I think that is much the same as well:
>
> Actor-per-request needs more book-keeping (to avoid leaks) but allows
> greater control in complex scenarios.
>
> Future calls (which can include "asks" on Actors) are simpler and usually
> more type-safe and easier to work with IMO. You need to be very careful
> around mutable state though.
>
> HTH,
>
>
> Rich
>
>
> On Monday, June 15, 2015 at 4:50:54 AM UTC+1, Nicolau Werneck wrote:
>>
>> From what I gathered from the documentation and examples, the usual way
>> to answer to a request asynchronously in Spray and akka-http is to
>> `complete` with a `Future`, which may be produced from asking an actor. But
>> in Spray there was also the so-called "actor per-request" pattern,
>> documented in
>> http://techblog.net-a-porter.com/2013/12/ask-tell-and-per-request-actors/
>>
>> Is that still possible to do with akka-http? And is it discouraged in
>> general? Should we really stick to using Futures to integrate akka-http to
>> the rest of our applications?
>>
>> ++nic
>>
>>
--
>>>>>>>>>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.