3 ms·
IMO at very high level both a pub-sub and stream based system is the same thing. Both are event driven. But it differs at implementation level. A pub-sub is di
by tegeek 12y ago
IMO at very high level both a pub-sub and stream based system is the same thing. Both are event driven.
But it differs at implementation level. A pub-sub is discrete, not composable and time (or latency or whatever you call it) is captured indirectly through state.
While a Stream is continuous, composable, transformable and time is the first class citizen.
For example look at the Dart's Streams (https://www.dartlang.org/docs/tutorials/streams/ https://www.dartlang.org/docs/tutorials/streams/) and NodeJS's IO. Both are event-driven but differs in how you program.
Reactive Streams eliminate the callbacks (or event handlers) from async code and can be combined with other streams.
- noname123 12y agoThank you for your reply and links to Dart and NodeJS examples. Much appreciated.