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

Spec lazy-loading room members #2035

Merged
merged 19 commits into from
Jun 11, 2019
Merged

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented May 28, 2019

Reviewers: Although this has team review requested, I would appreciate particular review from @ara4n as the proposal author and @KitsuneRal as having gone through the gauntlet. Feedback in addition is more than appreciated.

Disclaimer: Although the implementation is lacking in areas (see below), it is believed by the spec core team that lazy-loading has enough benefits to be added to the spec, as per the MSC guidelines.


Implementation references:

Notable lacks of implementation:

Spec references:

Alterations from the proposals:

  • The MSCs are unclear of what scope "redundant" is defined under. Written as "across any of the supported endpoints".
  • Clarification that servers and clients should be careful when dealing with historical data. Unsure how Synapse/Riot handle this, if at all.
  • Unclear if summary should be required. The implementation only does so when lazy-loading is active, however this seems like a bug. Written as required so that clients can use m.heroes to name the room.

(note: due to these proposals being older Google Doc MSCs, they have had the alterations described here represented in the applicable threaded comments instead of the body of the proposal. This is to hopefully more clearly represent the changes.)

The options also work on /messages
Note: This makes assumptions on what the TODO comment in Synapse means: https://github.com/matrix-org/synapse/blob/e26e6b3230f0b55376f0f3bf823dd789ac7064d0/synapse/handlers/pagination.py#L262

Due to lack of implementation, it is assumed that using the same filter across multiple calls to /sync OR /messages will result in the redundant members being excluded in the next request. For example, calling /sync, then /messages which returns some members, then /sync again will exclude the members due to them being in /messages.
@turt2live turt2live added the Matrix 1.0 Spec PRs that need review for 1.0 label May 29, 2019
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

generally looks good. I'm a bit hazy about some of this stuff though :/

specification/client_server_api.rst Show resolved Hide resolved
api/client-server/event_context.yaml Outdated Show resolved Hide resolved
api/client-server/message_pagination.yaml Outdated Show resolved Hide resolved
api/client-server/rooms.yaml Show resolved Hide resolved
api/client-server/sync.yaml Outdated Show resolved Hide resolved
Information about the room which clients may need to
correctly render it to users.
properties:
"m.heroes":
Copy link
Member

Choose a reason for hiding this comment

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

are these properties not required ?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, because if they are omitted then the client should interpret it as "no change".

specification/client_server_api.rst Outdated Show resolved Hide resolved
api/client-server/definitions/room_event_filter.yaml Outdated Show resolved Hide resolved
specification/client_server_api.rst Outdated Show resolved Hide resolved
specification/modules/instant_messaging.rst Outdated Show resolved Hide resolved
@turt2live turt2live requested a review from richvdh June 7, 2019 14:28
api/client-server/message_pagination.yaml Outdated Show resolved Hide resolved
api/client-server/message_pagination.yaml Outdated Show resolved Hide resolved
api/client-server/message_pagination.yaml Outdated Show resolved Hide resolved
specification/client_server_api.rst Outdated Show resolved Hide resolved
api/client-server/sync.yaml Outdated Show resolved Hide resolved
api/client-server/sync.yaml Outdated Show resolved Hide resolved
api/client-server/sync.yaml Outdated Show resolved Hide resolved
specification/client_server_api.rst Outdated Show resolved Hide resolved
specification/client_server_api.rst Outdated Show resolved Hide resolved
specification/client_server_api.rst Outdated Show resolved Hide resolved
Co-Authored-By: Richard van der Hoff <[email protected]>
api/client-server/sync.yaml Outdated Show resolved Hide resolved
@turt2live turt2live requested a review from a team June 10, 2019 19:03
@turt2live
Copy link
Member Author

Shoving this back into the queue to get a checkmark (hopefully) from someone on the team. There's a few people who have reviewed this, so picking on someone isn't super obvious.

@ara4n
Copy link
Member

ara4n commented Jun 10, 2019

i'm happy with it from my pov fwiw, but i guess my rewrite needs some review if someone can face it.

@turt2live
Copy link
Member Author

arguably this is fine to merge as I reviewed your edits, but I think a third opinion would be good given the amount of review on here.

@ara4n
Copy link
Member

ara4n commented Jun 11, 2019

let's just merge it.

@turt2live turt2live merged commit 19f017f into master Jun 11, 2019
@turt2live turt2live deleted the travis/1.0/msc688-msc1227-lazy-loading branch June 11, 2019 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Matrix 1.0 Spec PRs that need review for 1.0
Projects
None yet
6 participants