3 ms·
I'm curious which features highland provides which RxJS doesn't. From what I understand, composable streams from any data source with backpressure support is pr
by eplawless 13y ago
I'm curious which features highland provides which RxJS doesn't. From what I understand, composable streams from any data source with backpressure support is pretty much the definition of Rx.
Sometimes simplicity is a feature, too, though.
- caolanmcmahon 13y agoRx doesn't handle back-pressure or laziness, so it's for only really for handling events.
- platz 13y agosince `fastSource.map(slowThing)` automatically pauses the source while the slow thing is processing, how is this different from iteration? It also states that in the case of a non-pausable source it will buffer the data. How does it know when to pause vs when to buffer. Is there some way to know what kind of source you've got, or are the the sources constructed in a way that chooses which behavior you get?
- caolanmcmahon 13y agoRxJS advocates are unhappy with this comment so I'm going to qualify it a little. Apologies for any misunderstanding... Rx doesn't handle automatic back-pressure (like Node Streams) but does have mechanisms to avoid overwhelming slow consumers. Rx also has delayed subscription which you can call lazy, but not by turning the stream into a pull-stream (allowing you to sequence actions in the way Highland does). If any of the above needs further qualification or comment please weigh in on the issue by commenting here... but for now I'll leave it at that. I actually list RxJS in the blogpost because it's a good example!
- mattpodwysocki 13y agoComing in 2.3, we will have full capabilities for backpressure. We already have window/buffer/throttle, etc. But, I think it's naive to have only one style of backpressure because many are valid. Just an example of RxJS, and what can be done, which includes a style in which you can do several forms of backpressure, and yes, push to pull based models: https://gist.github.com/mattpodwysocki/9010149 https://gist.github.com/mattpodwysocki/9010149 Still fleshing it out, but pretty close to calling it complete: https://github.com/Reactive-Extensions/RxJS/tree/master/src/core/backpressure https://github.com/Reactive-Extensions/RxJS/tree/master/src/... We're more than open to pull requests though if anyone thinks we're missing something here.