cujojs / most

Ultra-high performance reactive programming
MIT License
3.49k stars 231 forks source link

good for dataflow graphs? #546

Closed hp8wvvvgnj6asjm7 closed 3 years ago

hp8wvvvgnj6asjm7 commented 3 years ago

hi, I just came here from a medium article on ramda. Is this library capable of stream merging and splitting?

briancavalier commented 3 years ago

Hi @hp8wvvvgnj6asjm7. Yes 😄

If possible, please use the newer @mostjs/core, e.g. npm install --save @most/core, as the cujojs/most repo is older and in maintenance mode. It is a newer implementation of the same ideas in cujojs/most. You can find the docs here: https://mostcore.readthedocs.io/en/latest/

For merging, see the api docs for merge operations. For splitting, you can use multicast to allow a stream to be consumed by multiple consumers.

One caveat is that if you need "back pressure", aka flow control, then you may want to look into other options. Both @most/core and cujojs/most are intended to deal with events as they happen.

I hope that helps.

I'll close this issue, but please feel free to continue the discussion if you need.