Memo: Reactive Streams and Project Reactor

Reactive Streams

http://www.reactive-streams.org/

a standard for asynchronous stream processing with non-blocking back pressure

  • asynchronous
  • stream processing
  • non-blocking
  • back pressure

Java API

http://www.reactive-streams.org/reactive-streams-1.0.0-javadoc/

Mainly only 3 interfaces:

  • Publisher<T> : Data provider following the demand from Subscriber
  • Subscriber<T> : Subscribe data from Publisher
  • Subscription : used to both signal desire for data and cancel demand between a Publisher and a Subscriber

And there's one more:

  • Processor<T,R> : Subscriber and Publisher

Specification

https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0/README.md#specification

Flux & Mono ( Project Reactor )

In my understandings, the interfaces of Reactive Streams are low level contracts for standardization. Therefore we need more convenient implementations on top of them. One of them is Project Reactor.

https://projectreactor.io/

Both Mono and Flux implements Publisher.

Now it seems a bit clear for me. I'm feeling like Reactor provides definition of flow. I will continue to check Mono & Flux.