Skip to content

Instantly share code, notes, and snippets.

@azenla
Last active November 4, 2015 19:01
Show Gist options
  • Save azenla/97b34208bdee27a4c37d to your computer and use it in GitHub Desktop.
Save azenla/97b34208bdee27a4c37d to your computer and use it in GitHub Desktop.

RealDB

An efficient multi-purpose database and key-value storage engine. RealDB is inspired by MongoDB. RealDB's goal is to provide a single way to store collections of data, while also storing key-value data.

Concepts

Databases

A RealDB instance can have multiple databases.

Collections

A database can contain multiple collections. Collections are a list of objects. Each object in the collection is assigned a unique id, which can be used to update or delete the object.

Stores

A database can also contain multiple stores. A store is a key-value table which offers an easier interface for systems that need to associate objects. The keys and values in a store can be any value type. A store can have keys with different value types.

Indexes

A collection can have an index that provides efficient querying of data. An index is a subset of information about objects in collections.

Operation Log

Every operation is added to an operation log. This log can be used to replicate data with other instances in a cluster.

Performance Measures

RealDB will have a couple of measures it will take to efficiently store data.

MsgPack

RealDB uses MsgPack for data storage and protocol transmission.

Fast Inserts

RealDB is focussed on providing super fast inserts by using a custom mechanism to seek to the bottom of a MsgPack list data file.

Partials

RealDB will deliver an efficient system for storing data by storing data in a partial manor. This means that any single object in a row can be split up into multiple chunks. References to the chunks in an object are stored in-place of the object. When reading the data, references are resolved into the real object.

Equivalent Partial Storage

RealDB will provide an option to store a unique partial once, but allow that partial to be reused for multiple reference sources. This means that data can be stored in a space efficient manor without taking away from the meaning of the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment