webrtc-broker

module
v0.0.0-...-8567bd0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2019 License: Apache-2.0

README

WebRTC message broker

Components

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.

Directories

Path Synopsis
cmd
internal
logging
Package logging ...
Package logging ...
testing
Package testing contains internal testing utilities
Package testing contains internal testing utilities
ws
Package ws contains websocket operations
Package ws contains websocket operations
pkg
authentication
Package authentication defines interfaces for coordinator and communication server authentication
Package authentication defines interfaces for coordinator and communication server authentication
broker
Package broker implements the actual webrtc broker
Package broker implements the actual webrtc broker
coordinator
Package coordinator contains the coordinator definition
Package coordinator contains the coordinator definition
protocol
Package protocol contains the communications protocol protobuffer definition
Package protocol contains the communications protocol protobuffer definition
server
Package server implements a basic webrtc server layer
Package server implements a basic webrtc server layer
simulation
Package simulation contains utilities for simulating clients
Package simulation contains utilities for simulating clients

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL