-
Notifications
You must be signed in to change notification settings - Fork 0
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
Do we separate basic model sync ("delta") from updates on changes ("notification") a la CQRS? #291
Comments
Variants on Repo resolves all conflictsImmediately apply changes to client modelTwo conflicting clients
Two conflicting clients, one non-conflicting client
Client keeps "dirty" model during changeTwo conflicting clients
Two conflicting clients, one non-conflicting client
Other scenariosUnrecoverable error
Questions
|
If we assume the repo is the only one doing conflict resolution, and the only requirement is "a client is up-to-date and consistent after applying all changes in order", the repo has a lot of freedom. Example:
Possible actions of repo: a. sends update |
Only accept change requests, distribute events. No guarantees on real-time collaboration. |
aka separation between "intent" and "consequence"
aka separation between "commands" and "events"
Might or might not mean that clients send only commands, and repo sends only events.
World views
No delta protocol at all, just notifications on changes
Clients can update their state based on notifications, not another bulk read.
If client makes local changes and gets notifications, it's the client job to disentangle them.
Pro:
Con:
Small-grained change commands
Similar to above, but a client can also send small explicit updates (client sends "I move this node there", not the new partial model from which the repo has to reconstruct the change).
Repo might reject command e.g. because trying to move a node below a deleted node.
Clients cannot reject notification.
Pro:
Con:
Advantage over bulk:
OT-style state updates
Clients send their changes to repo, repo disentangles them, repo sends updates that bring all clients to same state
--> might send different updates to different clients (or some other trick that conceptually does the same thing with a client-side library)
Repo never rejects change, but might rewrite it.
Client's model is managed by a "driver" which guarantees (eventual) consistency of the model on all clients and the repo.
Client's model cannot refuse synced changes.
Pro:
Con:
Repo resolves all conflicts
Client sends update, server delays replies to that client until it resolves all conflicts and then sends appropriate updates to client.
Pro:
Con:
Decision: CQRS-style, conflict resolution only by repository
The text was updated successfully, but these errors were encountered: