Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tripolskypetr/node-redis-grpc-stream-queue
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.
https://github.com/tripolskypetr/node-redis-grpc-stream-queue
benchmark fault-tolerant fault-tolerant-microservices grpc in-memory nodejs playwright queue realtime redis redis-cache streaming stress-testing tests websocket
Last synced: about 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/tripolskypetr/node-redis-grpc-stream-queue
- Owner: tripolskypetr
- License: mit
- Created: 2024-12-05T13:13:26.000Z (2 months ago)
- Default Branch: master
- Last Pushed: 2024-12-11T13:55:48.000Z (about 2 months ago)
- Last Synced: 2024-12-11T14:31:17.678Z (about 2 months ago)
- Topics: benchmark, fault-tolerant, fault-tolerant-microservices, grpc, in-memory, nodejs, playwright, queue, realtime, redis, redis-cache, streaming, stress-testing, tests, websocket
- Language: TypeScript
- Homepage: https://github.com/react-declarative/react-declarative
- Size: 12.8 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔥 node-redis-grpc-stream-queue
> 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.
![schema](./assets/schema.png)
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
## Benchmark
> After setting up all the following test cases you can use the Playwright benchmark
![playwright-benchmark](./assets/playwright-benchmark.gif)
**Running**
```bash
npm run install:playwright
npm run test
```## Test case 1: console-grpc-streaming
> Console apps which stream events to each other through gRPC (**console**)
![grpc-queue](./assets/grpc-queue.gif)
**Setup**
```bash
npm install
npm run build
cd modules/remote-redis/docker
docker-compose up -d
```**Running**
```bash
npm run start:msg-client
npm run start:msg-server
```## Test case 2: sse-grpc-streaming
> HTTP/2 Server-Sent Events frontend app which recieves messages from gRPC service (**Require HTTPS**)
![sse-queue](./assets/sse-queue.gif)
**Setup**
```bash
npm install
npm run build
mkdir ssl
cd ssl
mkcert localhost # choco install mkcert
cd modules/remote-redis/docker
docker-compose up -d
```**Running**
```bash
npm run start:msg-server
npm run start:host-sse
npx -y open-cli https://localhost
```## Test case 3 ws-grpc-streaming
> WebSocket frontend app which recieves messages from gRPC service (**HTTPS/HTTP**)
![ws-queue](./assets/ws-queue.gif)
**Setup**
```bash
npm install
npm run build
cd modules/remote-redis/docker
docker-compose up -d
```**Running**
```bash
npm run start:msg-server
npm run start:host-ws
npx -y open-cli http://localhost
```