Ready for a deep dive into the world's most challenging programming paradigm? Reactive programming can simplify asynchronous and event-driven applications, but without a strong understanding, it can lead to frustration, recurring patchwork, missed deadlines, and costly bugs.
In this intensive three-hour session, we'll transition a traditional Spring application to WebFlux, revealing patterns and aanti-patterns when working with repositories, REST APIs, queues, and legacy libraries. You'll gain a clear understanding of often overlooked but critical aspects like subscribe signal, errors, cancellation, and signal loss. As a bonus, we'll debate the future of Reactive vs Virtual Threads, production-ready in Java 21.
This session is crucial for developers already working with reactive programming or those intending to make the leap.
2. victorrentea.ro/training-offer
👋 Hi, I'm Victor Rentea 🇷🇴 PhD(CS): VictorRentea.ro
Java Champion, 18 years of code, 10 years of teaching
Consultant & Trainer for 120+ companies:
❤️ Clean Code, Architecture, Unit Testing
🛠 Spring, Hibernate, Reactive/WebFlux
⚡️ Java Performance, Secure Coding 🔐
Lots of Conference Talks on YouTube
Founder of European Software Crafters Community (6K members)
🔥 Free 1-hour webinars, after work 👉 victorrentea.ro/community
Past events on youtube.com/vrentea
Father of 👧👦, servant of a 🐈, weekend gardener 🌼 VictorRentea.ro
6. 6
Reactive Programming
is programming with
asynchronous data
streams
Watch: The introduction to Reactive Programming you've been missing - https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
19. 20
If you have a Spring MVC application that works fine, there is no need to
change. Imperative programming is the easiest way to write, understand,
and debug code. You have maximum choice of libraries, since most are
blocking.
If you have a large team, keep in mind the steep learning curve
in the shift to non-blocking, functional, and declarative programming.
A practical way to start without a full switch is to use the reactive WebClient.
Beyond that, start small and measure the benefits.
We expect that, for a wide range of applications, the shift is unnecessary.
https://docs.spring.io/spring-framework/docs/current/reference/html/web-reactive.html#webflux-framework-choice
23. 24
Flux
Emits 0..N items🔵 + COMPLETE| or ERROR❌
...
Many elements
Flux.just(1,2)
Flux.fromIterable(list)
One element Flux.just("a")
No element Flux.empty()
Infinite Flux
... Flux.interval()
KafkaReceiver.receive()
...
Error Flux.error()
Δt
time
25. 26
Mono
Emits 0..1 items🔵 + COMPLETE| or ERROR❌
No element Mono.empty()
One item Mono.just(1)
error Mono.error(new Ex(..))
Best Practice: If a function return nothing
declare its return type: Mono<Void>
eg. sendEmail(..): Mono<Void>
Data items cannot be null in Reactor;
instead, return a Mono.empty().
⚠️ How do operator handle empty?
32. 33
Default way of handling HTTP requests
Boundary
System
Service A Service B DB
time
API call
(http request)
thread released
(http response sent back)
thread blocked
( 1 / 200 in the thread pool )
WASTE OF RESOURCES
STARVATION RISK
API call
(http request)
API call
(http request)
Query
(JDBC call)
⭐️ Fixed by Java 21
I'm victor rentea from Romania. I'm a java champion, working in our field for 17 years.
8 years ago I realized coding was not enough for me, and I started looking around to help the others.
Today this has become my full-time job: training and consultancy for companies throughout Europe.
My favorite topics are ...
but of course, to talk about these topics you have to master the frameworks you use, so I do intense workshops on Spring Framework, ....
More senior groups often call me for performance tuning or secure coding. If you want to know more, you can find there my full training offer
Besides the talks at different conferences that you can find online, I try to to one webinar each month for my community.
A few years ago I started this group on meetup to have where to share my ideas and learn from the others in turn.
- This community has exceeded my wildest dreams, turning into one of the largest communities in the world on Software Craftsmanship.
- So what happens there? One day a month we have a zoom online webinar of 1-2 hours after work, during which we discuss one topic and then debate various questions from the participants – usually we have close to 100 live participants, so it's very engaging. If you want to be part of the fun, DO join us, it's completely free.
- Many past events are available on my youtube channel.
- Outside of work, I have 2 kids and a cat that wakes us up in the middle of the night.