LOADING

The Concurrency Triangle: Scala Fibers, Java Virtual Threads, and Kotlin Coroutines

Scala Fibers, Java Virtual Threads, and Kotlin Coroutines - this talk shows how this elegant solution manifests at three different abstraction levels.

Riccardo Cardin
Senior Software Engineer at Lastminute.com, Blogger at RockTheJvm.com
About This Talk

Operating system thread context switches are a fundamental bottleneck in high-concurrency JVM applications. Each switch requires kernel transitions, CPU cache invalidation, and scheduling overhead. The JVM ecosystem has developed three prominent solutions: Fibers as implemented by many Scala monadic effect systems, Java Virtual Threads (Project Loom), and Kotlin Coroutines.

While these technologies appear vastly different on the surface, functional versus imperative, library versus runtime, they actually implement the same core pattern: replacing OS thread scheduling with user-space scheduling of continuations.

This talk shows how this elegant solution manifests at three different abstraction levels. We'll take the Cats Effect library as an example of Fibers implementation library through the IO monad. Project Loom pushes it down to the JVM runtime, making it transparent to developers. In Scala, the Ox library is built upon virtual threads. Kotlin Coroutines place it at compile time through the transformation of suspend functions. We'll see them as different expressions of the same fundamental breakthrough in concurrent programming.

more great talks

Might Be Interesting

Day 2
  —  
12:25 pm
arrow pointing right icon

Efficient programming with Scala and LLMs

Drawing from multiple Scala LLM workshops we conducted this past year, I will share insights to significantly enhance your AI experience.

Day 2
  —  
4:15 pm
arrow pointing right icon

Scripting on the JVM with Scala

This talk will explore the use of Scala as a scripting language, replacing the Bash and Python scripts common throughout the industry.

Day 1
  —  
3:10 pm
arrow pointing right icon

Controlled Concurrency Testing for Scala

This talk presents McCCT, a new concurrency testing tool developed at KTH by the speakers in the context of an ongoing research project.

Day 2
  —  
2:00 pm
arrow pointing right icon

Backend driven Frontends: Modern, Powerful and Blazingly Fast with Datastar & zio-http

So, is there a modern solution for web apps that is powerful, simple, and blazingly fast in both CI and the browser? A solution that lets you write in your favorite backend language and is fun? The answer is Datastar!

Day 1
  —  
2:35 pm
arrow pointing right icon

Beyond `flatMap`: Is Kyo the Future of Scala Effects?

For nearly a decade, Scala's concurrency has been driven by Akka, Cats Effect and ZIO, each with its own vision for purity, safety, and pragmatism. Kyo enters this incredible ecosystem with a fresh perspective.This talk provides a critical, technical comparison of these systems through a unified framework.

Day 1
  —  
11:15 am
arrow pointing right icon

Cyfra: Scala on GPU

Learn how to accelerate Scala code by orders of magnitude with Cyfra.

See All Events
Join us!

We're looking for amazing speakers.
CFP is open till 10.01.2023

Fill in Call for Papers
location icon

Location

Centrum Konferencyjne POLIN, Poland
stay in touch icon

Follow Us

Contact Us