/dustdata

A data concurrency control key-value storage engine to Rustbase

Primary LanguageRustMIT LicenseMIT

crates.io

DustData

A data concurrency control storage engine to Rustbase

Join our community and chat with other Rust users.

⚠️ Warning

This is a work in progress. The API is not stable yet.

🔗 Contribute

Click here to see how to Contribute

Dependencies

These are dependencies that are required to use the DustData.

How to install

Add the following to your Cargo.toml:

[dependencies]
dustdata = "1.3.2"

Usage

Initialize a DustData interface.

// DustData Configuration
let config = dustdata::DustDataConfig {
    path: std::path::Path::new("./test_data/dustdata").to_path_buf(),
    lsm_config: dustdata::LsmConfig {
        flush_threshold: dustdata::Size::Megabytes(128),
    }
};

let mut dustdata = dustdata::initialize(config);

Insert a data

// ...
// Creating a data
let data = bson::doc! {
    "name": "John Doe",
    "age": 30,
}

dustdata.insert("key", data);

Getting a data

// ...
let value = dustdata.get("key").unwrap().unwrap();
println!("{:?}", value);

Updating a data

// ...
let data = bson::doc! {
    "name": "Joe Mamma",
    "age": 42,
}

dustdata.update("key", data);

Deleting a data

// ...
dustdata.delete("key");

To-dos

  • Memtable (06/19/22)
  • SSTable (08/20/22)
  • Snapshots (12/16/22)

Authors


@peeeuzin

License

MIT License