Skip to content

Profile updates stream further improvements #19981

Description

@jaywink

PR #19556 will add support for profile updates over legacy sync MSC4429, and an incoming pr will add MSC4262 for Sliding Sync. During the work on this feature, several points of concern have been raised on scalability, reliability and future proofing, especially regarding edge cases. In the interest of getting something usable ready, which also gives us data on usage, we're choosing to document and iterate on these points as follow-up.

This issue tracks solving those, in addition to tracking several items that were scoped out during the work on the initial profile updates delivery.

Concerns

While the implementation of #19556 has tried to ensure the data we push to clients is reliable, there are edge cases identified that we believe might a substantial rework of the Synapse implementation. This includes for example:

Scoped out items

  • We will need to add purging of profiles updates stream rows from the database, to avoid endless growth there. This was initially in the pull request but later extracted out (see Introduce support for MSC4429: Profile Updates for Legacy Sync #19556 (comment)) to iron out complexity there
  • We will need to adjust to match MSC4429 regarding deleted profile fields, see MSC4429: Profile Updates for Legacy Sync matrix-org/matrix-spec-proposals#4429 (review)
    • A branch has some wip code regarding this
  • We may want to add sync filtering by user ID, which was scoped out of the initial pull request
  • We may want to include profiles of rooms the user joins in the sync responses, as per MSC4429:
    • To bridge this gap, homeservers MAY communicate fields from a user's profiles to a client using the users.<user_id>.profile_updates /sync entry; even if those fields have not been updated recently. This may be useful if, for instance, a user has just joined a room with users that it hasn't seen before. The client should be able to display appropriate profile field information immediately without having to query the homeserver for each new user's profile.
  • Connection tracking of sent fields over a sliding sync connection was pulled out in the initial sliding sync pr due to performance concerns. The old branch is here, specifically from this commit onwards.

Other gotchas

Currently only local users get profile updates pushed into the profile updates stream. Federated users are tracked in MSC4259. We may want to consider not having support for federated users a blocker for enabling profile updates over sync on Matrix.org, for example.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions