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

Storage/Index versioning #54

Closed
2 tasks
OneManEquipe opened this issue Aug 31, 2021 · 1 comment
Closed
2 tasks

Storage/Index versioning #54

OneManEquipe opened this issue Aug 31, 2021 · 1 comment

Comments

@OneManEquipe
Copy link
Collaborator

OneManEquipe commented Aug 31, 2021

Oh boy, oh boy... That's a toughie.
Yes. It's the toughest toughie I've ever had.

Well... maybe not exacly, but still...

The general idea is this: I would like to implement deletion in AbstruseIndex, but without ever deleting anything.
In fact, I would like to be able to say "now it's not true anymore, now it is, now it's not" and so on.

So... how do I do this?

Ideas so far:

  • when I store/delete an object, it is stored in a list with a timestamp and a boolean that means "it is present/absent"
  • so "delete" becomes an insert with boolean "false"
  • a "get" reads the last element of the list (so ideally it is still as efficient)
  • we can also retrieve the history

The main issue is... what if I want to treat timestamps as a first-class citizen? If I decide to define |- as a ternary operator with hypotheses, timestamp and proposition, and add these triples to the storage, each triple would be different, which means that it would not be a new version of the previous one, and retrieval couldn't exploit the list

  • maybe I could add a "versioning" function to the storage which takes the object and determines its "key and version" (a different type of key, not the AbstruseKey, e.g. the proposition and hypotheses could be the key, while the timestamp could be the version)

As always... more... thought... T_T


  • bonus points for making the storage immutable (like Datomic, but I'm not sure I can do it, my model is more than just triples, I would need some way of handling rollbacks and the branching it would cause)
@OneManEquipe
Copy link
Collaborator Author

aaaaand the toughest toughie is also the wrongest wrongie :D I'm gonna close this in favor of #55

I opened this issue thinking "hey, if I decide that something is no longer true, how do I do it?".
However, to allow for proof validation (#10 ) we need to store proofs, and things get complicated: how do we version proofs?

So... versioning is not the solution :P if we add proofs we can associate them with timestamps or whatever, so we can say "give me the latest proven result" or stuff like that

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