Reactive Socket aka rSocket is a binary protocol & one of the hottest technologies in the recent years from Netflix. It provides Reactive-Streams support for client and server communication. It enables us to develop fully non blocking asynchronous Microservices.
What are the advantages of using RSocket?
- RSocket is a binary protocol works at layer 5/6 – It is a lot faster compared to HTTP which works at network layer 7.
- RSocket uses Persistent TCP connection. (Server can also call Client)
- RSocket supports Reactive Streams. (non-blocking and asynchronous communication between client and server applications).
- Provides various interaction models along with standard Request and Response model.
RSocket Interaction Models:
- Request Response: Standard request and response model.
- Fire and Forget: Fire-and-forget is a request/response that is useful when a response is not needed. It allows for significant performance optimizations, not just in saved network usage by skipping the response, but also in client and server processing time as no bookkeeping is needed to wait for and associate a response or cancellation request. This interaction model is useful for use cases such as non-critical event logging.
- Request Stream: A single request which can produce multiple responses. For example Google Search – a single keyword search could result millions of search results. We can use Request Stream model to provide streaming responses to the caller. The caller can cancel responses at any time.
- Request Channel (Bi Directional Streaming): Client/Server or Server-to-Server interact with streaming requests and responses. We can develop Games!! We will develop one in this course.
What will you learn from this course?
By the end of this course, You would be comfortable with,
- Spring Integration
- RSocket Routing
- Various interaction models and its usage
- Connection setup
- Managing Connections
- Application Flow Control
- Disposing Connections
- Connection Retry
- Session Resumption
- Server Calling Clients
- Peer to Peer messaging
- Server calling client
- Error Handling
- Metadata Push
- SSL / TLS
- Connection Level Authentication and Authorization
- Request Level Authentication
- Load Balancing
- Server side
- Client Side
- A lot of hands on with Java Reactive Programming
- Developing Microservices
- Developing CRUD applications
- Integration with Spring Data Reactive MongoDB
- Client Server Game as Assignment
- Server Sent Events