Thanks for you response it help

But I think that ZipWith doesn't work in my case because I don't know the 
number of element to zip by advance in the sample on the docs it's clear 
that you build the flow with 3 elements by the start then with ZipWith you 
can make your comparison.
But in my case it can be variable I give a sample in our domain:

We're an exchange Ad platform :
I get a request from a mobile device. The system are going to make n http 
request to other tier get back the response 
When I get the response I need to handle how to choose 1 response into n 
response. 
So Is ZipWith fit these case if yes how because As I see the sample I need 
to know the number of input by advance

For the loop in stream I totally agree that's an anti-pattern for stream as 
you can easily deadlock the stream.
Thus I don't have a solution can I my a step in the flow that get a list of 
http request and make all the stuff by myself without any usage of 
akka-stream

Thanks for your patience



On Monday, January 25, 2016 at 11:29:38 AM UTC+2, drewhk wrote:
>
> HI Richard,
>
>
>
> On Sun, Jan 24, 2016 at 3:01 PM, Richard Grossman <rich...@gmail.com 
> <javascript:>> wrote:
>
>> Hi
>>
>> Your response is crucial because I try to check if Akka stream can fit 
>> our application.
>> We can't just think about a linear flow of event where there is only 
>> transformation from object1 to object2
>> *We've to make some job of Group of object from the flow. *
>>
>> For example we need to compare response between them, 
>> For example I've a flow there is 10 objects. 
>> I run some process on them in the flow I get 10 new object (ok)
>> But at a certain time I need to compare some value from these 10 new 
>> objects.
>>
>
> I am not sure I understand your use case here, but this looks like a use 
> case for ZipWith? 
>  
>
>> You tell me that it's not recommended to use Akka-Stream in these cases ?
>>
>
> I don't really understand your use case unfortunately. In general, streams 
> can express all sorts of cycles. These are tricky however to make work 
> safely, but this is not an issue of Akka Streams but *an issue of bounded 
> processing itself*. I didn't say cycles are not possible, but I usually 
> push people to solve their problems without cycles, as it is possible in 
> many cases, and only use cycles when you really need them. See 
> http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0.2/scala/stream-graphs.html#graph-cycles-liveness-and-deadlocks
>  
> for details.
>
> -Endre
>  
>
>>
>> On Friday, January 22, 2016 at 12:00:29 PM UTC+2, Akka Team wrote:
>>>
>>> Hi Richard,
>>>
>>> This looks like a retry-chain of some sorts. You can probably model this 
>>> as Futures chained together with fallbackTo. Loops in streams are tricky 
>>> and many times there are alternatives. If your use-case works with futures 
>>> then maybe that is the way to go, and integrate it with your stream if 
>>> necessary with a mapAsync.
>>>
>>> -Endre
>>>
>>> On Thu, Jan 21, 2016 at 11:11 AM, Richard Grossman <rich...@gmail.com> 
>>> wrote:
>>>
>>>> Hi
>>>>
>>>> I need to figure out a looping flow. 
>>>> 1/ I get a list of request each request is an http call.
>>>> 2/ I make the http call get a result back 
>>>> 3/ If I get a valid response  I need to break the flow not continuing 
>>>> to loop on the rest of the request in the sequence
>>>>
>>>> *The http call have to be serial I can't balance or broadcast all the 
>>>> requests and check for responses.*
>>>>
>>>> I think that the graph is not complicated 
>>>> Please help
>>>>
>>>> Thanks
>>>>
>>>> -- 
>>>> >>>>>>>>>> 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+...@googlegroups.com.
>>>> To post to this group, send email to akka...@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+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

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