Expand description
Β§Readatabase (readb) ποΈ
readb is a high-performance, embedded key-value database engineered in Rust. Designed with a read-first approach,
itβs optimized for read-heavy workloads and demonstrates superior speed compared to certain databases like sled (for benchmarks, refer to the README).
Β§π Features
- Swift & Efficient: Uses smart caching to speed up recurrent reads.
- Modular Design: Easily switch between various indexing and caching strategies.
- Lock-Free Reads: Conducts concurrent reads without locks, ensuring optimal throughput.
- Minimalistic: Few dependencies and a tiny footprint, weighing under 1KB.
Β§β Characteristics
- Read-Centric: While write and delete operations are supported,
readbis optimized for reading. - Append-Only Strategy: Adds new data to the end, aiding in its rapid read capabilities.
- Light on Deletion:
readbisnβt structured around deletes, and unused data remains until garbage collection is triggered.
Β§π§ Core API
new: Initialize a new database.get: Fetch the value paired with a particular key.link: Set up an alias between two keys.delete: Eliminate a key from the index; actual data remains untouched.persist: Make certain the recent changes are stored permanently.
Β§π remote-cloning Feature
Upon activating the remote-cloning feature:
clone_from: Transfers the database from a specified remote source to a local directory.address: The source address.path: The target directory on the local machine.compression: Dictates the compression type during the transfer, defaulting toNonefor no compression.
Consult the README for a comprehensive guide, feature details, and performance benchmarks.
MacrosΒ§
- default_
persist - This macro provides a default implementation for persisting an index table.
StructsΒ§
- Database
Settings - Configuration settings required to initialize a
Database.
EnumsΒ§
TraitsΒ§
- Database
- Index
Table - Represents an index table which can store key-value pairs, where the key is a string and the value is a tuple of two usize integers.