最简单的 key/value 存储 KISSDB

Public Domain
C/C++
跨平台
2013-04-26
红薯

(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
加载中

评论(0)

暂无评论

暂无资讯

暂无问答

暂无博客

返回顶部
顶部