Kyoto Cabinet is a library of routines to manage a database. It is a multithreaded key-value embedded database manager. Both keys and values are composed of variable-length bytes since there is no concept of data types in Kyoto Cabinet. All keys must be unique since there is no concept of tables in Kyoto Cabinet, which means a database contains a single table. Kyoto Cabinet is a successor and modern implementation of UNIX DBM by AT&T in 1979. It provides different object-oriented database implementations, which differ in whether using Hash Table or B+ Tree, or whether enabling cache. They are BasicDB
(common interface), ProtoHashDB
(on-memory hash database), ProtoTreeDB
(on-memory tree database), StashDB
(lightweight on-memory hash database with cache), CacheDB
(on-memory database with LRU cache), GrassDB
(on-memory tree database with cache), HashDB
(file hash database), TreeDB
(file tree database), DirDB
(directory hash database), ForestDB
(directory tree database), TestDB
(text database) and PolyDB
(polymorphic database). All of the implementations in Kyoto Cabinet support inserting, deleting and query operations. Moreover, the B+ Tree based implementations also support traversal operation. The file size for each record in Kyoto Cabinet can take either 4KB or 16KB space, based on whether using B+ Tree or Hash Table, and the total database size can be up to 8EB.
Kyoto Cabinet is announced by its author as the modern implementation of DBM library originally implemented by AT&T in 1979. After the release of the original DBM library, variant DBM libraries were then written by different groups. In 2009, Kyoto Cabinet was developed by FAL Labs to be the variant of QDBM, one of the UNIX DBM-like products developed in 2003, for some performance reasons.
The checkpointing procedure basically blocks all other threads no matter whether they are updating or reading. Any backup can be done by using the copy method. Besides, database implementations that support cache in Kyoto Cabinet can use dump_snapshot method to complete pseudo-snapshot functionality. The checkpointing backs up database records and status into a stream or output file. There is also a non-blocking backup mechanism called 'hot backup', which uses the built-in snapshot functionality by the operating system and the synchronize method in Kyoto Cabinet to synchronize any later updates.
The connections to the database are in either reader mode or writer mode. Readers can only retrieve records, while writers can call all the methods. If a reader process has connected to the database, only other reader processes can connect to that database. However, writer processes have the exclusive access to the database, thus no later processes will be granted the access. There is no concurrency control since database has different permissions for different connection modes and the concurrency is done in the process level.
Each record in the database consists of a key and a value. Kyoto Cabinet supports adding key-value pair, deleting by key, retrieval by key and traversal every key. Every key must be unique in a database since there is no table concept. Keys and values are variable length bytes in Kyoto Cabinet.
Custom API Command-line / Shell
Kyoto Cabinet supports direct shell commands through the terminal. Which database implementation and operation name need to be pointed out. Kyoto Cabinet also supports API in multiple programming languages such as C, C++, Java, Lua, Perl, Python, Ruby by using namespace or importing packages. The application is then compiled (if applicable) and executed through the terminal.
Some of the database implementations in Kyoto Cabinet primarily rely on memory for storage, including ProtoDB, StashDB, CacheDB and GrassDB. Others mainly rely on disk for storage, such as HashDB, TreeDB, DirDB and ForestDB. For those whose storage is disk-oriented, they can choose to either store in single file, or in multiple files in a same directory.
http://fallabs.com/kyotocabinet/
https://fallabs.com/kyotocabinet/pkg/
http://fallabs.com/kyotocabinet/api/
FAL Labs
2009
Ayanokoji Cabinet
C, C++, Java, Lua, Perl, Python, Ruby
BSD, Linux, OS X, Solaris, Windows
https://en.wikipedia.org/wiki/Tokyo_Cabinet_and_Kyoto_Cabinet