Jan Weinschenker

Java's Project Loom & Co - the end for reactive programming?

Is this the end for reactive programming? See how Java's virtual threads deliver massive concurrency with simple, blocking code—no complex frameworks required.

Java's Project Loom & Co - the end for reactive programming?
#1about 2 minutes

Understanding the goals of Java's Project Loom

Project Loom aims to simplify writing, maintaining, and observing high-throughput concurrent applications by introducing lightweight virtual threads.

#2about 3 minutes

The core principles of reactive programming

Reactive programming helps applications stay responsive and elastic under heavy load by using a message-driven architecture to process external events.

#3about 3 minutes

Understanding the problem of blocked threads in concurrency

Blocked threads waste processing time while waiting for I/O operations, which is the core problem that both Project Loom and reactive frameworks aim to solve.

#4about 4 minutes

Exploring approaches to non-blocking software development

Various approaches like callbacks, reactive frameworks, and Kotlin coroutines have been developed to manage a limited number of threads against a potentially unlimited amount of work.

#5about 2 minutes

Demonstrating failure with traditional blocking Java code

A simple concurrent Java 17 application fails with an out-of-memory error when trying to handle a large number of blocking tasks with platform threads.

#6about 3 minutes

Solving blocking issues with reactive and Kotlin code

The same concurrency problem is successfully solved using a reactive framework and Kotlin coroutines, but both require adopting a new programming model or language.

#7about 2 minutes

Solving blocking issues with Project Loom's virtual threads

The original failing imperative Java code is fixed by simply switching to a virtual thread executor, demonstrating how Project Loom solves the problem without changing the programming model.

#8about 2 minutes

How virtual threads use carrier threads to avoid blocking

Virtual threads are unmounted from their carrier (platform) threads when they block, allowing the carrier thread to execute other virtual threads and achieve high concurrency.

#9about 2 minutes

Conclusion on Project Loom's impact on reactive programming

Project Loom allows developers to solve concurrency problems with simple sequential code, making it harder to justify the complexity of reactive frameworks for many use cases.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

From learning to earning

Jobs that call for the skills explored in this talk.

Java Developer

Java Developervanloq Limited
Belfast, United Kingdom

GIT
Java
Spring
MongoDB
Scripting (Bash/Python/Go/Ruby)