Michael Eder & Philipp Frauenthaler
Going reactive with Spring WebFlux
#1about 2 minutes
Comparing Spring MVC and Spring WebFlux models
Spring MVC uses a blocking, thread-per-request model, while Spring WebFlux uses a non-blocking, asynchronous event loop model for better resource utilization.
#2about 3 minutes
A restaurant analogy for blocking vs non-blocking I/O
An analogy of waiters in a restaurant illustrates how the non-blocking model of Spring WebFlux is more efficient than the blocking, thread-per-request model of Spring MVC.
#3about 3 minutes
How the event loop model improves resource utilization
Spring WebFlux uses a small number of event loop threads that handle requests in a non-blocking fashion, preventing threads from waiting idly on I/O operations.
#4about 4 minutes
Core concepts of Project Reactor: Publisher and Subscriber
Project Reactor is built on the Publisher-Subscriber pattern, using Mono for single items and Flux for streams, which only emit data upon subscription.
#5about 7 minutes
Building a reactive API controller with Spring WebFlux
Implementing a reactive controller involves wrapping request and response types in Mono or Flux and using a functional, chained programming style with operators like flatMap.
#6about 5 minutes
Handling blocking I/O and transactions in reactive streams
Calling blocking database operations from a reactive stream blocks the event loop, requiring the use of `subscribeOn` to offload work and breaking standard `@Transactional` behavior.
#7about 6 minutes
Implementing manual transaction management in WebFlux
Transactions in a hybrid reactive application require manual management using `PlatformTransactionManager` and a dedicated single-threaded scheduler to maintain thread context across operations.
#8about 5 minutes
Exploring reactive data access and messaging options
To fully leverage WebFlux, the data access layer must also be reactive, using technologies like R2DBC, Hibernate Reactive, or native reactive drivers for NoSQL databases.
#9about 8 minutes
Lessons from a hybrid reactive and blocking architecture
A real-world job platform demonstrates a hybrid model, highlighting the complexity of mixing blocking and non-blocking code and reinforcing that a fully reactive stack is ideal.
#10about 11 minutes
Q&A: Thread safety, RxJava vs Reactor, and debugging
The Q&A session addresses common concerns, including the importance of thread safety, the similarities between RxJava and Reactor, and the inherent difficulties of debugging asynchronous code.
Related jobs
Jobs that call for the skills explored in this talk.
tree-IT GmbH
Bad Neustadt an der Saale, Germany
€54-80K
Intermediate
Senior
Java
TypeScript
+1
Matching moments
11:32 MIN
The industry's focus on frameworks over web fundamentals
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
03:16 MIN
Improving the developer feedback loop with specialized tools
Developer Time Is Valuable - Use the Right Tools - Kilian Valkhof
02:33 MIN
Why you might not need JavaScript for everything
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
11:10 MIN
The only frontend stack that truly matters
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
03:31 MIN
The value of progressive enhancement and semantic HTML
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
09:00 MIN
Navigating the growing complexity of modern CSS
WeAreDevelopers LIVE – You Don’t Need JavaScript, Modern CSS and More
04:02 MIN
How a broken frontend culture impacts the web
WeAreDevelopers LIVE – Frontend Inspirations, Web Standards and more
05:28 MIN
The origin story of the Polypane developer browser
Developer Time Is Valuable - Use the Right Tools - Kilian Valkhof
Featured Partners
Related Videos
Slip Through the Boundaries of Legacy Systems with Kotlin and Spring WebFlux
Lukas Georgieff & Alberto Gisbert
Side-by-Side: Reactive vs non-reactive Java
Jan Weinschenker
Our journey with Spring Boot in a microservice architecture
Michael Eder & Philipp Frauenthaler
Development of reactive applications with Quarkus
Niklas Heidloff
Why HTMX is crushing React, Vue & Svelte.
Felix Eckhardt & Benedikt Stemmildt
Java 21: The Revolution of Virtual Threads - A Deep Dive
Christian Woerz
Rethinking Reactive Architectures with GraphQL
David Leitner
Java's Project Loom & Co - the end for reactive programming?
Jan Weinschenker
Related Articles
View all articles

.gif?w=240&auto=compress,format)

From learning to earning
Jobs that call for the skills explored in this talk.

Visonum GmbH
Remote
Junior
Intermediate
React
Redux
TypeScript


Douglas GmbH
Düsseldorf, Germany
Intermediate
Senior
React
TypeScript

ShopVibes
München, Germany
Remote
Intermediate
REST
React
Figma
PostgreSQL
+1

Haufe-Lexware GmbH & Co. KG
Freiburg im Breisgau, Germany
Remote
Senior
Java
REST
Scrum
React
+4


dmTECH
Karlsruhe, Germany
API
CSS
Java
REST
MySQL
+8

UST España
Málaga, Spain
Remote
Senior
HTML
Java
Hive
JUnit
+4
