User:PeterJAClark/Draft of Leveled (key-value datastore)

Leveled is an open-source on-disk key-value store written in Erlang by Martin Sumner. Leveled is hosted on GitHub under the Apache License 2.0 and has been ported to a variety of Unix-based systems, and macOS. Leveled is intended to be used as a Key-Value store within applications running on the BEAM virtual machine, and is primarily used on the Riak database.

Features
Leveled is a simple Key-Value store based on the concept of Log-Structured Merge Trees, with the following characteristics :
 * Optimised for workloads with larger values (e.g. > 4KB).
 * Explicitly supports HEAD requests in addition to GET requests:
 * Splits the storage of value between keys/metadata and body (assuming some definition of metadata is provided);
 * Allows for the application to define what constitutes object metadata and what constitutes the body (value-part) of the object - and assign tags to objects to manage multiple object-types with different extraction rules;
 * Stores keys/metadata in a merge tree and the full object in a journal of CDB files
 * Allowing for HEAD requests which have lower overheads than GET requests; and
 * Queries which traverse keys/metadatas to be supported with fewer side effects on the page cache than folds over keys/objects.
 * Support for tagging of object types and the implementation of alternative store behaviour based on type.
 * Allows for changes to extract specific information as metadata to be returned from HEAD requests;
 * Potentially usable for objects with special retention or merge properties.
 * Support for low-cost clones without locking to provide for scanning queries (e.g. secondary indexes).
 * Low cost specifically where there is a need to scan across keys and metadata (not values).
 * Written in Erlang as a message passing system between Actors.

Leveled is not a SQL database. Like other NoSQL and dbm stores, it does not have a relational data model and it does not support SQL queries. It has support for secondary indexes. Leveled was developed for use as a pure-Erlang backend for the Riak, but can be used as a key-value datastore for any application in the Erlang VM.