KISSDB最简单的 key/value 存储
(Keep It) 简单愚蠢的数据库
KISSDB 是一个最简单的 key/value 存储,使用纯 C 开发,只适用标准字符串和 FILE IO 函数。
特性:
- Tiny, compiles to ~4k on an x86_64 Linux system
- Small memory footprint (only caches hash tables)
- Very space-efficient (on disk) if small hash tables are used
- Makes a decent effort to be robust on power loss
- Pretty respectably fast, especially given its simplicity
- 64-bit, file size limit is 2^64 bytes
- Ports to anything with a C compiler and stdlib/stdio
- Public domain
限制:
- Fixed-size keys and values, must recreate and copy to change any init size parameter
- Add/update only, no delete
- Iteration is supported but key order is undefined
- No search for subsets of keys/values
- No indexes
- No transactions
- No special recovery features if a database gets corrupted
- No built-in thread-safety (guard it with a mutex in MT code)
- No built-in caching of data (only hash tables are cached for lookup speed)
- No endian-awareness (currently), so big-endian DBs won't read on little-endian machines
评论