
Explore reactive programming with project reactor and flux, and build a reactive REST with spring boot. The course starts with theory and progresses to work, including a YouTube-like streaming app.
Download and install the jdk, maven, and spring tool suite, then configure java_home and m2_home and update your path on your local machine.
Download Postman from the official website and install it on your local machine, then open it to fire requests, with query params and a body payload for testing rest APIs.
Install and run MySQL locally by downloading the MySQL server and Workbench, start the server, then connect with Workbench to the local database and review default schemas for microservices.
Explore how traditional rest api design uses a synchronous, imperative flow: fetch order from the database, call an external courier service, and compose a blocked, top-to-bottom json response.
Explore how traditional rest APIs use an embedded Tomcat with a thread-per-request model, handling limited concurrent requests, and examine how load balancing and cloud scaling affect cost and performance.
Explain back pressure through a water-flow analogy and show how receivers control the source to prevent overload, contrasting with traditional blocking patterns in spring web flux and spring boot.
Explore reactive programming as a declarative, asynchronous, and non-blocking paradigm that uses event-driven streams with back pressure, forming the foundation for building reactive rest APIs with Spring WebFlux.
Explore event driven streams in reactive programming, where publishers emit on_next events to subscribers, with asynchronous, non blocking data flow and on_complete and on_error signals.
Explore the reactive streams specification and its four interfaces—publisher, subscriber, subscription, and processor—and understand data flow, backpressure, and signals like on_next, on_complete, and on_error.
Explore why reactive programming offers asynchronous and non-blocking execution that can boost your application's performance. Decide when to adopt reactive programming with spring web flux based on your performance needs.
Explore reactive libraries for Java and implement four reactive interfaces using Project Reactor, chosen as recommended with springboard, while other options like Orix Java and reactive streams exist.
Explore the introduction to Project Reactor, a non-blocking, asynchronous library for building reactive REST APIs with microservices and back pressure, and review its core modules and documentation.
Learn Flux and Mono as core reactive types, where Flux handles multiple elements and Mono a single value (or empty) in reactive programming. Explore Flux use cases in upcoming lectures.
Create a maven project and add the reactor core dependency to enable reactive programming with project reactor, using Java 1.8 as the minimum.
Explore flux as a reactive publisher by creating a flux of strings, subscribing to it, and printing each emitted name such as John, Raj, and Sachin.
Learn how to add values to an existing flux in spring webflux by directly concatenating values or by concatenating with another flux, illustrated with concrete examples.
Learn how to enable logs for a Flux publisher using the meter log, observe on next, on complete, and on subscribe events, and verify data flow in the reactive streams.
Explore exception handling in flux by simulating a runtime error after three elements, and implement on error and on complete actions in a reactive Spring WebFlux and Spring Boot flow.
Understand mono as a publisher of a single value in reactive programming with Spring WebFlux, subscribe to a mono, print value (for example John), and handle success and error events.
Create an empty flux with flux.empty() and an empty mono with mono.empty(), then subscribe to observe no on_next events, a final on_complete, and note how mono.justOrEmpty handles null values.
Convert an Optional to a Mono in a reactive Spring WebFlux context, showing value emission from non-empty optionals and completion for empty or null ones. Subscribe and log to verify.
Convert a list into a flux and subscribe to print its elements. Handle empty lists and note a null pointer when the input is null.
Convert a stream into a flux, then subscribe to the flux and print each value, observing on next and on complete events for a list of strings.
Convert arrays and lists into Flux using Flux.fromIterable, subscribe to observe onNext and onComplete events, and explore empty and null cases with sample values like John, Raj, and Peter.
Create a flux with range by specifying start and count, e.g., five to fourteen for ten elements; subscribe and log results, and explore zero or one element edge cases.
Apply a filter on flux using predicates to select names with more than three characters, demonstrating on next and on complete events.
Explore mapping data in a flux with the map operation, transforming orders to IDs, and filtering by amount to produce long values.
Compare flux map with Java eight stream map, applying filter and map to yield long values via a publisher–subscriber flow, illustrating reactive programming versus traditional Java streams.
Learn how flatMap on Flux enables one-to-many data transformation, converting a single input (order) into multiple items, with practical examples of retrieving and printing items per order.
Explore back pressure in reactive programming by examining two key methods, with real-world and technical examples guiding upcoming lectures.
Explore the request() method to control backpressure on a flux of integers, pulling five or two items at a time and handling on next, on complete, and on error.
Learn to use the cancel() method inside onNext to stop a flux after a condition is met, illustrating backpressure with request and cancel.
Discover how schedulers drive asynchronous behavior in reactive Java apps with Spring Boot, using immediate, parallel, bounded elastic, single, and deprecated elastic schedulers, and prepare for practical examples.
Explore the immediate scheduler in a reactive flux pipeline. Observe how it uses the current thread for map operations and the subscriber, and see how published on affects downstream scheduling.
Explore using a parallel scheduler to move downstream operations to new threads, revealing the main thread versus parallel threads and when to apply parallel scheduling in reactive streams.
Learn how the single scheduler keeps downstream map and subscriber work on one thread, switching only once, and compare it with parallel and combined schedulers for CPU-heavy tasks.
Explore the bounded elastic scheduler for reactive streams, showing dynamic thread pools, switching threads for map operations, supporting asynchronous calls to databases or services, and noting deprecation of elastic.
Explore delaying the publication of flux elements using delay elements and duration, setting a one-second interval between values, and observing how parallel cellular threads handle each item.
Explore Spring WebFlux, a non blocking reactive framework built on Project Reactor, and model reactive endpoints with router and handler, plus Spring Data reactive repositories.
Create a spring boot app with spring webflux by configuring a new project, adding the spring reactive web dependency, and scaffolding a basic controller structure for reactive endpoints.
Explore building a reactive get api with flux in Spring WebFlux, returning a flux of orders and streaming data in an event stream, with a delay illustrating streaming.
Compare reactive rest APIs with traditional rest APIs, highlighting non blocking back pressure in spring web flux versus blocking traditional endpoints, with one-second delays, stream processing, and subscriber cancellation.
Develop a reactive get api using Mono to return a single order object in a Spring WebFlux and Spring Boot app, demonstrating Mono.just and json output.
Explore the functional web approach with Spring WebFlux, introducing functional endpoints, outer functions, routers, and handler functions to replace traditional request mappings in a reactive Spring stack.
Create the first handler in a reactive spring boot app by defining an order handler component that returns a flux of orders and notes router setup for next.
Create your first router function in a reactive Spring WebFlux app by wiring a router to a handler and defining GET predicates.
Extend the router and handler to add multiple routes in a reactive rest api, using a functional style with get, post, and delete mappings returning order objects via mono.
Explore spring data r2dbc and reactive repositories to connect to an SQL database, perform CRUD operations using flux and mono, and query an example bicycle e-commerce orders table.
Set up a spring boot app with spring data r2dbc and web dependencies, configure database in application properties, map an order entity to the orders table, and enable r2dbc repositories.
Get all records from the orders table using a reactive flow with Spring Data R2DBC. Map each order to an order response and return a flux of responses.
Read a path variable via the router in a Spring WebFlux functional endpoint, convert it to a long, and fetch a single order by id via the repository and service.
Explore how to read a query parameter in a Spring WebFlux router function, extracting the id from the request and passing it to the service layer.
Build a reactive post api using router to read a json create order payload, map to an order entity, persist via repository, and return the created order response.
Implement a post request to /orders using functional routing in Spring WebFlux, accept json payloads, persist a new order in MySQL, and return the created order with its id.
Implement a reactive put api to update an order by id, map the update request into the existing order, persist changes with the repository, and return a mapped order response.
Update an order via a PUT in a reactive Spring WebFlux app, reading path variables and applying the payload to the database; verify the 500 to 600 change with Postman.
Learn to implement a reactive delete API for orders using a router, a handler, and a service that deletes by id and returns 'order has been deleted' via mono.
Explore how to handle request and response headers in a Spring WebFlux application, reading first header values and duplicates with the server request object, and returning header data in responses.
Understand how video streaming platforms load videos in chunks, request next bytes, and adjust playback as you seek, while previewing a reactive streaming app with Spring WebFlux and Spring Boot.
Set up a Spring Boot video streaming app with reactive WebFlux, using a handler, router, and service to load two videos from resources and expose them via REST API.
Create an html page to watch videos in a video streaming app using a video tag and frontend api, with full source code provided except two videos.
Develop a reactive API to render video with Spring WebFlux by loading video resources via a resource loader, returning a Mono resource, and handling range header for streaming.
Run the video streaming application, inspect the browser's range-based requests for video chunks, and observe how the server streams content and logs each loaded segment.
Learn to replace hard-coded videos by reading the video file name from the browser with JavaScript and sending it to a reactive spring boot api to stream the correct video.
***** Some Reviews From Students *****
its nice explanation
Great course for those (like me) who don't know about Reactive programming and searching for course to learn it from the beginning.
This course is all about Reactive Programming using Spring WebFlux and Spring Boot. It is asynchronous and non-blocking.
Now a days Spring Framework is widely used among Java Developers and specifically Spring Boot is in high demand. In this course you will learn Reactive Programming with Spring Boot.
You will learn reactive programming with Project Reactor library. First you will learn why need of Reactive REST APIs over traditional REST APIs.
Apart from this you will learn -
What is Back Pressure ?
Event Driven Stream
Reactive Stream Specification
You will learn Flux & Mono Reactive Types with Project Reactor library. Different methods provided in Flux and Mono. You will learn back pressure with request() and cancel() methods.
You will learn different Schedulers In Reactive Streams.
Immediate Scheduler
Parallel Scheduler
Single Scheduler
BoundedElastic Scheduler
After having the basic knowledge of reactive programming we will jump to Spring WebFlux with Spring Boot. You will learn functional endpoint with RouterFunction and HandlerFunction.
Then you will learn to Build Non Blocking REST APIs with Spring WebFlux & Spring Data R2DBC along with MySQL Database. Spring Data R2DBC is used to interact with SQL databases just like we have Spring Data JPA. In Reactive Stack Spring Data R2DBC is replacement of Spring Data JPA.
We will perform CRUD Operations (Create/Read/Update/Delete) using Spring Data R2DBC and MySQL database. Here different HTTP methods are covered like GET, POST, PUT and DELETE.
Video Streaming Platforms are perfect example for Reactive APIs and that what this course covers. Here we will create Video Streaming App just like YouTube using Spring WebFlux.