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

Rescue diff/merge functionality #24

Open
benkamphaus opened this issue Jan 13, 2024 · 1 comment
Open

Rescue diff/merge functionality #24

benkamphaus opened this issue Jan 13, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request hold Change requires more thought and design.

Comments

@benkamphaus
Copy link
Contributor

There's currently some diff/merge functionality in the Unify code base that has not been vetted in some time. I expect that the following use scenario for Unify is likely:

A datomic database might have some schema + data under management by Unify, and another chunk of data in Datomic from collecting live data, tracking experiments, etc.

For this scenario, it makes sense for Unify to be able to manage the data it imports in batch by computing diffs and then transacting the diffs. This does require the constraint that every attribute in the schema have a definition of uniqueness. I.e., this enforcement set rather than bag semantics at the storage level rather than just as a side effect of queries without a :with clause. More concretely, you could not then store {:measurement/gene "EGFR" :measurement/sample 22 :measurement/fpkm 3.0"} even if two such measurements were taken, without some other disambiguating attribute.

This is not specific to Unify, though. Without an implicit or explicit source of uniqueness, you can't determine (by definition) if an entity with the same attributes represents the same entity or a second entity with the same values. After more thought and reading, I think this is a fair constraint to enforce: you must provide a means of determining uniqueness for everything you want managed by diff/merge to use that functionality, so I will update Unify with a release that provides this functionality under that constraint.

@benkamphaus benkamphaus added the enhancement New feature or request label Jan 13, 2024
@benkamphaus benkamphaus added this to the Public Alpha Announcement milestone Jan 13, 2024
@benkamphaus benkamphaus self-assigned this Jan 13, 2024
@benkamphaus benkamphaus added the hold Change requires more thought and design. label Aug 1, 2024
@benkamphaus
Copy link
Contributor Author

This requires more thought. Very likely Unify's primary use case won't need this, not sure if there are other use cases in the wild that might.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hold Change requires more thought and design.
Projects
None yet
Development

No branches or pull requests

1 participant