dreki
Dreki manages infrastructure.
Each of your physical nodes should run Dreki, and that makes the "world".
Terminology:
world
the overall "cluster"node
a machine, jail, container, vm..peer
a dreki running on a node
Dreki "core" is made of:
- Partisan distribution
- A global eventually consistent store (plum_db)
- Resolvable URNs
- Simple store abstraction
URNs address everything in Dreki and allows to mix multiple kind of data sources (called stores).
Currently, two kind of stores exists:
- The plum_db store, called "global", eventually consistent and replicated everywhere,
- Mnesia/DETS local store
All stores are queryable from all nodes, resorting to Partisan RPC if the store is local.
The world is a hierarchical acyclic graph, based on DNS. Members of World are regions and nodes:
world.domain
|- eu
|- fr
| |- ovh
| | |- sbg1
| | | `- **node1**
| | |`- rbx1
| | | `- **node2**
| |- scw
| | |- dc2
| | | `- **node3**
| | `- dc5
| | |- **node4**
|- de
| ` hzn
| | |- fsn1
| | | `- **node6**
|- ch
| `- exo
| `- gnv
| `- **node5**
Each region must define a or many member entries: _dreki.region IN SRV 0 0 1337 sub.region
, _dreki.region IN SRV 0 0 1337 node.region
.
A region can be given a friendly name by defining in _dreki.region IN TXT "Some cute name"
.
A node is defined by creating a node entry: _node._dreki.name IN SRV 0 0 PORT dns.name.
, and:
* can be given a friendly name by defining _name._dreki.name IN TXT "Some cute name",
* can be given a node name (erlang) by defining:
_node._name._dreki.name IN TXT "dreki2@node2"` (usually not needed!).
Dreki uses partisan as membership system and uses multiple databases:
plum_db
(world-wide, eventually consistent) for world metadata (called <<"global">>)- ?? ra ??
mnesia
locally (usually called <<"local">>)- whatever you want :) see
dreki_store
anddreki_store_backend
behaviour!
TODO: A consistent K/V store backed by Ra, automagically made for each region!
Everything in Dreki is addressable and addressed by Dreki URNs (see doc/URNs.md
).
A dreki peer may represent a node and may create nodes.
Stores:
- "inf.random.sh::qqch::id"
- "inf.random.sh:eu:fr:scw:dc2::qqch::id"