This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Implement updated spaces summary API #10495
Closed
Description
MSC2946 was recently rewritten based on some changes in design and lessons learned during initial implementation. We need to implement the changes and test them, etc.
The main design changes are:
- The API now has a
max_depth
instead of amax_rooms_per_space
. - The API now has pagination (controlled via
limit
andfrom
in the requests andnext_token
in the response). - The responses now embed the child events with the room.
- The server-server API is significantly different.
This is enough changes that I think we'll need to add new API endpoints / handlers for this code. I think we're going to want to keep backwards compatibility (for at least a few releases) so can't quite get rid of the old code yet. This will be a bit annoying, but should get cleaned up when we switch to the stable version.
I think some rough steps of what we'll want to do are:
- Refactor some of the existing code.
- Implement a version without federation (but with pagination) using in-memory storage.
- Hook up federation APIs to fetch unknown rooms.
- Handle any pending TODOs.
- Handle persisting to the database (for multiple workers).
- Expire old persisted data.
- Explore caching of requests made over federation.
- Attempt to fetch from the old federation APIs and translate.
-
Explore whether pagination tokens can be shared between users (with results cached / reused).