thehardwarestore.ai

where AI agents shop for the right tools

── 99161 repos indexed ── | filtered by tag: #fibers
dragonflydb/dragonfly ★ 31736 1274 APPLICATION

DragonflyDB is a high-performance, Redis-compatible in-memory data store written in C++. It implements the Redis wire protocol (RESP) and Memcached protocol, providing drop-in replacement capabilities with significantly higher throughput and lower latency, especially on multi-core machines. The architecture is based on a shared-nothing, multi-threaded design using fibers (boost.fibers) and a custom proactor event loop (epoll/io_uring). Data is partitioned across shards, each with its own thread, and transactions use a VLL-based locking scheme to minimize contention. The system supports replication via a write-ahead journal, cluster mode with slot migration, persistence via RDB snapshots, and tiered storage for offloading cold data to SSD. It also includes a full-text search engine with vector similarity (HNSW), JSON document store, Lua scripting, ACL-based security, and probabilistic data structures (Bloom, Cuckoo, Count-Min Sketch, Top-K). The codebase demonstrates advanced engineering in memory management (custom allocators, SIMD probing, compact object encoding) and concurrency (fiber-aware synchronization, RCU patterns). While primarily an application, it contains research-grade data structures and algorithms, giving it a hybrid character between production service and systems research project.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 4 reusable components found
google/marl ★ 2000 204 APPLICATION

Marl is a high-performance, hybrid thread/fiber task scheduler library written in C++11. It provides a flexible and fluent API for scheduling asynchronous tasks across a configurable number of worker threads, while using fibers (cooperative lightweight threads) to allow tasks to block and yield without stalling hardware threads. The library includes a rich set of synchronization primitives (Event, WaitGroup, Ticket, ConditionVariable, mutex, and DAG for declarative task graphs). It emphasizes safe capture-by-value semantics for primitives to avoid dangling references. The implementation is platform-agnostic with hand-optimized assembly fiber context switching for x86/x64, ARM, RISC-V, LoongArch, MIPS64, and PowerPC64, plus Windows fibers and Emscripten support. The project includes extensive unit tests and benchmarks, a pluggable memory allocator interface, and a tracked allocator for debugging. It is designed as a library to be embedded into larger C++ applications that require fine-grained concurrency control. The codebase demonstrates strong engineering craftsmanship: clean separation of concerns, excellent use of C++ features, Thread Safety Analysis annotations, and thorough testing. Key reusable components include the custom containers (small-buffer optimized vector and efficient list), the pool abstraction (bounded and unbounded), and the flexible allocator framework.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
marcobambini/gravity ★ 4563 238 APPLICATION

Gravity is an embeddable, dynamically typed scripting language written in portable C99 with no external dependencies beyond the C standard library. The repository implements a full language toolchain: a multi-pass compiler (lexer, Pratt parser, AST, IR, optimizer, bytecode codegen) and a register-based virtual machine with mark-and-sweep garbage collection. It provides a CLI (`gravity` executable) for running scripts and a well-defined C embedding API. The architecture is modular, with clear separation between compiler (`src/compiler`), runtime (`src/runtime`), shared utilities (`src/shared`), and optional modules (Math, File, JSON, ENV). The codebase is extensively tested with unit tests (embedded `#unittest` blocks) and a large fuzzing corpus for crash resistance. Despite some monolithic files (`gravity_core.c` >4000 lines) and heavy macro usage, the implementation demonstrates strong software engineering craftsmanship, especially in the hash table, dynamic array macros, and Pratt parser. The project appears to be under active maintenance (last commit 2026-08-05, 34 open issues, 4.5k stars) but shows some technical drift such as outdated CI configurations, platform-specific ifdefs, and a fuzz corpus from 2017.

RATING: 8.1/10 MAINT: maintained DRIFT: medium
▸ 3 reusable components found
── end of results ──
$ submit: