Have you seen the patch I landed for promise streams?
I’m adding forEach, map, reduce, and buffer to Q. They all accept an optional "maxInFlight" and "notify(inFlight, maxInFlight)" arguments. So they support back-pressure and throttling.
They are built on top of the new ES6 iterator protocol and promise queues. The promise queue is a convenient asynchronous transport for iterations, but the input of any of these arguments can be an array or any duck-iterator (implements "next") or duck-iterable (implements "iterator"). The output is consistently a promise queue for iterations.
The trick is that the iterator protocol has good ways to model "next value", "next value for key", "end of stream", and "exception thrown".
They are very experimental and I would love to have feedback.
Kris Kowal