All Projects → mozilla → Rkv

mozilla / Rkv

Licence: apache-2.0
A simple, humane, typed Rust interface to LMDB.

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Rkv

zlmdb
Object-relational in-memory database layer based on LMDB
Stars: ✭ 22 (-87.64%)
Mutual labels:  lmdb
Libmdbx
One of the fastest embeddable key-value ACID database without WAL. libmdbx surpasses the legendary LMDB in terms of reliability, features and performance.
Stars: ✭ 729 (+309.55%)
Mutual labels:  lmdb
Py Wsi
Python package for dealing with whole slide images (.svs) for machine learning, particularly for fast prototyping. Includes patch sampling and storing using OpenSlide. Patches may be stored in LMDB, HDF5 files, or to disk. It is highly recommended to fork and download this repository so that personal customisations can be made for your work.
Stars: ✭ 107 (-39.89%)
Mutual labels:  lmdb
lmdb-simple
Simple Haskell API for LMDB
Stars: ✭ 12 (-93.26%)
Mutual labels:  lmdb
Lmdb Embeddings
Fast word vectors with little memory usage in Python
Stars: ✭ 404 (+126.97%)
Mutual labels:  lmdb
Fastonosql
FastoNoSQL is a crossplatform Redis, Memcached, SSDB, LevelDB, RocksDB, UnQLite, LMDB, ForestDB, Pika, Dynomite, KeyDB GUI management tool.
Stars: ✭ 1,001 (+462.36%)
Mutual labels:  lmdb
lmdb-js
Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Stars: ✭ 270 (+51.69%)
Mutual labels:  lmdb
Ardb
A redis protocol compatible nosql, it support multiple storage engines as backend like Google's LevelDB, Facebook's RocksDB, OpenLDAP's LMDB, PerconaFT, WiredTiger, ForestDB.
Stars: ✭ 1,707 (+858.99%)
Mutual labels:  lmdb
Lmdbjava
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
Stars: ✭ 546 (+206.74%)
Mutual labels:  lmdb
Ml Pyxis
Tool for reading and writing datasets of tensors in a Lightning Memory-Mapped Database (LMDB). Designed to manage machine learning datasets with fast reading speeds.
Stars: ✭ 93 (-47.75%)
Mutual labels:  lmdb
Tensorflow DCGAN
Study Friendly Implementation of DCGAN in Tensorflow
Stars: ✭ 22 (-87.64%)
Mutual labels:  lmdb
Datalevin
A simple, fast and durable Datalog database
Stars: ✭ 360 (+102.25%)
Mutual labels:  lmdb
Quadrable
Authenticated multi-version database: sparse binary merkle tree with compact partial-tree proofs
Stars: ✭ 78 (-56.18%)
Mutual labels:  lmdb
nim-lmdb
Nim LMDB wrapper
Stars: ✭ 31 (-82.58%)
Mutual labels:  lmdb
Benchmarks
Benchmark of open source, embedded, memory-mapped, key-value stores available from Java (JMH)
Stars: ✭ 116 (-34.83%)
Mutual labels:  lmdb
monero-lws
Monero Light Wallet Server (scans monero viewkeys and implements mymonero API)
Stars: ✭ 41 (-76.97%)
Mutual labels:  lmdb
Nideep
collection of utilities to use with deep learning libraries (e.g. caffe)
Stars: ✭ 25 (-85.96%)
Mutual labels:  lmdb
Heed
A fully typed LMDB/MDBX wrapper with minimum overhead
Stars: ✭ 142 (-20.22%)
Mutual labels:  lmdb
Lmdb Go
Bindings for the LMDB C library
Stars: ✭ 127 (-28.65%)
Mutual labels:  lmdb
Crux
General purpose bitemporal database for SQL, Datalog & graph queries
Stars: ✭ 1,296 (+628.09%)
Mutual labels:  lmdb

rkv

Travis CI Build Status Appveyor Build Status Documentation Crate

The rkv Rust crate is a simple, humane, typed key-value storage solution. It supports multiple backend engines with varying guarantees, such as LMDB for performance, or "SafeMode" for reliability.

⚠️ Warning ⚠️

To use rkv in production/release environments at Mozilla, you may do so with the "SafeMode" backend, for example:

use rkv::{Manager, Rkv};
use rkv::backend::{SafeMode, SafeModeEnvironment};

let mut manager = Manager::<SafeModeEnvironment>::singleton().write().unwrap();
let shared_rkv = manager.get_or_create(path, Rkv::new::<SafeMode>).unwrap();

...

The "SafeMode" backend performs well, with two caveats: the entire database is stored in memory, and write transactions are synchronously written to disk (only on commit).

In the future, it will be advisable to switch to a different backend with better performance guarantees. We're working on either fixing some LMDB crashes, or offering more choices of backend engines (e.g. SQLite).

Use

Comprehensive information about using rkv is available in its online documentation, which can also be generated for local consumption:

cargo doc --open

Build

Build this project as you would build other Rust crates:

cargo build

Features

There are several features that you can opt-in and out of when using rkv:

By default, db-dup-sort and db-int-key features offer high level database APIs which allow multiple values per key, and optimizations around integer-based keys respectively. Opt out of these default features when specifying the rkv dependency in your Cargo.toml file to disable them; doing so avoids a certain amount of overhead required to support them.

To aid fuzzing efforts, with-asan, with-fuzzer, and with-fuzzer-no-link configure the build scripts responsible with compiling the underlying backing engines (e.g. LMDB) to build with these LLMV features enabled. Please refer to the official LLVM/Clang documentation on them for more informatiuon. These features are also disabled by default.

Test

Test this project as you would test other Rust crates:

cargo test

The project includes unit and doc tests embedded in the src/ files, integration tests in the tests/ subdirectory, and usage examples in the examples/ subdirectory. To ensure your changes don't break examples, also run them via the run-all-examples.sh shell script:

./run-all-examples.sh

Note: the test fixtures in the tests/envs/ subdirectory aren't included in the package published to crates.io, so you must clone this repository in order to run the tests that depend on those fixtures or use the rand and dump executables to recreate them.

Contribute

Of the various open source archetypes described in A Framework for Purposeful Open Source, the rkv project most closely resembles the Specialty Library, and we welcome contributions. Please report problems or ask questions using this repo's GitHub issue tracker and submit pull requests for code and documentation changes.

rkv relies on the latest rustfmt for code formatting, so please make sure your pull request passes the rustfmt before submitting it for review. See rustfmt's quick start for installation details.

We follow Mozilla's Community Participation Guidelines while contributing to this project.

License

The rkv source code is licensed under the Apache License, Version 2.0, as described in the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].