Enables reliable bidirectional gRPC streaming with automatic retries, message queuing, error handling, and logging, supporting real-time communication between distributed services in a robust and fault-tolerant manner.
While the server or the client offline, the message buffering to the queue. After reconnect, all of them will be senden in the order of emit. The architecture expect each part of the chain can be restarted separately. Also, when you need, that software design allows to attach the queue to the Redis which will make system to restore it's state even after complete shut down
After setting up all the following test cases you can use the Playwright benchmark
Running
npm run install:playwright
npm run test
Console apps which stream events to each other through gRPC (console)
Setup
npm install
npm run build
cd modules/remote-redis/docker
docker-compose up -d
Running
npm run start:msg-client
npm run start:msg-server
HTTP/2 Server-Sent Events frontend app which recieves messages from gRPC service (Require HTTPS)
Setup
npm install
npm run build
mkdir ssl
cd ssl
mkcert localhost # choco install mkcert
cd modules/remote-redis/docker
docker-compose up -d
Running
npm run start:msg-server
npm run start:host-sse
npx -y open-cli https://localhost
WebSocket frontend app which recieves messages from gRPC service (HTTPS/HTTP)
Setup
npm install
npm run build
cd modules/remote-redis/docker
docker-compose up -d
Running
npm run start:msg-server
npm run start:host-ws
npx -y open-cli http://localhost
npm install -g pm2
pm2 start ./ecosystem.config.js
npx -y open-cli http://localhost
pm2 stop msg-server
pm2 start msg-server
pm2 kill