Python and Kyotocabinet: Memory Mapped Storage
summary
Kyoto Cabinet is a C++ key/value store with a Python wrapper that is memory mapped, so files get virtual addresses on open and parts or the whole database can be loaded into RAM and shared across processes. The demo uses a KCH hash index (KCT would be a tree), shows options like preloaded memory and bit-distance tuning, and scales to 50 processes in production. Example: Ulysses is indexed by word→list of lines, a concurrent test counts words and finds "lame" starts 47 lines and reports the most common sentence-starting words.
AI-written summary · about
