4 ms·
Reactive Streams
- noname123 12y agoThanks for posting the manifesto. Can anyone who is a guru in distributed computing explain to me how Reactive Streams is different from regular message queue architecture such as RPC or pub-sub with message header filtering (e.g., RabbitMQ, zmq)? Much appreciated.
- lomnakkus 12y agoNot really a guru, but RPC is traditionally not thought of a message queue architecture -- it's almost always built around a request-reply cycle with no queueing. Reactive Streams seems to really boil down to a push-based (Functional?) Reactive Programming (with some queueing added in in the distributed case). As Erik Meijer explains[1], it's mostly about a small extension to the "Observer" pattern which comes about if you dualize the "Iterator" pattern properly. EDIT: In short, there's very little really new under the sun here in CS terms, but this approach seems to be going through a hype cycle at the moment. [1] https://www.youtube.com/watch?v=looJcaeboBY https://www.youtube.com/watch?v=looJcaeboBY (I'm sure you can find other explanations, but I like Erik's.)
- noname123 12y agoThanks for clarifying RPC's specific socket-level implementation details and how Reactive Stream relates to the Observer/Iterator pattern. Tbh, I tried to use Akka and RxJava for a bit but found it to be a bit cumbersome and ended up implementing pub-sub by way of ZeroMQ and Google Protobuf. I suppose I won't be able to leverage features such as composability and filtering on the message stream though. But I didn't like how the Reactor pattern implementation was a black box where I didn't know what was going on under the hood. Wish the best of luck to both teams however.
- tegeek 12y agoIMO 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.
- rakoo 12y agoMy guess: this about having the benefits of third-party queue architectures directly in the JVM. I believe Java shops are only comfortable with Java-everywhere, so it's much more interesting for them to have it without depending on other tools.