Skip to content

Upgrade to abstract-level interface #11

Closed
@CMCDragonkai

Description

@CMCDragonkai

Specification

The abstract-level https://github.com/Level/abstract-level is a new foundation of LevelDB. Upgrading to this will help us resolve all other issues in DB.

  • Use bufferWrap to support ArrayBuffer, Uint8Array and Buffer #3 - abstract-level supports it directly
  • Integrate DB into the level db interface so db levels are the same as db #8 - Our DB abstraction should be rebuilt as an abstract-level layer, that is a class extending AbstractLevel
    class DB extends AbstractLevel { ... }
    
    It will still need to use classic-level (which is just leveldown atm) in NodeJS because NodeJS doesn't support indexed DB atm. But this should then basically make DB just an implementation of the abstract-level interface.
  • DB would then be a specialised classic-level that sets up root sublevels of data, transactions, and index and performs semi-transparent encryption & decryption (since it doesn't have a block level yet).
  • DB would then return sublevels as wrapped DBs as well...
  • Implement True Snapshot Isolation for LevelDB #4 Should already be resolved, since we end up using iterator() for read-committed level transactions, and true snapshots aren't really needed.
  • Integrate Automatic Indexing into DB #1 becomes possible now that we have a better idea of what kind of indexing needs we need, and we can put all the index data under the index root level

#5 still cannot be solved until IDB becomes available, then we can use browser-level or level-js and have the transparent encryption be done at the block level. Or done at the C++ level inside leveldb, or rocksdb.

Wait until level has released version 8, although this can be started now, since we may not need to use the level package at all. The only dependencies of js-db may be abstract-level and classic-level.

Additional context

Tasks

  1. ...
  2. ...
  3. ...

Metadata

Metadata

Assignees

Labels

developmentStandard developmentepicBig issue with multiple subissuesr&d:polykey:core activity 1Secret Vault Sharing and Secret History Management

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions