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

Provide a way to make message order explicit when sending (rather than assuming that /send updates the DAG before returning) #260

Open
ara4n opened this issue Nov 4, 2017 · 1 comment
Labels
A-Client-Server Issues affecting the CS API feature Suggestion for a significant extension which needs considerable consideration

Comments

@ara4n
Copy link
Member

ara4n commented Nov 4, 2017

In other words, if you do a /send which returns a 200 OK and immediately do another /send, does the spec guarantee ordering such that the second follows the first in the DAG? Or is there any risk that they will end up with the same parent node in the DAG? If the latter, how are we ever meant to get consistent ordering for a given client?

If the spec guarantees that the HS's copy of the room DAG is updated before it returns 200 OK, we should presumably spell it out in the spec.

@ara4n
Copy link
Member Author

ara4n commented Nov 4, 2017

Having briefly conferred with @erikjohnston, it sounds like the design is deliberately to not force HS nodes to linearise the DAG every time they receive a message (letting things fan out across multiple nodes instead).

So, it seems like instead we're missing an API to let /send state which event a given event is intended to follow. The HS could then use this to guide how it wires the DAG.

(I'm a bit scared that it's taken us 3 years to notice this is missing, but hey...)

@ara4n ara4n changed the title Does /send guarantee that the DAG has been updated before it returns 200 OK? Provide a way to make message order explicit when sending (rather than assuming that /send updates the DAG before returning) Nov 4, 2017
@richvdh richvdh added the feature Suggestion for a significant extension which needs considerable consideration label Nov 6, 2017
@turt2live turt2live added the A-Client-Server Issues affecting the CS API label Feb 6, 2019
@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API feature Suggestion for a significant extension which needs considerable consideration
Projects
None yet
Development

No branches or pull requests

3 participants