Virtual Threads in the JVM - Achieve Better Lightweight Concurrency Without Changing Your Code

Track

Trends & Future

Date and time

-

Room

-

Duration

30'

Thread-per-request mode is the most common model in Java server-side programming today; however, this model is used mostly for I/O operation who often block the threads that are executing them, which is costly and limits the maximum number of requests. Developers could always solve this with an asynchronous programming model; on the other hand, this model is complicated and hard to debug. The ideal situation would be to have an efficiency of asynchronous programming and be able to program in usual, sequential order. That is where Virtual Threads introduced by Project Loom come in. Virtual Threads, formally known as Fibers, are created and managed by the JVM and only mapped to OS threads when they need to perform a specific task. This makes their creation, blocking, and spawning cheap. They also support the java.lang.Thread API, so developers would not even notice the difference (most of the time). In this presentation we will present how you can use Virtual Threads, compare them with OS threads, and show many potential benefits of such an approach.

Lecture details

Type: Lecture
Level of difficulty: General
Experience Level: No experience
Desirable listeners function: Developer
Group of activity: Trends & Future

About speaker

Like us on Facebook

We post news, photos and other interesting facts on official JavaCro Facebook Page.

Follow us on Twitter

Keep up to date with all the news on Twitter!

Organizers

The conference is organized by the Croatian Association of Oracle users & Croatian Java Users Association. 

Media Sponsors