OlegDB is a free, open-source, NoSQL (Key-Value) DBMS. It was primarily written in C, with a Go frontend layer, and is compatible with any POSIX compliant operating system. The user communicates with OlegDB using a simple REST API. They are also encouraged to adapt the system to their needs through several well-documented toggleable parameters.[03]
- Website
- https://olegdb.org/[01]
- Source Code
- https://github.com/infoforcefeed/OlegDB[02]
- Developers
- Country of Origin
- US
- Start Year
- 2014 [16]
- Project Types
- Commercial, Open Source
- License
- MIT License
OlegDB is a free, open-source, NoSQL (Key-Value) DBMS. It was primarily written in C, with a Go frontend layer, and is compatible with any POSIX compliant operating system. The user communicates with OlegDB using a simple REST API. They are also encouraged to adapt the system to their needs through several well-documented toggleable parameters.[03]
History[03][04][05][06]
OlegDB was created in January 2014, by a small team of international developers led by Quinlan Pfiffer. OlegDB first started as a humorous and personal project following the popularity surge of non-relational models at the beginning of the 21st century. However, the authors eventually released an open-source, licensed implementation at the end of March 2014. Several updated versions have been made public since then, the latest one dating back to January 2015, when the frontend code was migrated from Erlang to Go.
Compression[07][03][08]
OlegDB uses the LZ4 lossless data compression algorithm for storing values on disk. The user has the possibility to disable this feature if they want to accelerate data operations.
Data Model[09][03][10]
At its core, OlegDB is simply a concurrent key/value hash table. It uses the open-source MurmurHash3 hash function (32 bits option)
Indexes[11]
In addition to the hash table, OlegDB keeps track of inserted nodes using a splay tree (self-balancing binary search tree) data structure. It enables users to iterate through inserted keys in a chosen order. In order to save space, the user can chose to get rid of this optional structure through a toggleable parameter.
Logging[12][13][03]
OlegDB uses an append-only log file (nicknamed AOL) to record the high level operations executed by transactions on the database. The log records are designed to be human readable.
Query Interface[03]
Communication with OlegDB is done via a simple HTTP API. The following HTTP method are supported:
- POST: create new records/update records
- GET: fetch records
- DELETE: perform deletions
- HEAD: retrieve additional information about the records (e.g expiration date of a key)
Storage Architecture[14][03]
OlegDB uses disk storage. The system keeps track of its state through two different types of data:
- the Value file: contains all the inserted values, aligned in a four megabytes block (by default). On startup, this file is loaded in RAM using the mmap() system call.
- the AOL file: contains transaction logs. It is regularly cleaned to remove expired data.
In the original release of OlegDB, this AOL file was the only persistent data of the system and all the values were kept in memory while the database was running. The Value file was added in later versions of the implementation.
OlegDB handles collisions via separate chaining with linked list. Indeed, at runtime, a separate bucket chains list is stored in volatile memory, where each chain (linked list) corresponds to a specific key. Each bucket of the chain contains information about a unique value mapping to the chain's key (size, location in the Value file ... etc.). When the system reaches the limit of the allocated memory for this structure, a new block is allocated, and all records in the database are rehashed. The default size amount allocated by OlegDB is a tweakable parameter.
System Architecture[15]
OlegDB is not a distributed database. It is built to run on a single node. The HTTP frontend layer can however serve several OlegDB database instances running at the same time on the same machine.
Citations
16 sources- OlegDB - Project Home olegdb.org
- GitHub - infoforcefeed/OlegDB: Enough works to use this in production · GitHub github.com
- OlegDB - Documentation olegdb.org
- OlegDB - More on Go vs. Erlang olegdb.org
- Releases · infoforcefeed/OlegDB github.com
- Quinlan Pfiffer - Resume pfiffer.org
- LZ77 and LZ78 - Wikipedia wikipedia.org
- LZ4 (compression algorithm) - Wikipedia wikipedia.org
- MurmurHash - Wikipedia wikipedia.org
- OlegDB/src/oleg.c at master · infoforcefeed/OlegDB · GitHub github.com
- http://olegdb.org/docs/0.1.6/en/documentation.html#HASH_MALLOC olegdb.org
- OlegDB/src/transaction.c at master · infoforcefeed/OlegDB · GitHub github.com
- CMU 15-445/645 Database Systems (Fall 2019) :: Logging Schemes cmu.edu
- OlegDB - OlegDB 0.1.2 "Mayo Indoctrination" Released olegdb.org
- https://github.com/infoforcefeed/OlegDB/blob/master/frontend/dispatcher.go github.com
- Commits · infoforcefeed/OlegDB · GitHub github.com