Hi Benoit,

you can use Flow.onComplete(…) to execute “system.shutdown()” after the stream 
finishes processing, just like you would do it for a Future-based application. 
Concerning akka-stream I’ll hopefully get around to that once I’m through that 
whole pile of email ;-)

Regards,

Roland

5 jun 2014 kl. 15:07 skrev benq <[email protected]>:

>  Hi Roland,
> 
> Thank you for your answer. 0.3 looks really exiting. Any timeline for 0.3?
> 
> Regarding ActorSystem shutdown:
> When writing an akka actor based application, you have to explicitly shutdown 
> the ActorSystem in your main thread once everything is done. 
> There is not always an easy way to know when to do that (but a few good 
> article like 
> http://letitcrash.com/post/30165507578/shutdown-patterns-in-akka-2 ).
> 
> With akka-stream, actors are hidden below a new layer of abstraction. As 
> stated above, it will be possible to mix Future and akka-stream in 0.3.
> It seems to me that knowing when your application has finished and when to 
> call ActorSystem.Shutdown may become really difficult with a mix of 
> akka-stream and Future.
> My question was about recommendation / information or best practices 
> regarding how to know when to shutdown the ActorSystem.
> 
> Am I clearer? Do I miss something obvious?
> 
> Benoît
> 
> Le mardi 3 juin 2014 07:11:05 UTC+2, rkuhn a écrit :
> Hi Benoit,
> 
> in the upcoming 0.3 release there is a .mapFuture combinator that lets you 
> transform elements asynchronously.
> 
> Concerning the ActorSystem shutdown I do not understand your question, can 
> you rephrase?
> 
> Regards,
> 
> Roland
> 
> 27 maj 2014 kl. 21:27 skrev benq <[email protected]>:
> 
>> Hi,
>> 
>> How should Future be handled in akka-stream? 
>> For example, if one step of a Flow is an http request, when and where should 
>> the ActorSystem be shutdown?
>> 
>> benq
>> 
>> -- 
>> >>>>>>>>>> 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.
> 
> 
> 
> Dr. Roland Kuhn
> Akka Tech Lead
> Typesafe – Reactive apps on the JVM.
> twitter: @rolandkuhn
> 
> 
> 
> -- 
> >>>>>>>>>> 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.



Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Reactive apps on the JVM.
twitter: @rolandkuhn


-- 
>>>>>>>>>>      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.

Reply via email to