Consider switching to Project Reactor
See original GitHub issueAt the time when we began Armeria, we ended up with StreamMessage
which is a specialized variant of Reactive Stream Publisher
mainly because there was no suitable Reactive Stream implementation that meets our requirements:
- Few third party dependencies
- Stable
- Rich set of
Publisher
implementations that’s suitable for publishing network traffic
Project Reactor was in a very early stage when I reviewed it and now it seems to meet our requirements. It even looks way richer than StreamMessage
:
- Read from here to learn the basics: http://projectreactor.io/docs/core/release/reference/docs/index.html#intro-reactive
- Read about their
Processor
implementations which could replaceDefaultStreamMessage
andStreamMessageDuplicator
: http://projectreactor.io/docs/core/release/reference/docs/index.html#processors
This change would guarantee huge undertaking and broken backward compatibility. We will get richer API and potentially better interoperability/migration opportunaty against other libraries that use Project Reactor such as Spring Webflux.
Thoughts? /cc @hyangtack @minwoox @anuraaga @imasahiro @kojilin @taicki @kshgizmo and everyone interested
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:7
Top Results From Across the Web
Reactor 3 Reference Guide
Reactor is a fully non-blocking reactive programming foundation for the JVM, with efficient demand management (in the form of managing “backpressure”). It ...
Read more >The 5 basic topics you should know about project reactor
The 5 basic topics you should know about project reactor · Creating publishers · Converting publishers · Switching from or to different publishers....
Read more >[Reactor Gen4] Discussing switching to a JDK 17 baseline #703
We are now considering a new "generation" version of Reactor, switching from Reactor 3 to Reactor 4. Added clarification:.
Read more >Intro To Reactor Core - Baeldung
Introduction to Reactor Core project, covering the basic concepts. ... Think about a stream of thousands of stock updates per second coming ...
Read more >Flux.switchOnNext variant that switches when the next ...
Interesting problem! I think something like this might work: @Test void switchOnNextEmit() { Duration gracePeriod = Duration.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We may also want to do some research on other reactive stream implementations such as RxJava 2.
I think we went too far already and our implementation has interesting features like
SubscriptionOption
which cannot be replaced easily with Reactor. I also tend to prefer shorter stack trace 😉