Benefits of Rx, Without the Complexity

eric at kolotyluk.net eric at kolotyluk.net
Mon Jun 20 18:33:02 UTC 2022


After tinkering with loom and learning a lot of revised synchronous style
practices, I was recently watching another presentation on Reactive
Programming, and it got me thinking about how some of the asynchronous
practices, such as Backpressure, could be expressed in the synchronous world
of Virtual Threads, Structured Concurrency, etc.

 

After working on Akka Scala for years, using Reactive Practices, I had a
sense that it might be possible to build applications/services that would
not thrash. They would go up to 100% utilization, without thrashing, and
then just refuse more work. Sorry mate, I won't do that now, maybe talk to
the Load Balancer about spawning some more siblings. I don't know how true
this sense is, only that it's a hopeful sense.

 

While I have dabbled with java.util.concurrent.Flow using Virtual Threads
successfully, I still find the cognitive load for using Rx APIs higher than
I would like, but it is well disciplined and has many other benefits, such
as backpressure.

 

In the future, can we build simpler synchronous APIs with the benefits of
asynchronous APIs such as Rx, leveraging the scalability/throughput of
Virtual Threads and the discipline of Structure Concurrency? I guess I am
just lazy, and I don't want to think harder than I have to.

 

Cheers, Eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20220620/b058d499/attachment-0001.htm>


More information about the loom-dev mailing list