A reverse trie key value db with exceptional lookup speed. Written in C.
10K+
StreamDB is a lightweight, thread-safe embedded key-value database implemented in C, specifically optimized for suffix-based searches using a reverse trie data structure.
This image provides a self-contained, Nix-determined environment for building and running StreamDB applications with zero external dependencies.
Verify the build integrity on your specific hardware (e.g., AMD Ryzen or Intel) by running the built-in test suite:
docker run --rm streamdb:2.0.0
The image includes the libraries (/lib) and headers (/include) needed to link against StreamDB:
/include/streamdb.h/lib/libstreamdb.soTo use the auto-persistence feature, mount a local directory to the container's working directory (/tmp by default in this image):
docker run -it -v $(pwd)/data:/tmp streamdb:2.0.0
StreamDB is optimized for specific workloads where traditional B-Trees or Hash Tables struggle:
| Operation | Complexity | Note |
|---|---|---|
| Exact Get | = key length | |
| Insert | Includes tree traversal | |
| Suffix Search | = number of matches | |
| Flush | = total nodes in the trie |
This image is built using pkgs.dockerTools.buildLayeredImage for optimal caching.
glibc and libpthread.test_streamdb.busybox for basic shell access.The database can be initialized with a persistence file and an auto-flush interval:
// Example Initialization (C11)
StreamDB* db = streamdb_init("mydb.dat", 5000); // 5-second auto-flush
This library is licensed under LGPL-2.1.
Content type
Image
Digest
sha256:23adc8e9e…
Size
33.9 MB
Last updated
about 2 months ago
docker pull alh477/streamdb