saildb

Crates.iosaildb
lib.rssaildb
version0.0.2
sourcesrc
created_at2021-12-28 23:19:18.486631
updated_at2021-12-29 20:36:20.321012
descriptionSailDB is an in-memory database based on Canary and SRPC.
homepage
repositoryhttps://github.com/znx3p0/saildb
max_upload_size
id504500
size27,949
(znx3p0)

documentation

README

SailDB

SailDB is an in-memory database based on Canary and SRPC.

SailDB is extremely performant since communications are based on top of Canary, and the key-value store is backed by Dashmap.

SailDB is generic over the keys and values, and can be constructed at runtime, and is designed to be as simple to use as possible.

Creating a SailDB database is extremely simple:

// bind the global route to this socket
Tcp::bind("127.0.0.1:8080").await?;
// bind a SailDB to the global route with the default id
Sail::<String, String>::bind();

Accessing the database should be as simple as this

let addr = "127.0.0.1:8080".parse::<Addr>()?;
let mut db: Sail<String, String> = Sail::new(addr).await?;

let (key, val) = ("hello".to_string(), "world!".to_string());

db.insert(&key, &val).await?;

let val = db.get(&key).await?;
assert!(val, Some("world!".to_string()))

A simple example of SailDB

Commit count: 8

cargo fmt