3 ms·
RxJava or Reactive Streams won't solve the issue of ceremony needed for dealing with async I/O. You're correct that it only makes it worse. The real advantage
by unscaled 6y ago
RxJava or Reactive Streams won't solve the issue of ceremony needed for dealing with async I/O. You're correct that it only makes it worse.
The real advantage the reactive model offers is a more powerful abstraction for data flow than futures. I found it useful than straight coroutines or async/await in cases where I had to process complex data flows or combine periodically polled data from multiple sources, but in well over 99% of the use cases for an async REST API it's an overkill.
Removing the ceremony around asynchronous I/O, on the other hand, requires language support, so your best option right now is to just use Kotlin coroutines. Or wait for Project Loom, but I assume it's at least 2 years away from a stable release.
- The_rationalist 6y agoKotlin flow allows you to have the best of both worlds: Suspending function that have obscoleted the concept of promises and flow when you want to deal with fine grained async list processing