Shukhratbek Mamadaliev
/ShuhratBek
shuhratbek.26@gmail.com
EPAM, Senior Software Engineer
Let's choose Architecture
Microservice Architecture
Serverless
Architecture
Diagram not found
Let's choose Communication
REST
Representational State Transfer
- human readable payload, not machine
- textual protocol, not binary
- serialize the data twice(send binary - encode Base64)
CONS:
WebSocket
- does not provide application-level backpressure, only TCP-based byte-level backpressure
- only provide framing, does not provide application semantics
CONS:
HTTP/2
- does not expose interaction models beyond request/response
- nor support application-level flow control
- designed for Browsers
CONS:
RSocket
PROS:
- binary
- wide interaction models
- framing
- application semantics
- application-level backpressure
- not tied to a specific transport
Application protocol
providing
Reactive Streams
semantics
Architectural patterns
Reactive Extensions (RX)
Use library
-
TCP
-
HTTP/2
-
Websocket
-
Aeron
Can be run over
0.2 (DRAFT)
=
1.0 RC
Version
Message Driven
Network communication is asynchronous.
Interaction Models
Fire-and-Forget
when a response is not needed
Future<Void> completionSignalOfSend = socketClient.fireAndForget(message);
Interaction Models
Request/Response (single-response)
Standard request/response semantics
Future<Payload> response = socketClient.requestResponse(requestPayload);
Interaction Models
Request/Stream (multi-response, finite)
allows multiple messages to be streamed back
Publisher<Payload> response = socketClient.requestStream(requestPayload);
Interaction Models
Channel
bi-directional, with a stream of messages in both directions
Publisher<Payload> output = socketClient.requestChannel(Publisher<Payload> input);
-
single-response vs multi-response
-
Bi-Directional
-
Cancellation
Behaviors
-
JAVA
-
JAVASCRIPT
-
.NET
-
C++
-
KOTLIN
You can use in
Examples
THANKS YOU!
rsocket
By Shuhratbek Mamadaliyev
rsocket
- 1,020