Thank you so much for your detailed answers, I'll try to look into it deeper :)
Leon 在 2014年11月28日星期五UTC-8上午2时10分36秒,Patrik Nordwall写道: > > > > On Thu, Nov 27, 2014 at 10:44 AM, Leon Ma <[email protected] <javascript:> > > wrote: > >> Hi, Konrad >> >> I have some common questions regarding akka stream. >> Say I want to build an async pipeline with akka steam to handle online >> http request. (which means response time is prior to throughput) >> >> Questions: >> >> 1. 1 pipeline for all OR 1 pipeline per request? (assuming the behavior >> for all requests are similar) Is it expensive to create a pipeline per >> request? >> > > It is supposed to be fast, but we have not optimized much so far. > You can define a blueprint of the pipeline as a Flow[InputType, > OutputType] and then you can materialize (run) that many times. > > >> >> 2. Could the elements sequence be guaranteed when going thru the pipe? >> > > A stream is normally ordered, but you can have operations that might > re-order elements. For example mapAsyncUnordered or Balance followed Merge. > > >> >> 3. Any monitoring available so I can know which handler/processor is the >> bottle neck of the pipe? >> > > Nothing special for Akka Streams, apart from the `timed` utility in the > akka.stream.extra package. > A Java profiler will probably also be useful. > > >> >> 4. If stepN is much slower than other step, it will affect stepN-1 to >> step1 via back pressure right?, >> > yes > > >> how can I enlarge the capacity of stepN? >> > > Some options > - break it up in smaller steps > - use mapAsync > - use Balance + Merge, but then order of the elements are not preserved > > /Patrik > > > >> >> >> Thanks >> Leon >> >> >> >> >> >> >> >> 在 2014年11月17日星期一UTC-8上午5时22分47秒,Konrad Malawski写道: >>> >>> Hi Leon, >>> akka-streams is *exactly* an "async pipeline for data processing" :-) >>> As it's currently "pre experimental" we do not yet provide comprehensive >>> docs - this should change in a matter of weeks though. >>> If you want to get hakking on it ASAP, the best documentation is API >>> comments and our tests in: https://github.com/akka/ >>> akka/tree/release-2.3-dev/akka-stream-tests/src/test/ >>> scala/akka/stream/scaladsl >>> >>> Happy hakking and please look forward to our 1.0 release which is coming >>> "soon" (then, with docs!). >>> >>> On Mon, Nov 17, 2014 at 10:10 AM, Leon Ma <[email protected]> wrote: >>> >>>> Hi, >>>> >>>> I'm wondering if akka-stream is a good candidate for creating an async >>>> pipeline for data processing. >>>> >>>> Take http request as example, I'd like the request go thru a series of >>>> pipeline handlers 1 by 1 asynchronously and finally get a response. >>>> >>>> More over, I'd like to see it's capable to jump from 1 handler to >>>> another conditionally. >>>> >>>> If it's applicable , any document or sample code I can start with? >>>> >>>> >>>> Thanks >>>> >>>> Leon >>>> >>>> >>>> >>>> >>>> -- >>>> >>>>>>>>>> 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. >>>> >>> >>> >>> >>> -- >>> Cheers, >>> Konrad 'ktoso' Malawski >>> hAkker @ Typesafe >>> >>> >>> -- >> >>>>>>>>>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/akka-user. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > > Patrik Nordwall > Typesafe <http://typesafe.com/> - Reactive apps on the JVM > Twitter: @patriknw > > -- >>>>>>>>>> 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.
