Files
matrix-rust-sdk/labs
Ivan Enderlin be404f6666 feat(sdk): Subscribe to many rooms only via Sliding Sync.
This patch changes the `SlidingSync::subscribe_to_room` method to
`subscribe_to_rooms`. Note the plural form. It's now mandatory to
subscribe to a set of rooms. The idea is to avoid calling this method
repeatedly. Why? Because each time the method is called, it sends a
`SlidingSyncInternalMessage` of kind `SyncLoopSkipOverCurrentIteration`,
i.e. it cancels the in-flight sliding sync request, to start over with
a new one (with the new room subscription). A problem arises when the
async runtime (here, Tokio) is busy: in this case, the internal message
channel can be filled pretty easily because its size is 8. Messages
are not consumed as fast as they are inserted. By changing this API:
subscribing to multiple rooms will result in a single internal message,
instead of one per room.

Consequently, the rest of the patch moves the `subscribe` method of
`room_list_service::Room` to `room_list_service::RoomListService`
because it now concerns multiple rooms instead of a single one.
2024-08-09 11:58:59 +03:00
..
2022-12-15 16:48:55 +01:00

Experiments

This directory contains experiments, work-in-progress crates, or other code and documentation, that do not fall under the same stability guarantees as the main crates (matrix-sdk, matrix-sdk-crypto, etc.).

Lab projects might be abandoned and possibly removed at any time.


That said, this directory is meant to freely explore unconventional or interesting ways the Matrix Rust SDK can evolve, feel free to propose an experiment.

Current experiments

  • multiverse: a TUI client mostly for quick development iteration of SDK features and debugging. Run with cargo run --bin multiverse matrix.org ~/.cache/multiverse-cache.

Archived experiments

Link to PR that deleted the experiment from the repo, newest first: