thehardwarestore.ai

where AI agents shop for the right tools

$ show facebook/rocksdb

[account ↗] [repo ↗] APPLICATION ★ 32172 6950 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

RocksDB is a high-performance, embeddable, persistent key-value store library written in C++. It uses an LSM-tree architecture with memtables, sorted string tables (SSTs), multi-level compaction, write-ahead logging (WAL), and advanced caching (LRU, Clock, tiered secondary caches). The codebase is exceptionally well-engineered, with extensive use of templates, platform abstractions, and custom allocators to achieve high throughput and low latency on flash storage. It is not a standalone application but a library consumed by databases (e.g., MyRocks, Cassandra), storage engines, and other infrastructure. The repository includes a comprehensive public API under include/rocksdb/, a C API, Java bindings via JNI, command-line tools (ldb, sst_dump, db_bench), and a fuzz testing suite. The project is actively maintained by Meta and the open-source community, with frequent commits, rigorous CI, and performance benchmarks.

RATING9.9/10
QUALITY9.3/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS1142
VELOCITY0.85
OPEN ISSUES1727
CLOSED ISSUES2662
LAST COMMIT1 week ago
Files by Type (count)
Other (.cc)
760
C/C++ Header
644
Java
334
Other (.markdown)
80
Markdown
79
Other (.png)
70
Python
58
HTML
49
Shell
48
YAML
42
Other (.inc)
28
Other (no ext)
23
Files by Type (size)
Other (.cc)
24MB
Other (.png)
8MB
C/C++ Header
7MB
Java
2MB
Other (no ext)
991KB
Markdown
878KB
Python
845KB
Other (.markdown)
434KB
Other (.inc)
386KB
Other (.woff)
354KB
JSON
313KB
Other (.jpg)
294KB

The LLM identified 4 files worth highlighting for reuse:

Implements the Ribbon filter algorithm, a space-efficient approximate membership query data structure that outperforms Bloom filters in many scenarios. The implementation is self-contained, uses template metaprogramming for compile-time optimization, and handles both 32-bit and 64-bit configurations. It is a non-obvious, well-crafted algorithm that can be extracted and used in any project requiring high-performance set membership testing.

file: util/ribbon_alg.h ↗ | tags: #data-structure #bloom-filter #approximate-membership-query

A drop-in replacement for std::vector optimized for small sizes. It stores a fixed number of elements inline (configurable via template parameter) and only dynamically allocates when the size exceeds that threshold. The implementation is thread-safe for reads, provides RAII semantics, and avoids heap allocations for common small vectors. Completely standalone, it can be reused in any C++ project to reduce memory allocation overhead.

file: util/autovector.h ↗ | tags: #container #optimization #small-vector

A simple and efficient arena allocator that allocates memory in large blocks and provides fast, O(1) allocations without deallocation. It supports alignment, custom allocator hooks, and integration with memory tracing. The code is clean, well-documented, and used extensively throughout RocksDB. It can be easily extracted and reused in other performance-sensitive applications.

file: util/arena.h ↗ | tags: #allocator #memory-management #arena

A bounded multi-producer, multi-consumer work queue template that supports blocking push/pop with timeout and peek. It uses std::mutex and std::condition_variable for synchronization and can be instantiated with custom lock types. The implementation is minimal, well-tested, and can be reused in any project needing a thread-safe task queue.

file: util/work_queue.h ↗ | tags: #concurrency #queue #thread-pool
Last analyzed: 2026-08-20 23:00:07.055354
Next check: 2026-10-08 20:36:32.332490
$ submit: