
Discover RSocket interaction models, including request and response, fire and forget, request streaming, and bidirectional request channel, with guaranteed message order.
Expose the fire-and-forget api by implementing a socket acceptor that returns the math service as the socket, and start an rSocket server on port 6565 to keep listening.
Create an RSocket client in a test to send a fire-and-forget request to the server running on localhost:6565, using tcp client transport and RSocket connector.
Learn rsocket fire and forget, where a client sends a request without waiting for a response, even with a five-second server delay, unlike web flex.
Explain the request channel as bidirectional streaming, where a client sends numbers and a server returns results, demonstrated by plotting a console graph of y = x^2 + 1.
Explore peer to peer messaging with rSocket by implementing server and client socket roles, configuring a socket acceptor, and enabling request response, fire and forget, and request stream interactions.
Explore how Spring infers RSocket interaction types from input and output, selecting request response or request stream, even with empty input for routes like product dot all.
Create a thread-safe connection manager that tracks socket requesters in a synchronized set, adds on connect, removes on close, and periodically prints current connections, wired into the connection handler.
Explain how Kinect mapping behaves with single and implicit mapping with no route, showing that any client may connect via an implicit route and how to override with custom logic.
Explore connection setup and connect mapping options, including setup routes and implicit mappings, with retry resume and handling server restarts via reconnect and streaming resume.
Explore load balancing with persistent connections, showing how proxies route requests to backend instances and why connections may stick to one machine until restart.
Package the application and run multiple backend instances, print logs to track connect mapping and which instance handles requests, and use fire-and-forget print messages to observe port-based execution.
This lecture demonstrates configuring Nginx as a load balancer for three backends (ports 7070, 7071, 7072) and explains how connections are balanced while established ones stay with a single backend.
Demonstrates client-side load balancing under instance failure, showing tests where an instance dies and requests are rerouted to remaining targets, preserving balanced load.
Weighted load balancing uses latency-based weights to steer requests toward faster instances rather than round-robin, helping cloud deployments across multiple availability zones.
secure your rsocket application with ssl/tls by generating a keystore, creating a self-signed certificate, exporting the public certificate, and importing it into a client truststore for trusted connections.
Explore simple authentication and authorization with circuit security, leveraging Spring Security concepts, and learn how circuit metadata and dependencies fit into the setup.
Expose a bean to wire the current user into the rsocket message handler and configure an authentication principal argument resolver to access user details mono.
Enable reactive method security and apply pre authorize annotations to restrict access by role, wiring a security map and validating admin versus user access.
Build reactive microservices with rSocket and web flex by creating a stock service that emits prices, a user service with cache management, and a trading service for buy-sell flows.
Create a stock service that emits stock tick data for Amazon, Apple, and Microsoft every two seconds, updating prices with volatility to generate continuous price streams.
Implement a reactive user service for management using spring rsocket, exposing get all users, get by id, create, update, and delete operations with flux and mono streams and dto mapping.
Create a reactive user transaction service that processes credit and debit requests, validates users and balances, updates balances via transform, persists changes, and returns a completed or failed transaction response.
Create a user transaction controller, wire the transaction service, and map messages to user.transaction. Use mono and flatMap to pass a transaction request to the service and return the response.
Apply crud operations with the requester by implementing create, update, and delete user actions as the assignment, after reviewing the get operation, and refer to the next lecture if unsure.
*** Course Project updated for latest Spring Boot 3.2 ***
Welcome to the world of Reactive Socket (rSocket), the blazing-fast binary protocol that has gained significant popularity in recent years, particularly thanks to Netflix. With rSocket, you can develop fully non-blocking asynchronous Microservices while leveraging the power of Reactive-Streams support for client and server communication.
Why choose rSocket?
Enhanced Performance: Operating at layer 5/6, rSocket proves to be considerably faster than traditional HTTP, which operates at network layer 7.
Persistent TCP Connection: rSocket utilizes a persistent TCP connection, allowing bidirectional communication where the server can also call the client.
Reactive Streams Support: Benefit from non-blocking and asynchronous communication between client and server applications through the use of Reactive Streams.
Versatile Interaction Models: Alongside the standard Request-Response model, rSocket offers various interaction models tailored to different use cases.
In this course, you will delve into the intricacies of rSocket, exploring its features and unlocking its potential. You will gain hands-on experience with Spring Integration, rSocket routing, and various interaction models. Topics covered include connection setup, managing connections, cancellation, application flow control, error handling, SSL/TLS, authentication and authorization at both the connection and request levels, load balancing, and more.
Throughout the course, you will engage in practical exercises and real-world scenarios, including the development of microservices, CRUD applications, integration with Spring Data Reactive MongoDB, and the creation of a client-server game.
Join this course to master rSocket, harness its performance advantages, and gain the skills necessary to build high-performance reactive applications using the power of Java Reactive Programming.
Note: This course assumes a familiarity with Java and Reactive Programming concepts.