MSC4519: MatrixRTC Transports Registry - #4519
Conversation
There was a problem hiding this comment.
Implementation requirements:
- Transports endpoint: client
- Transports endpoint: server
There was a problem hiding this comment.
This is effectively implemented by Synapse via MatrixRTC.
There was a problem hiding this comment.
- Server: Add MatrixRTC backend/services discovery endpoint element-hq/synapse#18967
- JS SDK: Implement _unstable_getRTCTransports for MSC4143 matrix-js-sdk#5104
- Element Call:
RtcTransportAutoDiscovery.ts - Element Web:
CallStore.fetchTransports
Note
When ran in widget mode, Element Call cannot yet use the /transports endpoint because the widget API doesn't expose access to it. This is covered by #4515.
|
|
||
| A new "MatrixRTC Transports" registry is created with the following information: | ||
|
|
||
| * A transport `type`. MUST be an [Opaque Identifier](https://spec.matrix.org/v1.19/appendices/#opaque-identifiers). |
There was a problem hiding this comment.
Currently this proposal says, "Types not in the registry are not permitted," but I hope that the spec could eventually make room for unregistered, proprietary transports which might not be suitable for making public. This seems easiest to manage if we recommend the Common Namespaced Identifier Grammar.
Previously we were recommending CNIG without the namespacing requirements so that we could still have an un-namespaced livekit as in this MSC, but I & others on the Element VoIP team would be interested in your judgement on whether it would be preferable to keep the namespacing requirement, if we say type uses CNIG.
There was a problem hiding this comment.
Explicitly supporting proprietary transports doesn't really fit the Guiding Principles in my opinion. We can support namespacing, but I would still probably keep the limitation that only registered types can be used, at least until Matrix itself has a transport type that's part of the core specification.
Without a core transport type in the spec we run the risk of only having proprietary transports, which defeats the purpose of this registry.
A later MSC can remove the condition easily enough without it being a breaking change.
There was a problem hiding this comment.
(leaving open for further opinions, but mentally considering resolved for now)
There was a problem hiding this comment.
would using m.livekit really be that bad?
There was a problem hiding this comment.
m.livekit is fine in isolation, but opening up the registry to have unregistered custom types I feel would be a mistake.
There was a problem hiding this comment.
I think we should switch to m.livekit because we already use the namespacing elsewhere in MatrixRTC (e.g. m.per_member) and we would probably want to allow extensibility at some point.
|
MSCs proposed for Final Comment Period (FCP) should meet the requirements outlined in the checklist prior to being accepted into the spec. This checklist is a bit long, but aims to reduce the number of follow-on MSCs after a feature lands. SCT members: please check off things you check for, and raise a concern against FCP if the checklist is incomplete. If an item doesn't apply, prefer to check it rather than remove it. Unchecking items is encouraged where applicable. MSC authors: feel free to ask in a thread on your MSC or in the#matrix-spec:matrix.org room for clarification of any of these points.
|
|
This FCP proposal has been cancelled by #4519 (comment). Team member @mscbot has proposed to merge this. The next step is review by the rest of the tagged people: Concerns:
Once at least 75% of reviewers approve (and there are no outstanding concerns), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for information about what commands tagged team members can give me. |
|
|
||
| A new "MatrixRTC Transports" registry is created with the following information: | ||
|
|
||
| * A transport `type`. MUST be an [Opaque Identifier](https://spec.matrix.org/v1.19/appendices/#opaque-identifiers). |
There was a problem hiding this comment.
would using m.livekit really be that bad?
| added when a new proposal is opened which introduce a transport. They by default have a `type` of `msc0000.{stable_type}`, | ||
| but MAY be extended upon per the MSC's "Unstable Prefix" section provided they maintain the `msc0000` | ||
| prefix. For example, if a proposal changes substantially after the registration was made, the proposal | ||
| might suggest using `msc0000.livekit.v2`. |
There was a problem hiding this comment.
Is there a benefit to customizing the prefixing rules like this other than making identifiers a little shorter? I would have expected that we'd just use the existing prefixing rules.
| * The author opens a spec PR to register the `msc4195.livekit` unstable type, using the MSC URL as | ||
| the specification reference (specifically the "Unstable Prefix" section/components). |
There was a problem hiding this comment.
The unstable transport is registered manually via a spec PR here but further up it says
[...]
unstabletransports are automatically added when a new proposal is opened which introduce a transport.
Having the registry change automatically as MSCs are opened worries me a little. I also wonder if we actually need to register unstable types in the registry at all? It feels like while something is not stable, it shouldn't land in the registry just like normal MSCs don't land in the spec either without being accepted?
That would also avoid the clean-up step 12 months after the transport became stable.
There was a problem hiding this comment.
Registries are outside of the spec, so they need their own mechanisms to track unstable prefixes.
| **Note**: If the MSC is detailed enough, a link to the rendered Markdown in the spec proposals repo | ||
| is probably suitable too. |
There was a problem hiding this comment.
Linking by SHA would be ok but linking by branch name (which is normally done for the [Rendered] links) would allow for further changes to the registry-spec without new MSCs. I think for stable transports, I'd prefer the registry to just contain the required spec text – just like the normal spec.
There was a problem hiding this comment.
I'm not following the concern here, sorry - linking to a branch name to get live updates is the desired behaviour.
There was a problem hiding this comment.
My concern is that the registry itself should be stable. It shouldn't change unexpectedly without a release. Anything that aims to enter the registry requires an MSC. While the MSC is unstable / unmerged, the MSC alone is sufficient to coordinate any early implementations. We don't need to track unstable transports in the registry – just like we don't track unstable features in the Matrix spec itself.
| ### Exception: MSC4195 | ||
|
|
||
| Because MSC4195 has been used to test the unstable implementation of MSC4143 and has no unstable | ||
| prefixes itself, `livekit` is registered as an unstable type instead of `msc4195.livekit`. When | ||
| MSC4195 becomes accepted, its type is to be upgraded to `stable` with relevant changes to the spec | ||
| link. No implementation changes would be required outside what they'd need to do to support MSC4143 | ||
| becoming stable itself. |
There was a problem hiding this comment.
Should this rather move into #4195? Otherwise both MSCs mutually depend on each other?
| The primary motivation for a registry is to allow transports such as [MSC4195](https://github.com/matrix-org/matrix-spec-proposals/pull/4195) | ||
| to land with relative stability, but without placing a dependency on LiveKit into the core spec. |
There was a problem hiding this comment.
The spec has some optional modules, this sentence along with the potential issue of there not being many RTC transports makes this feel like overkill to have this be a registry?
There was a problem hiding this comment.
Yeah, I think we need to improve the motivation a little. The concrete advantages of the registry I can currently think of are:
- Releasing transports is not dependent on the spec release cycle
This proposal doesn't currently clarify whether the registry will be released together with the spec or not though. See also https://github.com/matrix-org/matrix-spec-proposals/pull/4519/changes#r3813858452. - Transports can more easily be removed from the registry than from the main spec
Homeservers declare support for entire spec versions. Even if a feature is removed, servers often retain their implementations to be able to declare support for older spec versions. This came up as a concern when discussing the integration of the LiveKit transport with the Synapse team.
Having said that, I acknowledge the concern that we may not have a lot of transports, however. The transports the VoIP team at Element can foresee right now are:
- LiveKit (MSC4195)
This is the only one we have today. - A cascading SFU transport where users connect to their local SFU only and SFUs federate
@fkwp has made some explorations on this. It'll require a dedicated SFU implementation. If proven worthwhile, this would be an alternative (if not a full replacement) for the LiveKit transport. Currently, it seems likely that we'll work on this after Matrix 2.0. - A full-mesh transport where members connect to each other directly as in legacy VoIP
This would be an alternative for small calls without LiveKit. Currently, it does not seem overly likely that we'll work on this in the near future unless somebody sponsors it.
It's difficult to predict what transports other people might come up with though.
There was a problem hiding this comment.
Transports can more easily be removed from the registry than from the main spec
Homeservers declare support for entire spec versions.
I don't buy this. If we add a capability for them then just rip it out and mark it as unsupported via the capability.
There was a problem hiding this comment.
@erikjohnston is the main proponent for not putting LiveKit into the spec, so I'd appreciate talking points from him that can be included in this MSC.
|
@mscbot concern Unclear why this needs a registry instead of the normal spec process |
| # MSC4519: MatrixRTC Transports Registry | ||
|
|
||
| [MSC4143](https://github.com/matrix-org/matrix-spec-proposals/pull/4143) describes the framework for | ||
| Real-Time Communication (RTC) applications to operate over Matrix. The MSC also allows for alternate |
There was a problem hiding this comment.
Not really 'alternate': it needs a transport to work at all.
There was a problem hiding this comment.
…which does somewhat conflict with the registry msc's requirement that only optional functionality be in registries… I suppose it's optional in that you don't have to implement all of them, even if you have to implement one?
There was a problem hiding this comment.
"alternate" is in contrast to the specified transport itself, if any. We don't currently have that, so this might be confusing.
| ## Security considerations | ||
|
|
||
| Individual transports are expected to have their own security considerations. The presence of a | ||
| registry does not carry inherent security challenges, per MSC4518. |
There was a problem hiding this comment.
I would argue that they very much do since they offer a way for protocol to become spec with little or no review.
There was a problem hiding this comment.
The review requirements are the same as any other MSC, so I'm not sure that holds true. It's also not a Security Consideration, but would rather be a Potential Issue.
There was a problem hiding this comment.
If a transport is added to the registry as soon as an MSC is created for it, doesn't that mean it's fair game to start using it as soon as you've created an MSC, regardless of whether anyone has looked at the MSC?
| * Stability (`stable` or `unstable`). | ||
| * A link to the specification for that transport, per MSC4143. | ||
|
|
||
| `stable` transports are added/changed/removed through normal MSCs. `unstable` transports are automatically |
There was a problem hiding this comment.
I have to admit I'm somewhat struggling with what the MSC really achieves since clients could implement an open MSC today, so this feels like just a way to bypass the review process, but then isn't that process there for a reason?
There was a problem hiding this comment.
With the idea that registries exist outside of the spec, we need to define the process by which the registry is updated/used. This includes defining how unstable types are reflected in the proposed endpoint and how experimental implementations are worked on. Without automatic registration, we'd need 2 MSCs before implementations could start using a new transport: one to define the transport (already required) and another to add that to the registry.
There was a problem hiding this comment.
Well my point is that if there was no registry, you could just create the MSC and then start using it unstable-prefixed as we do now?
| // GET /_matrix/client/v1/rtc/transports | ||
| // 200 OK | ||
| { | ||
| "rtc_transports": [ |
There was a problem hiding this comment.
We should rename this to just transports for parity with the m.rtc.member events from #4143.
|
This MSC is being removed from the Matrix 2.0 scope, so is being removed from FCP too. @Johennes - the @mscbot fcp cancel See this post in the SCT Office for more information. |
Rendered
SCT Stuff:
MSC checklist
FCP tickyboxes