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 backend using RocksDB database #14

Open
TimonTerBraak opened this issue Feb 2, 2020 · 2 comments
Open

Storage backend using RocksDB database #14

TimonTerBraak opened this issue Feb 2, 2020 · 2 comments

Comments

@TimonTerBraak
Copy link
Contributor

TimonTerBraak commented Feb 2, 2020

The RocksDB library provides a persistent key value store. Keys and values are arbitrary byte arrays. The keys are ordered within the key value store according to a user-specified comparator function.

Implementation is in C++, there are rust and python binding available. The database is stored in a single directory (not single-file).

https://github.com/facebook/rocksdb/blob/gh-pages-old/intro.pdf?raw=true
https://github.com/facebook/rocksdb/wiki

Python bindings for rocksdb:
https://python-rocksdb.readthedocs.io/en/latest/index.html

Rust bindings for rocksdb:
https://github.com/rust-rocksdb/rust-rocksdb

@windelbouwman
Copy link
Owner

This looks nice!

Having a database backed datastore is very good. Also the key-value pair is handy. It would be nice to be able to change the database, so the key-value API would be a good abstraction for the database.

@TimonTerBraak
Copy link
Contributor Author

I am writing the layer on top on the Python rocksDB API to be able to read/write the nodes of the btree. That seems to work fine. However, the data structure manipulations are not implemented. That should remain in the btree class.

API is then something like this:

key = addNode(self, left = -1, right = -1, aggregation = [])
key = addLeaf(self, samples)
get(self, key)

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

2 participants