[][src]Crate data_pile

pile - a simple and fast append-only data store

Design goals

  • Efficient adding of bug chunks of data.
  • A user should be able to copy the storage data (for example, over the network) while still being able to use the database for both reads and writes.
  • The storage should have a minimal dependency footprint.

Usage guide

Example

This example is not tested
use data_pile::Database;
let db = Database::new("./pile").unwrap();
let value = b"some data";
db.put(&value).unwrap();

Transferring the data

  • Get the raw data by using Database::snapshot().
  • Copy it somewhere.
  • Create the root direcotry of the data store, create a file named data in it and add all snapshot data into it.
  • Just start using the database: it will verify correctness and rebuild all indexes.

Structs

Database

Append-only database. Can be safely cloned and used from different threads.

SeqNoIter

This structure allows to iterate over records in the order they were added to this database.

SharedMmap

A structure that implements a view into memory mapping.

Enums

Error

Datbase error.