3

I wonder what is the relationship between Reactive Streams (defined by Reactive manifesto) and Reactor pattern (https://en.wikipedia.org/wiki/Reactor_pattern). I read that Project Reactor, which I suppose is an implementation of the Reactor pattern, implements Reactive Streams API. But how does Project Reactor translate Reactor pattern's concepts to streams concepts. How are abstractions from those 2 domains linked?

Mike
  • 812
  • 9
  • 25
  • That wikipedia article appears to be authored from a single paper that contains more citations to other work by the same author than other sources. I wouldn't worry about it. Your question is too vague as well. – K.Nicholas Oct 07 '21 at 10:53
  • @K.Nicholas This pattern is mentioned in other places as well, e.g. https://dzone.com/articles/understanding-reactor-pattern-thread-based-and-eve. Do you consider it 'non-mainstream', so to say? – Mike Oct 07 '21 at 11:02
  • I always preferred the hands on approach. Try implementing the Java reactor api. https://docs.oracle.com/javase/9/docs/api/java/util/concurrent/Flow.html – K.Nicholas Oct 07 '21 at 11:31
  • @K.Nicholas Flow has no notion of Reactor. It is a copy of the Reactive Streams interfaces (which is pretty useless if you don't take notice of the whole spec behind), and has seen very little uptake compared to Reactive Streams-based libraries (Reactor 3 being one of these) – Simon Baslé Oct 07 '21 at 16:01
  • Exactly. It is a copy of the reactive streams interfaces. – K.Nicholas Oct 07 '21 at 18:25

1 Answers1

5

Project Reactor, at least in its current 3rd generation, is solely Reactive Streams based. It doesn't implement the Reactor pattern specifically.

In fact, you'll notice here on StackOverflow that [project-reactor] tag is distinct from the [reactor] tag for the pattern (yet the project-reactor tag has a score of 2355 while the other has 613, whatever that means).

So there is no meaningful relationship between the library and the pattern.

Simon Baslé
  • 27,105
  • 5
  • 69
  • 70