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

Api: Disallow UD of existing entries if partner has performed UD on that entry #93

Open
Tracked by #109
Zhiyuan-Amos opened this issue Oct 29, 2021 · 0 comments

Comments

@Zhiyuan-Amos
Copy link
Owner

Zhiyuan-Amos commented Oct 29, 2021

Problem: When A updates a particular entry, and B also updates that entry prior to running synchronization, the data might go out of sync. This happens when updating Aggregate Roots.

The solution is to create a Container for each Domain, and the Container stores the data temporarily. Note that if-statement to verify if the data has been modified is subject to race conditions, so the implementation should be to set the EntityId as the unique id for the Container.

This requires de-coupling Domain & Change: each DomainFunction stores the content temporarily, which is cached in Change. On Change deletion, ChangeFunction sends Event so each respective Service deletes the value.

Note:

  1. Self can update the same content multiple times.
  2. Done Id (i.e. DateTime) has to be checked for concurrency too.
  3. Server could return a custom HTTP Response Code, such that Client would perform a synchronization first before redo-ing the operation.

Related: Issues should have unique titles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant