Full Reactive Stack with Spring Boot, WebFlux and MongoDB
This book is 100% complete
Completed on 2020-06-15
About the Book
You will learn how to develop Reactive Web endpoints using Spring Reactor and Spring WebFlux, the alternative to MVC. To make it full-reactive, you will use MongoDB since it provides a reactive driver integrated with Spring Data.
This book shows how to build a simple Angular application (since the book focuses more on the backend) that uses RxJS and EventSource to connect to the reactive flow provided by the backend (supported by WebSockets).
To make easier the build and deploy of the application, the source code includes docker-compose files that you can use to run the complete reactive stack.
Benchmark and WebFlux vs. MVC analysis
The last chapter is focused on comparing MVC with WebFlux in a practical way, and analysing what are the pros/cons depending on your use case.
All the source code related to this book is available on GitHub.
Note: This mini-book is based on the posts Full Reactive Stack Guide, but their format has been adapted so it's easier to read as a complete guide.
Chapter 1: The Reactive Web
- Reactive Web Patterns
- WebFlux and Project Reactor
- Reactive Web: Advantages
- Is Non-Blocking the same as Reactive?
- The application
Chapter 2: Full Reactive Stack Backend
- Project Reactor – Main Features
- WebFlux – Main Features
- Creating the application
- Repository Layer
- The Reactive Controller
- The Blocking Controller and Repository
- Loading data into MongoDB with an ApplicationRunner
- Running the backend
- Playing with Reactive and Classic endpoints
Chapter 3: Connecting Angular with the WebFlux Backend
- Why Angular?
- Creating the Angular application
- UI Application Overview
- The Angular Reactive service
- The Angular Components – Quick Overview
- Running the frontend
Chapter 4: Conclusions
- WebFlux vs. Blocking (MVC): user experience
- WebFlux vs. Blocking (MVC): performance
- WebFlux vs. Blocking (MVC): ease of development
Appendix: Running the application in Docker
- Generate the build artifacts
- Build and run the Spring Boot app in Docker
- Build the Angular app and run it in Docker
- Putting everything together with Docker Compose
The Leanpub 45-day 100% Happiness Guarantee
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.