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

Create sub-DB under a level path #67

Open
CMCDragonkai opened this issue Jul 16, 2023 · 0 comments
Open

Create sub-DB under a level path #67

CMCDragonkai opened this issue Jul 16, 2023 · 0 comments
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management

Comments

@CMCDragonkai
Copy link
Member

Specification

Originally we had the ability to create sub-DB instances under certain level path with the original leveldb implementation. We scratched that in favour of full level paths available to all function calls.

However in some circumstances, it should be possible to create a sub-DB that has a levelpath as a prefix for all operations. This allows us to create a DB instance that can be injected into EFS, and so Polykey's DB instances will be unified, rather than having one for the vaults domain and one for the rest of PK. This will be more efficient as it will share crypto routines and other bookkeeping overhead.

There are some challenges. By putting a prefix, we sort of prevent any operations occurring outside of that level path. However the root DB could still perform operations on key values under that level path.

Transactions should operate the same as before as if there was a sub DB instance.

It should not be recommended for the root DB to perform operations on the sub DB. This is because it is possible to create complex conflicts on the sub DB like transactions. However from a lifecycle point of view, the sub DB has a more basic lifecycle, such as destruction would jsut be clearing things. The root DB lifecycle would affect all sub DBs though. We may wish to add a force option so that by default root DB lifecycle would throw an exception if sub-DBs exist.

Additional context

Tasks

  1. ...
  2. ...
  3. ...
@CMCDragonkai CMCDragonkai added the development Standard development label Jul 16, 2023
@CMCDragonkai CMCDragonkai added the r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Standard development r&d:polykey:core activity 1 Secret Vault Sharing and Secret History Management
Development

No branches or pull requests

1 participant