Session

Reactive Spring Boot With Coroutines and Virtual Threads

If you want to get the most out of Spring Boot in terms of low latency, high throughput, and resource efficiency, there’s no way around Spring Boot’s reactive stack WebFlux. However, the price you pay in terms of WebFlux code’s complexity, readability, and maintainability is rather high and will likely give you a lot of headaches.

In this workshop, you’ll learn how Spring Boot’s coroutine support will wipe out all the downsides of the ‘raw’ WebFlux approach and provide you with the best of both worlds: reactive characteristics without the complexity.

You’ll also explore Kotlin’s reactive building blocks, such as coroutines, channels, and flows, and apply them in Spring Boot. By building a reactive API in Spring Boot from scratch, you’ll learn how to:

- Perform non-blocking remote API calls using WebClient.
- Access a relational database with the reactive R2DBC driver.
- Apply parallelism in your business logic.
- Write and test reactive API endpoints.
- Create an advanced streaming API based on Server-Sent Events that combines coroutines and flows.

By the end of the workshop, you’ll know all the ins and outs of reactive programming in Spring Boot with coroutines, as well as the benefits they offer over the WebFlux abstractions Mono and Flux.

Furthermore, you’ll explore Project Loom’s virtual threads and see how they fit into the picture. You’ll also learn how virtual threads can further leverage the power of coroutines.

Jeroen Rosenberg

Dev of the Ops - Continuous Deliverer - Principal Consultant @ FreshMinds

Amsterdam, The Netherlands

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top