matrix-org / matrix-org/waterfall

Handle conferences in parallel and clean them up properly

Open
#129 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

T-Task
Dominant language
Go
Stars
105
Forks
5
PR merge metrics
No merged PRs in 30d

Description

Currently, incoming To-Device messages are handled sequentially. We use an unbounded channel to send messages to the conference. This means that we block when we send a message to the conference until the conference reads the message. This is not very good from the scalability point of view as it means that when we have multiple conferences, the slowness of a single of them would affect handling To-Device messages for others.

Also, currently, we only listen on the `done` channel from the conference coupled with sending the message. This means that we'll detect that the conference is over only when we try to attempt to send a new message. That might be a bit too late, so it would be better to listen to the `done` channel for each conference so that we can remove the conference form the map in the router once it's over.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the Go code that routes incoming To-Device messages to conferences and maintains the conference map. Start by examining how messages and each conference's done channel are handled; done means conferences can be processed independently and are removed from the router map as soon as they finish, without one slow conference blocking others.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
audio-video-rtc, backend, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.