matrix-org / matrix-org/matrix-spec
/sync could take a `to` as well as `since` param, to help with splicing together /sync streams.
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
If I have a client which runs a background /sync stream to keep up-to-date, it could be useful to have parallel /sync streams (perhaps with different levels of detail via filtering) which need to be spliced into the bg stream in order to merge a shortlived fg stream with the ongoing bg stream without a race.
This could be useful in hybrid initial sync (where we do a high-detail sync of foregrounded rooms in parallel with a low-detail background sync of all rooms) - currently we propose interrupting the background sync in order to sync the fg room, and then resume it again. Whereas this could let the fg sync be merged with the bg sync once complete.
This could also be useful in a daemon like pantalaimon which maintains a bg /sync stream on behalf of multiple clients, but needs to splice individual client /sync responses into the bg stream (and so hand the common 'live' stream over to the clients).
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
Start with the /sync protocol behavior described in this issue, especially the existing since parameter and the proposed to parameter. Work through the hybrid initial-sync and Pantalaimon splicing cases, then define the semantics and edge cases for bounded streams. Done means the specification clearly documents the behavior and how parallel /sync responses can be merged without a race.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100