Refactor to Reactive with Spring 5 and Reactor 3
summary
A Spring MVC chat is refactored stepwise to Spring 5/WebFlux and Reactor: controllers return Mono/Flux, WebClient replaces RestTemplate, a GitHub Gitter stream is consumed as a Flux, and repositories move from JPA/JDBC to R2DBC reactive drivers. A ReplayProcessor provides server-side caching and fan-out; server-sent events push updates to browsers; retryBackoff, timeouts and nonblocking DB access keep the UI responsive when DB or network fail. Switching Tomcat to Netty claims roughly 2x throughput. Demo builds, streams, and survives DB/network outages. WebFlux operators transform and merge initial and streaming results.
AI-written summary · about
chapters (10)
- 0:00Introduction and setup
- 2:45Current non-reactive app
- 13:19Refactor mindset change
- 16:35Migrate to Spring WebFlux
- 19:47Refactor API to server push
- 31:56Remove blocking operations
- 42:09Implement push model
- 46:08Switch to Netty server
- 49:57Final reactive system demo
- 53:14Key takeaways and resources








