ghaladb

Crates.ioghaladb
lib.rsghaladb
version0.1.4
sourcesrc
created_at2023-11-30 18:44:33.725943
updated_at2024-04-10 06:32:08.539697
descriptionLSM tree based key value store with keys and values separation.
homepage
repositoryhttps://github.com/mattgathu/ghaladb
max_upload_size
id1054359
size101,997
Matt Gathu (mattgathu)

documentation

https://docs.rs/ghaladb

README

GhalaDb

docs.rs GitHub Workflow Status (with event) Crates.io

A key value datastore that implements keys and values separation inspired by the WiscKey paper.

GhalaDb implements a SSD-conscious data layout by decoupling the storage of keys from values. An in-memory tree stores the keys along with pointers to the values, while the values are stored in a separate log file. This significantly reduces write amplification during ingestion, while facilitating faster data loading.

Since GhalaDb keeps all its keys and data pointers in memory, it is suitable for applications that have small-sized keys.

use ghaladb::{GhalaDb, GhalaDbResult};

fn main() -> GhalaDbResult<()> {
    let mut db = GhalaDb::new("/tmp/ghaladb", None)?;
    let key = "king".to_owned();
    let val = "queen".to_owned();
    db.put(&key, &val)?;
    assert_eq!(db.get(&key)?.unwrap(), val);
    Ok(())
}

References

Commit count: 18

cargo fmt