rcask
rcask is a bitcask inspired, rust-based in-memory key-value store built on the core concepts of log-structured storage engines.
What does it have?
- In-Memory Index: Key value lookups are supported through
HashMapthat stores the exact disk offset for each key. - Log-Structured Persistence: Data is appended to a file in a sequential "log" fashion.
- Compaction: Automatically compacts log files after a configurable number of writes to keep disk usage under control.
- Data Integrity: Keys are read and validated during retrieval to help detect potential data corruption.
- Storage APIs
setandgetoperations for storing and retrieving string-based key-value pairs. - Crash Recovery: The in-memory index is rebuilt from the log file upon initialization, ensuring data persistence across application restarts.
Examples
use RCask;
use Error;