Closed Raynos closed 11 years ago
Backpressure is just one flavor of IO coordination and very specific to input types node works with. It's also not relevant for other types of inputs like user events, recommending back-pressure would be fullish, since there is no solution that is not an app specific. For inputs that are already present is also foolish since queuing such inputs is as effective, but does not implies complexity.
@Gozala What I really want is for input and output to be able to apply back pressure
stream(map(req, ...)).pipe(res)
So I guess this should just be opinionated in stream-reduce I guess. Might aswell make it more generic.
stream-reduce
can handle it properly similar to how fs-reduce
does it. Inputs that don't have notion of backpressure will be just queued.
That way everyone that writes new reducers can comply with it.
That way stream-reduce can convert between node's Stream backpressure protocol and the reducers one.