Skip to content

rafaelcoelho/rsocket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A POC upon RSocket interaction models Stream/Channel

A RSocket protocol stream POC in order to evaluate async/reactive services communications

Technology

Based on RSocket SPI from Spring Framework

Server

The server is in charge to receive the request from client and stream out based on interval of one second.

To start the server prompt from command line

@ cd server
$ ./mvnw clean package spring-boot:run -DskipTests=true

Client

The client support two kinds of iteration mode:

  1. Spring command line using directly the terminal
  2. REST Endpoints

From command line

To start the client prompt from command line

@ cd client
$ ./mvnw clean package spring-boot:run -DskipTests=true

From Rest Endpoints

There are the following endpoints that will consume the provider RSocket to reach out the MongoDB

Endpoint MediaType Interaction Mode
http:https://localhost:8080/order/stream text/event-stream Stream
http:https://localhost:8080/order/stream/monitor/{orderId} text/event-stream Stream
http:https://localhost:8080/order/{orderId} application/json Request-Response

Docker support

The build can be done to use the built in (requires Docker) plugins that will generate docker images, in order to use that prompt from terminal:

@ cd {project_moduel}
$ ./mvnw spring-boot:build-image -DskipTests=true
$ docker run -p 8080:8080 {image}

Proto Buffer Support

Further details from Protobuff

The PB compiler can be download from Maven Central and have to copied to ${BASE_DIR_REPO}/server/src/main

First compile the proto file

From terminal execute

$ protc --java_out=java resources/Order.proto

Goal

Measure the latency between services communications as well as security and resource consumption when using channel/stream interaction models.

CI

Based on GitHub Actions towards client and server that will be enforced by CI when open a PR to master branch.

Collaboration

Please fell free to open a PR that will be very welcome.

License

MIT

About

A POC upon RSocket Protocol

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages