--
>>>>>>>>>> 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.
Hi Simon,
This documentation section explains this in more detail: http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/scala/stream-rate.html
Btw, Sink.head actually does not request more than one, however this is not transitive and cannot be. Grouped cannot possibly know how many elements a downstream ever needs, so it tries to prefetch and exploit concurrency.
You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/m4V-AsScuak/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.
On 11/12/2015 06:57 PM, Endre Varga wrote:
Ok, I didn't come to that point of the documentation so far. I'm going to have a look, thanks!Hi Simon,
This documentation section explains this in more detail: http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/scala/stream-rate.html
Why not? Doesn't it have to wait for a demand as all other components have to do too? I mean Sink.head has a demand of 1, shouldn't grouped get this demand and then forward a demand of 1*N, where N is the argument to grouped?
Btw, Sink.head actually does not request more than one, however this is not transitive and cannot be. Grouped cannot possibly know how many elements a downstream ever needs, so it tries to prefetch and exploit concurrency.
On Thu, Nov 12, 2015 at 7:09 PM, Simon Schäfer <ma...@antoras.de> wrote:
On 11/12/2015 06:57 PM, Endre Varga wrote:
Ok, I didn't come to that point of the documentation so far. I'm going to have a look, thanks!Hi Simon,
This documentation section explains this in more detail: http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0-M1/scala/stream-rate.html
Why not? Doesn't it have to wait for a demand as all other components have to do too? I mean Sink.head has a demand of 1, shouldn't grouped get this demand and then forward a demand of 1*N, where N is the argument to grouped?
Btw, Sink.head actually does not request more than one, however this is not transitive and cannot be. Grouped cannot possibly know how many elements a downstream ever needs, so it tries to prefetch and exploit concurrency.
No, demand is not forwarded, that does not work in general, especially in the face of graph enabled stages (how would merge work?). Demand is strictly local to a connection. If grouped gets a demand of 1, then it knows that it can only emit one, but that does not dictate how much it tries to get from upstream. What if the sink is not a Sink.head but a network transport that signals demand one-by-one once the bytes are written to the network? In this case grouped would better off aggregating elements in the background. Just because a stage demanded 1, it does not mean it will not demand later more.