kefirjs / kefir

A Reactive Programming library for JavaScript
https://kefirjs.github.io/kefir/
MIT License
1.87k stars 97 forks source link

Backpressure #115

Closed timoxley closed 5 years ago

timoxley commented 9 years ago

Would be great if kefir streams could exhibit backpressure. Any plans to implement?

godDLL commented 9 years ago

A way to deal with a backlog of unconsumed events in a stream? When the subscriber is lagging, or whatever?

Or specifically Backpressure?

rpominov commented 9 years ago

I'm also not sure what we can do in this direction.

As I understand, backpressure is a way for consumer to communicate with the source and control it's rate of events somehow. We currently don't have any such channel of communication from consumers to source, except consumers can unsubscribe, and if all consumers do that, the source will know.

Two things to note here:

timoxley commented 9 years ago

When the subscriber is lagging

Correct.

backpressure is a way for consumer to communicate with the source and control it's rate of events somehow

Correct

In Kefir one source can have multiple consumers.

This does complicate things.

mAAdhaTTah commented 5 years ago

I don't think we're going to be able to implement backpressure in Kefir, so I'm going to close this. I might suggest something like Highland.js if you need that feature.