Implementing a KVS - Searching for inspiration (1)
Since a lot of KVS already exist, It’d be interesting to look at previously developed models, to get some inspiration.
Examples of KVS :
DBM
Berkeley DB
Kyoto Cabinet
Memcached and MemcacheDB
LevelDB
MongoDB
Redis
OpenLDAP
SQLite
Requirements for our KVS :
KVS designed for OOP
everything will be on-disk
network access to data store
no ACIDÂ
no need for a query engineÂ
Berkeley DB : implemented in C, is an open source embedded (runs in the same address as the app, no inter-process comm for database operations) database library for scalable, high-performance, transaction-protected data management services to apps.
Kyoto Cabinet : implemented in C++, implements a hash table a B+ tree and other DS,but performance changes if the database’s size goes above a limit (ooooof course).
LevelDB: implemented in C++, implements a LSM (log-structured merge tree, which are optimized for SSD drives). For more than one million entries, performance drops. Clear source code though, and for a personal project, we don’t require a heavy load so that’s fine.
Redis : implemented in C, it supports different types of values, not just string values. It’s implemented using hash tables for big sets, for smaller ones however, arrays are used. Its code is very clear and it’s well documented (see github repo)










