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

Add change tracking for contexts #21

Open
mwatts15 opened this issue Jun 16, 2018 · 0 comments
Open

Add change tracking for contexts #21

mwatts15 opened this issue Jun 16, 2018 · 0 comments
Labels
enhancement New feature or request

Comments

@mwatts15
Copy link
Contributor

In order to reduce the amount of work that goes into identifying changes made to a graph, we can track when changes are made as we make them rather than sorting, serializing, and writing to disk ALL contexts as we do now.

Three approaches occur to me:

  1. When triples are added to a context graph mark it as 'dirty'. Then we only need ever to serialize dirty graphs
  2. Like 1, but compute a sort of hash function, h, of adds and removes where h([add(t1), add(t2), remove(t1)]) == h([add(t2)]). Typically, we don't do many removals, but if we did, this would detect. Technically, would need to handle collisions as well.
  3. Record the actual adds and removes to each context literally in a journal. Updates would then just be writing to this journal and commits would read from it.

relates to openworm/owmeta#350

@mwatts15 mwatts15 transferred this issue from openworm/owmeta Feb 9, 2020
@mwatts15 mwatts15 added the enhancement New feature or request label Feb 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant