Get Started

image description

Package #

Binary package consists of the following files:
  • – shared C library, which must be linked with your application.
  • monotone.h – monotone C API header file.
  • monotone – monotone CLI application.

Please look at the Build and Install section for the manual build instructions.


Monotone provides simple C API.

Insert (and replace/delete) is done in batches using the event id associated with raw data. Data are read using cursors. Data management, administration, and monitoring are done by using SQL-style DDL commands.

Data storage #

Monotone represents data as a 64-bit-range sparse array of ordered events. Events are partitioned by fixed intervals, and partitions are automatically created on write or manually.

Each partition has an associated inclusive [min, max] range. Partitions never overlap. Min range is used as a partition ID for data management.

Data management is implemented using partitions as a primary unit. Data are stored in sorted partition files, which can be stored in local storage, an associated cloud, or both.

An event is a combination of 64-bit id (or time) and key/value raw data [id, key, value]. The event id and the optional key represent a serial (or time) compound primary key. Events are designed to store any kind of unstructured data. The key and value data size might be zero.

After writing, events are cached in in-memory storage associated with the partition. Eventually, the updated partition must be refreshed to sync (or create) the partition file. Refreshing can happen automatically in the background or manually.

Learn more about the Architecture.

Usage #

Typical workflow: