Master Reactive Programming and RESTFUL APIs with Spring Boot/WebFlux. Dive deep into the world of reactive programming with hands-on coding and theoretical insights, enabling you to build robust, non-blocking RESTFUL APIs using Spring WebFlux and Reactor.
Course Overview
This course offers an in-depth exploration of Reactive Programming and the development of Reactive RESTFUL APIs using Spring WebFlux. Designed to be hands-on, the course provides you with the skills to code effectively in a reactive paradigm.
Learning Objectives
- Understand the principles and importance of Reactive Programming.
- Develop reactive applications using Spring WebFlux and Reactor.
- Implement Reactive APIs that interact seamlessly with databases.
- Leverage WebClient for building non-blocking clients.
- Gain proficiency in writing and running JUnit tests for reactive components.
Why Choose Reactive Programming?
Explore why reactive programming is becoming essential in modern applications. This section contrasts the Spring MVC model with reactive approaches, discussing its limitations and the advantages offered by a reactive system.
Understanding Reactive Programming
- Introductory concepts and benefits of Reactive Programming.
- A snapshot of how reactive programming functions using simple examples.
- An introduction to the Reactive Streams Specification and popular libraries.
Getting Started with Project Reactor
Dive into the Project Reactor library to understand the reactive types, Flux and Mono, through practical examples.
Course Setup
Set up your project with Spring Initializr, preparing your development environment for success.
Hands-On Reactive Programming
Engage with Flux and Mono through live coding sessions and learn to implement JUnit testing for these reactive streams.
Building Non-Blocking RESTFUL APIs
Annotated Controllers
- Create your first non-blocking RESTFUL API.
- Learn the essentials of reactive API mechanisms.
- Code solutions to return Flux/Mono from endpoints and conduct JUnit testing with WebTestClient.
Functional Web Approach
- Develop APIs using the RouterFunction and HandlerFunction.
- Conduct JUnit testing with focus on functional endpoints.
Advanced Topics
WebFlux & Netty Execution Model
- Understand how WebFlux serves HTTP requests with Netty.
- Explore advanced concepts including Channels and EventLoops.
Reactive Programming with Databases
- Integrate MongoDB into your reactive applications.
- Configure Spring Boot profiles and build sophisticated reactive repositories.
Exception Handling in WebFlux
- Implement robust error handling in reactive APIs using both RestController and Functional Web approaches.
- Master techniques with ExceptionHandler, ControllerAdvice, and WebExceptionHandler.
Working with WebClient
- Explore interaction with reactive APIs using WebClient.
- Perform HTTP operations and handle exceptions effectively.
Streaming and Real-Time Data
- Implement server-side events (SSE) for real-time data streaming with MongoDB and Spring WebFlux.
- Utilize Tailable Cursors and Capped Collections for continuous data flow.
Course Requirements
- JDK 8 or above
- An IDE such as IntelliJ or Eclipse
- Knowledge of Spring Boot is recommended for optimal comprehension
Ideal Audience
- Developers keen to explore Reactive APIs with Spring WebFlux.
Key Learning Outcomes
- Identify problems solved by Reactive Programming.
- Comprehend and apply Reactive Programming principles.
- Build and test reactive REST APIs from scratch.
- Develop non-blocking clients and solve real-world challenges with WebClient.