Photo

Finally, we can simplify our code with Java Virtual Threads and do away with Kotlin Coroutines! ...

João Esperancinha

from Vereniging COIN (The Netherlands)

About speaker

João is a 10+ years experienced Software Developer, Studied Telecom Engineering at ISEL Lisboa, and worked in different companies in Portugal, Spain, and The Netherlands. He is a certified Kong Champion, a certified Java Developer (OCP11) and is a Certified Spring Professional 2021.

About speakers company

We work with landlines and network and internet providers also known as service providers. We are responsible for bundle-switching and contract termination between our clients.

Abstracts

specific

Java 21 and the long-awaited production-ready Java Virtual Threads that Project Loom promised us a long time ago are here. Why is this important? Like Kotlin Coroutines, they make better use of threads by multiplexing different instructions into different Threads and optimizing runtime in a non-blocking fashion resulting in faster and more resilient services capable of processing larger amounts of data. Kotlin coroutines used to be the only way to do this in the JVM, but with Virtual Threads, the code seems simpler, and where in Kotlin Coroutines we would need to define scopes and sometimes create complex nested code, with Java Virtual Threads, all of that complexity is gone. But there are caveats to this and maybe Kotlin Coroutines still have a specific purpose when developing performant and maintainable code especially when talking about structured concurrency.

With my examples similar to real-life scenarios from my experience, you'll see where and how one usage can be beneficial to the detriment of the other. When you leave this session you'll have learned where are the differences between Java Virtual Threads and Kotlin Coroutines and how to correctly and efficiently apply them.

The Program Committee has not yet taken a decision on this talk

other talks of this topic