Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/decentraland/webrtc-broker
🔌WebRTC message broker
https://github.com/decentraland/webrtc-broker
Last synced: 3 months ago
JSON representation
🔌WebRTC message broker
- Host: GitHub
- URL: https://github.com/decentraland/webrtc-broker
- Owner: decentraland
- License: apache-2.0
- Created: 2018-11-15T19:59:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-29T19:53:25.000Z (about 5 years ago)
- Last Synced: 2024-10-15T02:03:09.637Z (4 months ago)
- Language: Go
- Homepage:
- Size: 496 KB
- Stars: 29
- Watchers: 8
- Forks: 11
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pion - decentraland/webrtc-broker - WebRTC message broker (DataChannel)
README
# WebRTC message broker
## Components
![](docs/diagram.png?raw=true)
### Clients
The whole point of this system is to provide connectivity to the clients. The clients connect to a single communication server after credentials negotiation with the Coordinator Server.
### Coordinator Server
The coordinator server is the key entry point of our communications system.
- It exposes a WS endpoint for the clients to negotiate the communication with the communications server
- Caveat: It’s very important to notice the coordinator server will choose a communication server randomly, which means all communication servers should be equivalent to each other. That is, a client connected to a cluster, should have a consistent latency no matter which communication server he ends connecting to.
- It exposes a WS endpoint for the communication servers to
- Negotiate connections with the clients
- Discover other communications server in the cluster### Communication server
The communications server is the heavy lifter of the system.
- It connects to the Coordinator Server via WS and uses this connection to discover other servers and negotiate client connections
- Every communication server may be connected to clients and
- It relays packets from the clients to other clients
- It relays packets to all the connected servers
- It handles the business logic of the packets (topics, etc)
- It has to keep the WS connection alive, always. If the connection is closed, it has to retry until success.