matrix-org / matrix-org/waterfall
Proper handling of outgoing data channel messages (buffering, large messages)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 105
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
It looks like sending a message on a data channel is a blocking operation (due to the I/O involved in it), in my non-scientific tests it turned out that sending a message on a data channel may sometimes take 30ms. That's not a problem in the majority of cases, but when the conference gets large and participants exchange messages over the data channel, it can delay the processing of the incoming To-Device messages significantly.
UPD:
- Blocking is not an issue in the majority of the cases and only starts slowly hitting us when we go over 50 participants in the session.
- The main culprit is the data channel here, or to be more precisely, large messages on a data channel: https://github.com/matrix-org/waterfall/issues/133#issuecomment-1456157309
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by tracing the outgoing data-channel send path and its interaction with incoming To-Device message processing; reproduce the delay with large messages and sessions exceeding 50 participants. Done should mean outgoing messages are buffered appropriately and large sends no longer significantly delay incoming processing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- audio-video-rtc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100