I know the second one is based on the first one but I'm curious about what are differences except API? Is it possible to establish push model connection with Reactor? I'm going to create a real-time app so I have to get the one most suitable for this purpose. I will appreciate any help :)
The API in this case is much more than syntactic sugar. It propagates the Reactive Contract. The Reactive Contract guarantees that a Producer won't produce more tasks/messages/whatever than a Consumer can consume without choking. This guarantees optimal usage of processing power by limiting thread-switching (I oversimplify to remain short). At Netty level, propagation of the Reactive Contract means not sending TCP acknowlegement until the data on the wire has been processed.
I don't know what "real time" means for you but Reactor is probably your friend. Anyways its great API makes sense for any application with processing that can split in several stages.
I've written my own library above Netty so I know a bit what I'm talking about. The Netty connector spits Command objects that can go into a Reactor Flux, but I offer no mean to propagate the Reactive Contract. This was a few years ago, at a time where Reactor Netty was called Reactor IO and it was in its infancy. The API has been completely rewritten since.
So my advice is: if you need the Reactive Contract, go ahead with Reactor Netty.
This may be non-trivial, as described in the issue Dynamically merging Fluxes. But there may be a simple answer to my question, and (depending on your application) you may just process every request in its own Flux.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With