#fork #generics #binary-database

metaldb

Persistent storage implementation based on RocksDB

1 stable release

1.0.0 May 15, 2022

#1331 in Database interfaces

Apache-2.0

400KB
8K SLoC

metaldb

Docs.rs rust 1.45.0+ required

metaldb is a document-oriented persistent storage. Under the hood, MerkleDB uses RocksDB as a key-value storage.

Features

  • Supports list, map and set collections (aka indexes), as well as singular elements. Further, indexes can be organized into groups, allowing to create hierarchies of documents with arbitrary nesting.
  • Ability to define data layouts in an intuitive, declarative format.
  • Basic support of transactions: changes to the storage can be aggregated into a fork and then merged to the database atomically.
  • Access control leveraging the Rust type system, allowing to precisely define access privileges for different actors.
  • First-class support of long-running, fault-tolerant data migrations running concurrently with other I/O to the storage.

Usage

Include metaldb as a dependency in your Cargo.toml:

[dependencies]
metaldb = "1.0.0"

History notice

metaldb was initially created as MerkleDB by Exonum.

MerkleDB was initially created to support merkelized collections atop the persistent key-value storage. This project does not have the same purpose: instead, it provides a generic convenient and (ideally) backend-agnostic interface for the persistent NoSQL storage, without any bounds to the blockchain specifics.

License

metaldb is licensed under the Apache License (Version 2.0). See LICENSE for details.

Dependencies

~29MB
~585K SLoC