Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC4018: Reliable call membership #4018

Closed
wants to merge 2 commits into from

Conversation

robintown
Copy link
Member

@robintown robintown commented May 19, 2023

@robintown robintown added proposal A matrix spec change proposal client-server Client-Server API kind:feature MSC for not-core and not-maintenance stuff needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. labels May 19, 2023
@robintown robintown changed the title MSCXXXX: Reliable call membership MSC4018: Reliable call membership May 19, 2023
@turt2live turt2live added kind:maintenance MSC which clarifies/updates existing spec voip and removed kind:feature MSC for not-core and not-maintenance stuff labels May 19, 2023
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems nice & simple. Could potentially mention that homeservers would have a delay of presumably a few seconds of not having a stream for a device before deleting that device's member state, since it will just be one sync request followed by another rather than, for example, a websocket connection.

@robintown robintown marked this pull request as ready for review May 24, 2023 13:59
Comment on lines +19 to +24
Since homeservers are less likely to go offline unexpectedly than clients, we propose that homeservers should manage
call member state on behalf of clients. If a user's device goes offline (i.e. disconnects from all event streams), the
homeserver should update the `m.devices` lists of any `m.call.member` state associated with that user, to remove entries
with a matching `device_id`.

To facilitate atomic updates to call member state, we also propose two new CS API endpoints:
Copy link

@toger5 toger5 May 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a list of questions that were not immediately clear to me while reading the msc:
Who would be the sender in the m.call.member state event?
Would it still be possible to update the state event using the regular room state event PUT endpoint?
Can there be any conflicts between manual updates from clients and updating the room state using the proposed endpoint. If so would it make sense to mention, that the homeserver has to reject any manual state update using m.call.member ?

@axelsimon
Copy link

This looks straightforward enough, but we might want to consider more in detail what happens if a homeserver goes offline, as this could easily become a large issue in P2P Matrix.

@toger5
Copy link

toger5 commented Nov 29, 2023

Reding through this again I think the scope of this MSC should be bigger.
Introducing new endpoints for updating the membership, allows us to never grant any user permission to update m.call.member state events. Instead the HS will update those using the additional endpoints.
This frees us from the necassity of using the key = user_id permission system.

We could use keys of the format: $user_id/$device_id which are all handled by the HS.
This would make things much more efficient/simple (especially considering aggreagting sessions), since we dont update the whole state event with multiple memberships anymore but instead only update the data that is actually assocaited with the membership.

Comment on lines +14 to +15
participant's connectivity and acts as the source of truth for who's on the call. In Matrix, the closest thing we have
is a homeserver.
Copy link

@toger5 toger5 Jan 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even closer would be the SFU itself.
What do you think about the following idea:
The homeserver issues a token to update the memberships for one membership id. The client can then share this token with the SFU or hold it to itself.
In case its shared with the sfu, the sfu will update the homeserver on any membership changes (disconnects).

For the fullmesh case the client keeps the token to itself and uses it directly to disconnect.

If the client disconnects from the homeserver directly the homeserver will disconnect this participant independent of whether an explicit disconnect was sent.
(With the rational that a matrixRTC session only works if the user is also connected to matrix: for crypto and other matrixRTC applications that rely on both: matrix + matrixRTC updates at to work properly)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may have implications for anyone hoping to run a matrix homeserver in a "serverless" configuration.

@robintown
Copy link
Member Author

This MSC has been replaced by MSC4140: Cancellable delayed events!

@robintown robintown closed this Sep 13, 2024
@turt2live turt2live added the obsolete A proposal which has been overtaken by other proposals label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client-server Client-Server API kind:maintenance MSC which clarifies/updates existing spec needs-implementation This MSC does not have a qualifying implementation for the SCT to review. The MSC cannot enter FCP. obsolete A proposal which has been overtaken by other proposals proposal A matrix spec change proposal voip
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants