Open JamesRamm opened 2 years ago
Have I lost backpressure?
Most likely. flyd is push. Readable is pull. Implementing backpressure in push world requires some careful actions. You need to pass signals back by the pipe which is against push idea.
If you want something nice and simple like flyd but for data consuming, I think your first stop would be callbags. I think they have backpressure implemented as a specific operator and you can implement your own, bc callbag has API to signal back.
The bigger alternatives are most.js and Highland (both not being actively developed).
Hi I am looking at making a little utility for creating a stream from a nodeJS
readable stream
, this will bring all the nice monadic interfaces of flyd (usingmap
,chain
etc is much simpler and clearer than writing transform streams...).I am thinking of something like this:
Do you forsee any issues with this? Have I lost backpressure? Any ideas on how to handle errors?