A cascading stream forwarding unit for scalable, distributed voice and video conferencing over Matrix
  • Go 98.2%
  • Nix 0.9%
  • Dockerfile 0.7%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Abramov 3f3c78e83d
Merge pull request #150 from matrix-org/generic-implementation
matrix: generalise signaling functions
2023-04-27 19:16:54 +02:00
.github code-style: add line feed at file end, fix comment 2023-01-16 18:58:43 +01:00
cmd/sfu telemetry: activate telemetry if config provided 2023-03-21 19:42:08 +01:00
doc set up: no need anymore to register device keys for SFU (#122) 2023-02-02 13:04:16 +01:00
pkg matrix: generalise signaling functions 2023-04-26 23:15:34 +02:00
scripts unit-tests: build unit test setup 2023-01-16 18:58:43 +01:00
.gitignore structure: move main file from pkg to cmd folder 2023-01-16 18:58:43 +01:00
.golangci.yaml refactor: renaming modules and functions names 2022-12-05 17:48:02 +01:00
config.sample.yaml telemetry: add support of OTLP protocol 2023-03-21 20:42:33 +01:00
docker-compose.yaml telemetry: add support of OTLP protocol 2023-03-21 20:42:33 +01:00
Dockerfile track: detect stalled publishers and switch layer 2023-04-03 14:45:42 +02:00
flake.lock Reproduceable builds with Nix 2022-12-21 16:23:14 -05:00
flake.nix structure: adjust nix flake for new main path 2023-01-16 18:58:43 +01:00
go.mod track: detect stalled publishers and switch layer 2023-04-03 14:45:42 +02:00
go.sum telemetry: add support of OTLP protocol 2023-03-21 20:42:33 +01:00
gomod2nix.toml Update gomod2nix lock file 2023-01-11 09:41:33 -05:00
LICENSE apache license 2022-06-02 21:50:48 +01:00
README.md set up: Rename the sample config 2023-01-31 14:44:42 +01:00

Waterfall

Why

Waterfall is a cascaded, decentralised SFU. The intention is to be a implementation of Matrix's MSC3898: Native Matrix VoIP signalling for cascaded foci (SFUs, MCUs...). This example is self contained and doesn't require any external software. The project was informed by the following goals.

  • Easy Scaling - SFU count can be grown/shrunk as users arrive. We don't scale on the dimension of calls making things easier.
  • Shorter Last Mile - Users can connect to SFUs closest to them. Links SFU <-> SFU are higher quality then public hops.
  • Flexibility in WebRTC server choice - All communication takes place using standard protocols/formats. You can use whatever server software best fits your needs.
  • Client Simplicity - Clients will need to be created on lots of platforms. We should aim to use native WebRTC features as much as possible.

This project is at an early stage and implements the MSC only roughly - given the current experimental nature of this projects, it deviates in certain areas from the MSC.

How

Configuration

  • cp config.sample.yaml config.yaml
  • Fill in config.yaml

Running

Profiling

Building

Docker

Building docker image

In order to build a docker image, run the following in the root directory:

$ docker build . -t matrix/waterfall

Running docker image

Easy Way

Just use docker-compose up and you're good to go.

Or docker-compose up -d if you're running it on a server in a detached state.

You can then find your container ID by checking docker container ls.

Which could then be used to e.g. check the container logs with docker container logs <ID>.

If you're developing locally, you can replace the path to the image with your own image tag, e.g. matrix/waterfall.

Hard Way

To run the image from the current directory assuming that there is a config.yaml:

docker run \
    -v $(pwd)/config.yaml:/config.yaml \
    --network host \
    -it --rm matrix/waterfall \
    sfu --config config.yaml

Element Call with SFU locally

You can find an example for a local VoIP setup with Element Call and SFU here: local environment setup