Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevinzh0a/bitkv-rs
A k/v storage engine inspired by bitcask written in Rust
https://github.com/kevinzh0a/bitkv-rs
bitcask database kv
Last synced: 3 months ago
JSON representation
A k/v storage engine inspired by bitcask written in Rust
- Host: GitHub
- URL: https://github.com/kevinzh0a/bitkv-rs
- Owner: KevinZh0A
- License: mit
- Created: 2024-02-25T06:59:34.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-13T16:12:33.000Z (7 months ago)
- Last Synced: 2024-10-06T05:29:19.187Z (3 months ago)
- Topics: bitcask, database, kv
- Language: Rust
- Homepage:
- Size: 189 KB
- Stars: 9
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Bitkv
[][Github-url]
[][CI-url]
[][codecov-url]An efficient key-value storage engine, designed for fast reading and writing, which is inspired by [Bitcask][bitcask_url].
See [Introduction](#introduction), [Installation](#installation) and [Usages](#usages) for more details.
## Introduction
Bitkv is a high-performance key-value storage system written in Rust. It leverages a log-structured design with an append-only write approach to deliver exceptional speed, reliability, and scalability.
### Features
- **Efficient Key-Value Storage:** Optimized for fast read and write operations with minimal overhead.
- **Diverse Index:** Support BTree, Skiplist, BPlusTree index for multiple index strategies.
- **MemMap files for efficient I/O:** To achieve rapid index reconstruction and enhance startup speeds
- **Low latency per item read or written:** Benchmarks run on a Macintosh with Apple M1 Core:
- Write latency: `~ 3.3 µs`
- Read latency: `~ 370 ns`
- **Concurrency Support:** fine-grained locking minimizes contentions.
- **WriteBatch transaction:** commit a batch of writes to ensure atomicity.## Installation
To use bitkv in your project, add it as a dependency in your Cargo.toml file:
```toml
[dependencies]
bitkv-rs = "0.2.1"
```
Then, run cargo build to download and compile bitkv-rs and its dependencies.For more detailed setup and compilation instructions, visit the Bitkv-rs GitHub repository.
## Usages
Please see [`examples`].For detailed usage and API documentation, refer to the [bitkv-rs Documentation](https://docs.rs/bitkv-rs).
## TODO
- [X] Basic error handling
- [X] Merge files during compaction
- [X] Configurable compaction triggers and thresholds
- [X] WriteBactch transaction
- [X] Use mmap to read data file that on disk.
- [X] Optimize hintfile storage structure to support the memtable build faster
- [X] Http api server
- [X] Tests
- [X] Benchmark
- [ ] Documentation
- [ ] Increased use of flatbuffers option to support faster reading speed
- [ ] Extend support for Redis Data Types## Contribution
Contributions to this project are welcome! If you find any issues or have suggestions for improvements, please raise an issue or submit a pull request.
#### License
Bitkv-rs is licensed under the [MIT license](https://github.com/example/bitkv-rs/blob/main/LICENSE-MIT), permitting use in both open source and private projects.
This license grants you the freedom to use bitkv-rs in your own projects, under the condition that the original license and copyright notice are included with any substantial portions of the Bitkv-rs software.[Github-url]: https://github.com/KevinZh0A/bitkv-rs
[CI-url]: https://github.com/KevinZh0A/bitkv-rs/actions/workflows/rust.yml
[doc-url]: https://docs.rs/bitkv[crates-url]: https://crates.io/crates/bitkv
[codecov-url]: https://app.codecov.io/gh/KevinZh0A/bitkv-rs
[bitcask_url]: https://riak.com/assets/bitcask-intro.pdf
[`examples`]: https://github.com/KevinZh0A/bitkv-rs/tree/main/examples