Take a Look at Project Loom

Maybe you already have heard of Java Project Loom. This is a project I am very exited about since it promises to make our lives as developers easier while at the same time being able to use the capabilities of modern hardware to the full extend.

I’v long wondered why people like writing async code for better concurrency that traditional, thread-based concurrency gives us. In his great article “State of Loom” Ron Pressler of Oracle writes:

Chopping down tasks to pieces and letting the asynchronous construct put them together results in intrusive, all-encompassing and constraining frameworks. Even basic control flow, like loops and try/catch, need to be reconstructed in “reactive” DSLs, some sporting classes with hundreds of methods.

Did you ever really understand how these APIs and DSL work? I didn’t. This is what Project Loom promises to solve for us: great concurrency with easy mental load on us, the humble programmers. Ron Pressler again:

Forget about callbacks or reactive stream chaining — just block. Write straightforward, boring code. All the benefits threads give us — control flow, exception context, debugging flow, profiling organization — are preserved by virtual threads; only the runtime cost in footprint and performance is gone.

More details are available in Ron’s talk “Project Loom – Modern Scalable Concurrency for the Java Platform” which you can watch here:

Project Loom: Modern Scalable Concurrency for the Java Platform

If you want to learn more about Project Loom, visit the project site. And go ahead and try it, SDKMAN! has the EA build available for easy installation as java 16.ea.6.lm-open.