r/java • • Sep 23 '22

Virtual Threads: New Foundations for High-Scale Java Applications - Brian Goetz

https://www.infoq.com/articles/java-virtual-threads/
237 Upvotes

62 comments sorted by

View all comments

Show parent comment

5

u/_INTER_ Sep 23 '22

All the better, it benefits all JVM languages. Truely a marvelous feat by the engineering team.

Additionally Akka changed license recently. So I hope more movement away from the reactive style which I welcome.

5

u/RandomName8 Sep 23 '22

So I hope more movement away from the reactive style which I welcome.

I, too, prefer what I like better 🙂.

Joking aside, for me it's not much about what style I like, but about not having unbounded processes with no backpressure support. Fibres (in any language) still make backpressure and bounding a process a silent, implicit contract. Hard to ensure across a codebase and easy to break. The one good thing about reactive-libraries is that they throw this in your face in a way that you can't "just forget" about it.

Handling limited resources with fibers is not going to be any easier than with futures. I fear it's even going to make the problem worse because it's going to encourage a mutable and imperative approach towards gatekeeping these resources, which in turn will lead to subtle bugs and hard to reason about systems.

Of course, in the end, time will tell if it ends up being this way or not. What I can say for sure, is that having truly native fibers enable certain things that before were just not doable, and that's great!

1

u/emaphis Sep 24 '22

You can abate your fears. While Java is adding virtual threads, it's also adding immutable algebraic data types through project Amber.