All Projects → andresilva → Cask

andresilva / Cask

Licence: mit
A fast key-value store written in Rust

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Cask

Lmdbjava
Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store
Stars: ✭ 546 (+591.14%)
Mutual labels:  database, key-value
Histore
🏬 200b key-value store backed by navigation state
Stars: ✭ 683 (+764.56%)
Mutual labels:  database, key-value
Pickledb
pickleDB is an open source key-value store using Python's json module.
Stars: ✭ 549 (+594.94%)
Mutual labels:  database, key-value
Bitnami Docker Redis
Bitnami Redis Docker Image
Stars: ✭ 317 (+301.27%)
Mutual labels:  database, key-value
Cutedb
A slick BTree on disk based key value store implemented in pure Go
Stars: ✭ 67 (-15.19%)
Mutual labels:  database, key-value
Flashdb
An ultra-lightweight database that supports key-value and time series data | 一款支持 KV 数据和时序数据的超轻量级数据库
Stars: ✭ 378 (+378.48%)
Mutual labels:  database, key-value
Bitcask
🔑A high performance Key/Value store written in Go with a predictable read/write performance and high throughput. Uses a Bitcask on-disk layout (LSM+WAL) similar to Riak.
Stars: ✭ 654 (+727.85%)
Mutual labels:  database, key-value
Permazen
Language-Natural Persistence Layer for Java
Stars: ✭ 265 (+235.44%)
Mutual labels:  database, key-value
Keyvast
KeyVast - A key value store
Stars: ✭ 33 (-58.23%)
Mutual labels:  database, key-value
Xodus
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.
Stars: ✭ 864 (+993.67%)
Mutual labels:  database, key-value
Gokv
Simple key-value store abstraction and implementations for Go (Redis, Consul, etcd, bbolt, BadgerDB, LevelDB, Memcached, DynamoDB, S3, PostgreSQL, MongoDB, CockroachDB and many more)
Stars: ✭ 314 (+297.47%)
Mutual labels:  database, key-value
Ejdb
🏂 EJDB 2.0 — Embeddable JSON Database engine C library. Simple XPath like query language (JQL). Websockets / Android / iOS / React Native / Flutter / Java / Dart / Node.js bindings. Docker image.
Stars: ✭ 1,187 (+1402.53%)
Mutual labels:  database, key-value
Buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
Stars: ✭ 3,583 (+4435.44%)
Mutual labels:  database, key-value
Redislite
Redis in a python module.
Stars: ✭ 464 (+487.34%)
Mutual labels:  database, key-value
Immortaldb
🔩 A relentless key-value store for the browser.
Stars: ✭ 2,962 (+3649.37%)
Mutual labels:  database, key-value
Laravel Options
Global key-value store in the database
Stars: ✭ 626 (+692.41%)
Mutual labels:  database, key-value
Filebase
A Simple but Powerful Flat File Database Storage.
Stars: ✭ 235 (+197.47%)
Mutual labels:  database, key-value
Cubdb
Elixir embedded key/value database
Stars: ✭ 235 (+197.47%)
Mutual labels:  database, key-value
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 (+822.78%)
Mutual labels:  database, key-value
Keydb
high performance key value database written in Go
Stars: ✭ 70 (-11.39%)
Mutual labels:  database, key-value

Cask

A fast key-value store written in Rust. The underlying storage system is a log-structured hash table which is inspired by bitcask.

Build Status Crates.io License

API Documentation


WARNING: ⚠️ Please do not trust any valuable data to this yet. ⚠️

Installation

Use the crates.io repository, add this to your Cargo.toml along with the rest of your dependencies:

[dependencies]
cask = "0.7.0"

Then, use Cask in your crate:

extern crate cask;
use cask::{CaskOptions, SyncStrategy};

Usage

The basic usage of the library is shown below:

extern crate cask;

use std::str;
use cask::{CaskOptions, SyncStrategy};
use cask::errors::Result;

fn main() {
    if let Err(e) = example() {
        println!("{:?}", e);
    }
}

fn example() -> Result<()> {
    let cask = CaskOptions::default()
        .compaction_check_frequency(1200)
        .sync(SyncStrategy::Interval(5000))
        .max_file_size(1024 * 1024 * 1024)
        .open("cask.db")?;

    let key = "hello";
    let value = "world";

    cask.put(key, value)?;

    let v = cask.get(key)?;
    println!("key:{},value:{}", key, str::from_utf8(&v.unwrap()).unwrap());

    cask.delete(key)?;
    Ok(())
}

TODO

  • [X] Basic error handling
  • [X] Merge files during compaction
  • [X] Configurable compaction triggers and thresholds
  • [X] Documentation
  • [ ] Tests
  • [ ] Benchmark
  • [ ] Handle database corruption

License

cask is licensed under the MIT license. See LICENSE for details.

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].