Re: [akka-user] [akka-stream] how to control the throughput of a certain flow

2015-11-18 Thread Jim Hazen
Might want to look into mapAsync and mapAsyncUnordered for the linear parts of 
your slow graph. You can specify the desired parallelism as part of those calls.

I was about to write that in general there isn't a "make fast" button for 
arbitrary graphs. However, that may not be strictly true. Just as there are SQL 
planners, there could be a materialization planner that applied some well 
understood optimization patterns under the hood. Even could have the ability to 
self tune the thread polling and throughput levels of a running flow based upon 
realtime metrics. 

-- 
>>  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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] [akka-stream] how to control the throughput of a certain flow

2015-11-18 Thread Leon Ma
Just read it, to be more specific, if I want to enlarge the capacity of a 
certain flow, I can do like this:

http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/scala/stream-cookbook.html#cookbook-balance-scala

i.e.: using Balance/Merge to get a composite flow from original flow.

Correct me if I'm wrong

Thanks
Leon


在 2015年11月16日星期一 UTC-8上午6:19:30,Patrik Nordwall写道:
>
> The Pipelining and Parallelism 
> 
>  
> chapter in the documentation is a good read.
> Regards,
> Patrik
>
> On Wed, Nov 11, 2015 at 4:13 AM, Leon Ma  
> wrote:
>
>> Hi, 
>>
>> Assuming I have below flows:
>>
>> Source(..).via(flow1).via(flow2).via(flow3).to(...)
>>
>>
>> questions:
>> 1. how many actors will be created when run this flow? 1 actor for 1 flow?
>> 2. if I found that flow2 is slower than others (bottle neck), Can I 
>> enlarge capacity for it? for example, use some router to have more actors 
>> to handle in elements.
>> 3. Is there any smart policy we can choose to let the stream dynamically 
>> assign bandwidth to each flow according to their performance?
>>
>>
>> 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 akka-user+...@googlegroups.com .
>> To post to this group, send email to akka...@googlegroups.com 
>> .
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Typesafe  -  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] [akka-stream] how to control the throughput of a certain flow

2015-11-18 Thread Endre Varga
What you need is in progress: https://github.com/akka/akka/pull/18887

-Endre

On Wed, Nov 18, 2015 at 11:17 AM, Leon Ma  wrote:

> Just read it, to be more specific, if I want to enlarge the capacity of a
> certain flow, I can do like this:
>
>
> http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/scala/stream-cookbook.html#cookbook-balance-scala
>
> i.e.: using Balance/Merge to get a composite flow from original flow.
>
> Correct me if I'm wrong
>
> Thanks
> Leon
>
>
> 在 2015年11月16日星期一 UTC-8上午6:19:30,Patrik Nordwall写道:
>>
>> The Pipelining and Parallelism
>> 
>> chapter in the documentation is a good read.
>> Regards,
>> Patrik
>>
>> On Wed, Nov 11, 2015 at 4:13 AM, Leon Ma  wrote:
>>
>>> Hi,
>>>
>>> Assuming I have below flows:
>>>
>>> Source(..).via(flow1).via(flow2).via(flow3).to(...)
>>>
>>>
>>> questions:
>>> 1. how many actors will be created when run this flow? 1 actor for 1
>>> flow?
>>> 2. if I found that flow2 is slower than others (bottle neck), Can I
>>> enlarge capacity for it? for example, use some router to have more actors
>>> to handle in elements.
>>> 3. Is there any smart policy we can choose to let the stream dynamically
>>> assign bandwidth to each flow according to their performance?
>>>
>>>
>>> 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 akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Typesafe  -  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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] [akka-stream] how to control the throughput of a certain flow

2015-11-16 Thread Patrik Nordwall
The Pipelining and Parallelism

chapter in the documentation is a good read.
Regards,
Patrik

On Wed, Nov 11, 2015 at 4:13 AM, Leon Ma  wrote:

> Hi,
>
> Assuming I have below flows:
>
> Source(..).via(flow1).via(flow2).via(flow3).to(...)
>
>
> questions:
> 1. how many actors will be created when run this flow? 1 actor for 1 flow?
> 2. if I found that flow2 is slower than others (bottle neck), Can I
> enlarge capacity for it? for example, use some router to have more actors
> to handle in elements.
> 3. Is there any smart policy we can choose to let the stream dynamically
> assign bandwidth to each flow according to their performance?
>
>
> 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 akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe  -  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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] [akka-stream] how to control the throughput of a certain flow

2015-11-10 Thread Leon Ma
Hi, 

Assuming I have below flows:

Source(..).via(flow1).via(flow2).via(flow3).to(...)


questions:
1. how many actors will be created when run this flow? 1 actor for 1 flow?
2. if I found that flow2 is slower than others (bottle neck), Can I enlarge 
capacity for it? for example, use some router to have more actors to handle 
in elements.
3. Is there any smart policy we can choose to let the stream dynamically 
assign bandwidth to each flow according to their performance?


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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.