Promistreams are now officially in beta! (Which mostly just means I have added a little infobox at the top of the page
)
https://wiki.slightly.tech/books/projects/page/what-are-promistreams
Basically, they're streams for #JavaScript that are actually nice to work with, have first-class Promise support, handle errors correctly, handle concurrency reliably, interoperate with other stream implementations, and just generally make more sense than Node streams.
You can use them for streaming data, but also for things like task queues or distribution patterns. They can work in any JS environment, and are not limited to Node.js. More documentation will become available soon (especially for more complex cases), but the basic stuff is already explained at the link.
Please give them a try and let me know how it went, and whether you ran into any issues!
@raito So Promistreams are agnostic to the values that go through them; you totally could use them to design some sort of streaming component system (by streaming through component-shaped objects), but Promistreams *themselves* do not do anything with components, and it wouldn't be directly in scope.
Someone actually compared Promistreams to Rx.js earlier today, in concept, so you're probably not far off with your idea :)
(There *is* a plan to write an Rx.js adapter stream which can convert between Rx.js and Promistreams bidirectionally, so if such a component system already exists based on Rx.js, then Promistreams could plausibly interoperate with it)
@raito No conditions whatsoever, including and up to supporting `null` values, as there is no serialization step involved anywhere (unless you add a serialization stream, of course).
You represent the processing steps as a linear(-ish) Promistream pipeline in your code, but behind the scenes that essentially gets converted into a long chain of Promise handlers, so anything that can go in a Promise (which is everything) can go into a Promistream too :)
@joepie91 Is there any conditions on the values that go through the Promistreams?
I assume they need to be at least serializable right?