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

[protocol] Simple and fast key-value store (or "light items") #14

Open
tasn opened this issue Jan 3, 2021 · 0 comments
Open

[protocol] Simple and fast key-value store (or "light items") #14

tasn opened this issue Jan 3, 2021 · 0 comments
Labels
proposal A new prosoposal for the Etebase protocol

Comments

@tasn
Copy link
Member

tasn commented Jan 3, 2021

The items at the moment are optimised for large files that are long-lived and retain a change history. This is great for what they do, but it's not always what we want. For example for fast changing data or very small data it makes sense to have a simple key-value store that doesn't retain a history.
This can be solved by having "light items", though a better abstraction would potentially be a simple key-value store.

Example use-cases:

  • Trust store: the key name could be the username or public key (for easy fetching), the content can be the trust level and etc.
  • Location data: store your device's geographical location and keep on updating the location as they move.
  • Counters: some sort of counters.

Implementation thoughts

  • UID:
    • We can use the deterministically encrypted key for efficient fetching (and getting the name when listing) - also pad the UID the same way we do for collection types. We can alternatively use the hmac of the key, though we then won't be able to get back the key name unless we store it elsewhere (immutable) in the item.
  • The key value stores should not
  • We want them to live in collections, along with items, and preferably be able to use them interchangeably in transactions and batches. Though I guess listing should be separate as we don't want the API to return objects for which we will need to do instance_of in order to use.
    • How does it looks though with etag and transactions? So knowing we don't override changes? I guess we can also have a longer form version that enforces that? We can for example have an item instance that's fetched and then we can modify and push?

Example API:


@tasn tasn added the proposal A new prosoposal for the Etebase protocol label Jan 3, 2021
@tasn tasn changed the title Simple and fast key-value store (or "light items") [protocol] Simple and fast key-value store (or "light items") Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal A new prosoposal for the Etebase protocol
Projects
None yet
Development

No branches or pull requests

1 participant