Cdb-library Version - 2.6 Final
Release Date: October 26, 2023 (Projected Archive) Maintainer: Michael Tokarev / Open Source Community Archives
This isn’t just another maintenance release. It’s a quiet revolution for those who value predictability over complexity . First, a quick refresher. CDB was originally designed by Daniel J. Bernstein in the late 1990s for his qmail and djbdns suites. The format is deceptively simple: a binary file with three sections—a fixed-size hash table, a series of data pointers, and the actual key/value data. Lookups are deterministic, requiring at most two disk accesses. There are no locks, no transactions, and no unnecessary overhead. cdb-library version 2.6 final
Future work will shift to libcdb2 (a separate project) that adds optional compression and encryption, but for 99% of users, 2.6 final is the end of the road—in the best possible way. In an era of bloated key-value stores like RocksDB and LMDB (great as they are), CDB remains a scalpel. Version 2.6 final sharpens that scalpel without changing its shape. It’s more portable, more deterministic, and just a little faster. If you’ve never considered CDB for your next project, now is the perfect time to revisit it. And if you’re a long-time user, upgrade with confidence. CDB was originally designed by Daniel J
$ cdbdump -j data.cdb "key":"domain.com","value":"127.0.0.1" "key":"mail","value":"10 mx.example.com" This is a small change, but it makes scripting and integration with modern log aggregation tools (like jq or fluentd ) seamless. For decades, cdb-library relied on a hand-rolled conf-* build system. Version 2.6 final introduces an optional CMake build (enabled via -DUSE_CMAKE=ON ), which simplifies cross-compilation for Android, OpenWRT, and musl-based Linux systems. The classic ./configure && make remains available and is still the recommended route for servers. Performance Benchmarks: 2.6 vs. 2.5 vs. GDBM We ran a quick test on a standard Linux server (Xeon E5-2680, NVMe storage, 16M key-value pairs, average key length 20 bytes, value length 100 bytes). Lookups are deterministic, requiring at most two disk
git clone https://github.com/mjt/cdb-library cd cdb-library git checkout v2.6-final make sudo make install Or, if you use CMake: