-
Notifications
You must be signed in to change notification settings - Fork 418
MSC2391: Federation point-queries. #2391
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
Open
tulir
wants to merge
2
commits into
matrix-org:old_master
Choose a base branch
from
matrix-construct:jevolk/fed_state__point_queries
base: old_master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # MSC2391 - Efficient point-queries for Room state over Federation | ||
|
|
||
| The principal method for obtaining Matrix Room state over Federation is | ||
| specified in Server-to-Server r0.1.3 §10.1 and §10.2. These two | ||
| endpoints `/state/` and `/state_ids/` respectively, both conduct bulk transfers | ||
| of the entire state of a room. The state of a room in Matrix can be lumbering | ||
| for implementations to process entirely at once. Worse, in practice, these | ||
| endpoints mostly transfer data which is redundant to copies held by the | ||
| requestor, or far too much data than they cared to obtain in the first place. | ||
|
|
||
| The federation interface lacks an essential granular alternative to these | ||
| methods. Interestingly, the client-to-server interface is capable of conducting | ||
| point-queries for room state (see: client-to-server r0.6.0 §9.5.1 and §9.5.2) | ||
| so we are compelled to approach the following solutions as a reduction from | ||
| the client-to-server interface. | ||
|
|
||
| ##### GET `/_matrix/federation/v1/state/{roomId}/{eventType}/{stateKey}` | ||
|
|
||
| We specify an endpoint capable of querying state at a cellular level over | ||
| Federation using `(eventType,stateKey)` arguments. All other parameters, | ||
| response format, and error conditions are inherited from server-to-server | ||
| §10.1. | ||
|
|
||
| ##### GET `/_matrix/federation/v1/state/{roomId}/{eventType}` | ||
|
|
||
| We specify an endpoint capable of querying state at a class level over | ||
| Federation using `(eventType)` arguments. All other parameters, | ||
| response format, and error conditions are inherited from server-to-server | ||
| §10.1. | ||
|
|
||
| #### Analysis | ||
|
|
||
| Efficient room state queries over federation provide an essential foundation | ||
| to implement MSC1769, MSC2390, and countless others. For example, | ||
| `GET /_matrix/federation/v1/state/!@jason:zemos.net/m.user.profile/avatar_url` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this have a "Security Considerations" heading? I think that this MSC trusts other servers too much for something like this, as you then effectively trust other servers to not give you bogus state events.