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

Data Model Framework: an atomic approach #4

Open
SOF3 opened this issue Jun 4, 2018 · 0 comments
Open

Data Model Framework: an atomic approach #4

SOF3 opened this issue Jun 4, 2018 · 0 comments
Assignees
Projects

Comments

@SOF3
Copy link
Member

SOF3 commented Jun 4, 2018

This issue proposes an atomic approach for data model synchronization. Here I slightly alter the invalidation and autosaving properties of the DMF:

  • When a context gets a value from a data model instance, it has two modes:
    • disposable-get: The returned value does not have any side effects on any data models.
    • persistent-get: The returned value may affect the data model itself.
      • persistent-get additionally returns a model "image" used for identifying the data model's state.
  • When a context writes a value from a data, it has two types:
    • independent-set: The new value doesn't depend on certain parts of the data model (including conditional dependency).
    • dependent-set: The new value depends on certain parts of the data model.
      • dependent-set should accept an extra parameter "image", which is the state identifier returned from the dependent persistent-get.

When a data model cache manager uploads a set of changes for a data model, it should summarize all changes into an image->image pair, indicating the original image and the final image, along with a commit ID. If another server recently changed this data model, receives the change and finds out that original-image is distinct from the database's current value, it should rollback both changes. Then it should compare both commit IDs. The server that generated the greater commit ID should be responsible for the rollback and merging.

@SOF3 SOF3 self-assigned this Jun 4, 2018
@SOF3 SOF3 added this to Data Model Framework in Core Module Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Core Module
Data Model Framework
Development

No branches or pull requests

1 participant