Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kristoff-it/simple-websocket-chat
Simple websocket chat demo that uses Redis Pub/Sub for horizontal scaling
https://github.com/kristoff-it/simple-websocket-chat
Last synced: 2 days ago
JSON representation
Simple websocket chat demo that uses Redis Pub/Sub for horizontal scaling
- Host: GitHub
- URL: https://github.com/kristoff-it/simple-websocket-chat
- Owner: kristoff-it
- License: mit
- Created: 2020-04-22T17:19:33.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-05-30T08:22:17.000Z (over 3 years ago)
- Last Synced: 2024-10-24T15:24:08.011Z (19 days ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-websocket-chat
Simple websocket chat demo that uses Redis Pub/Sub for horizontal scaling.## Requirements
- A running Redis instance.## Usage
Install the dependences (`npm install`) and then just run the server process as follows:`$ node src/server.js 8080`
The server will prompt you to connect to a specific URL that will provide the client HTML
interface. By modifying the URL you can authenticate as different users.Try to spin up multiple instances of the chat server and look how all clients will still
be able to communicate even if connected to different processes.## Redis Pub/Sub Multiplexing
This example uses [RedisMPX](https://github.com/RedisMPX/) to orchestrate efficiently multiple listeners on top a single Redis Pub/Sub connection.