Hi Ivan,

The code you posted there looks completely reasonable to me. The question
is usually wether you want to chain somehting directly "flow.op1.op2" or
use separate flows for groups of steps "flow.via(ops1).via(ops2)". The
decision between the two is usually guided by how much reuse you expect, or
how complex your final pipeline looks like. If you intend to reuse parts
(retrieveUserDataFlow) or just to modularize a complex pipeline then it is
recommended to build reusable Flows and then build the final graph from
them. There is not much else to say here, the issue is the same wether you
want to have one class or made it built from smaller classes.

A small thing, if you use "flow.mapAsync(http.singleRequest(...))" then you
will get an element back not a future of an element as mapAsync flattens
the future in the background (waits on its result).

-Endre

On Tue, Jun 7, 2016 at 11:10 AM, Ivan Morozov <ivan.moro...@kreditech.com>
wrote:

> Hi @ all
>
> This question is a duplication of this
> http://stackoverflow.com/questions/37659421/what-is-the-best-way-to-combine-akka-http-flow-in-a-scala-stream-flow
> stack overflow questions. I would like to speak about best practices to
> combine akka-stream and akka-http flows.
>
> Ivan
>
> --
> >>>>>>>>>> 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.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

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