-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Reduce confusion between topological and stream position tokens (SPEC-268) #125
Comments
Jira watchers: @richvdh |
I floated one idea, which was to make However, on further consideration, even if we did allow -- @richvdh |
So should we just rename the -- @richvdh |
A decision on this has been deferred pending figuring out where we want to go with topo tokens and stream tokens in general (and whether it makes sense to support topo tokens in the C-S API at all) -- @richvdh |
Also, at least synapse accepts a stream position token in |
The client-server API has two types of position identifiers, representing two views of the ordering of events:
A topological position only makes sense within the context of a particular room, and refers to a particular point on the event DAG. The events between two topo tokens are subject to change, as the DAG changes over time.
A stream position is a global identifier across all rooms, and refers to a point on the timeline of when the server received the event (which may be wildly different to where it fits on the graph, or where it happened in a different server's timeline).
/sync
returns events in the stream timeline order, and takes a stream position token as a 'since' parameter./room/<x>/messages
works in the topological timeline order, and takes a topological token as a 'from' parameter.It's easy to misunderstand what one can do with these tokens. In particular,
/sync
currently returns:next_batch
: a streaming token from which streaming can be resumed next timerooms.x.timeline.prev_batch
: a topological token. The idea is that you can back-populate from here.We should do our best to reduce the confusion by making sure that we have a consistent set of names which make it clear what sort of token is expected.
(Imported from https://matrix.org/jira/browse/SPEC-268)
(Reported by @richvdh)
The text was updated successfully, but these errors were encountered: