Learn about all about Coroutines & virtual threads
Working concurrently and asynchronously has produced many programming patterns: callbacks, futures, reactive extensions, and… coroutines. In this workshop we dive into what coroutines are, how they work and how to use them efficiently in Kotlin.
Program & Background
After this workshop you will be able to apply coroutines. Also, you will understand how error handling works. How to offload (IO) work to background threads, and how to compose coroutines. While keeping your programming style nice and imperative.
We also explore how Project Loom (Java 19+) will achieve the same goals using Java, and see how their approach differs from Kotlin coroutines.
Target Audience
Java/Kotlin developers
Requirements
IDE with support for Gradle
JDK20 for Project Loom
Experience with Spring-Boot is nice but not required
Objectives
- Understand the concept of coroutines
- Understand the differences between coroutines and other approaches to concurrent programming
- Hands on experience in working with Kotlin coroutines
- Work with coroutine life-cycle, context, error handling, threading and dispatching
- Work with more advanced coroutines features: Channels and Flow
- Re-write a real world (Spring-Boot) application to use coroutines
- Understand the concept of virtual threads in Project Loom
- Understand the differences between virtual threads and coroutines
- Learn how to use structured concurrency in Project Loom
- Hands on experience with virtual threads and structured concurrency using Spring-Boot