Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Reactive Streams (reactive-streams.org)
21 points by dlo on June 4, 2014 | hide | past | favorite | 6 comments


Thanks 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.


Not 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 (I'm sure you can find other explanations, but I like Erik's.)


Thanks 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.


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/) 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.


Thank you for your reply and links to Dart and NodeJS examples. Much appreciated.


My 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: