Special Subject used for controlled lossless backpressure in RxJS.
Is your feature request related to a problem? Please describe.
Currently, there's no official solution in RxJS to deal with Generators, Iterators, Node.js streams, and other pull-based systems in a controlled way.
https://github.com/ReactiveX/RxJS/issues/71
Describe the solution you'd like
I'd like a native solution to deal with pull-based systems instead of relying on IxJS.
WebSocketSubject.Describe alternatives you've considered
I wrote an article about my solutions here:
https://itnext.io/lossless-backpressure-in-rxjs-b6de30a1b6d4
I created functional wrappers around a Node.js transform stream and a Generator to allow a 2-push system to simulate a pull system.
Example implementations:
Iterator - https://gist.github.com/Sawtaytoes/7b6bf968510fe88df3ec98846a641779
Node.js Stream - https://gist.github.com/Sawtaytoes/4896e9ae6091392bebfc6ba027e27bd0
These examples aren't in TypeScript and don't follow the class extension pattern in RxJS's codebase, but they reveal the same API that's used by WebSocketSubject. From a practical standpoint, they could be used as temporary measures until official implementations are written.
(If this is new operator request) describe reason it should be core operator
There's absolutely no reason another library needs to be used to handle what RxJS should be able to do with its existing tooling.
Wow, just read your article. Looks really tiny and promising, I gonna try it soon
As this issue was not touched until several months now I suggest to close it.
@benlesh please give feedback on how we should proceed
Good to have some "official statement" on Backpressure in RxJS to understand the direction.
There are many upvotes.
Most helpful comment
Good to have some "official statement" on Backpressure in RxJS to understand the direction.