Home

Awesome

minidb

This is a minimal in-memory distributed master-less document database database.

API

Cluster:

CRUD:

Query:

The query language is similar to the one used by mongodb:

minidb:find([{"section", {'$eq', "books"}}, {"likes", {'$gt', 100}])

Operators available:

Op.NameExample
'$eq'Equals{"section", {'$eq', "books"}}
'$ne'Not Equals{"section", {'$ne', "books"}}
'$gt'Greater Than{"likes", {'$gt', 100}}
'$gte'Greater or Equals{"likes", {'$gte', 100}}
'$lt'Lower Than{"likes", {'$lt', 100}}
'$lte'Lower or Equals{"likes", {'$lte', 100}}

Note: to get everything: minidb:find([]).

Build

$ rebar3 compile

Run demo

Start the first node:

$ make node1

Start the second node:

$ make node2

After 5 seconds, the second node will automatically connect to the first in a cluster.

To clean all the configuration (cluster informations):

$ make clean