All Projects → zv → Artifact

zv / Artifact

Licence: other
An in-memory distributed database

Programming Languages

elixir
2628 projects
erlang
1774 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Artifact

sucredb
Distributed KV database with causality tracking
Stars: ✭ 51 (-19.05%)
Mutual labels:  key-value, dynamo
iris
Distributed streaming key-value storage
Stars: ✭ 55 (-12.7%)
Mutual labels:  key-value
haro
Haro is a modern immutable DataStore
Stars: ✭ 24 (-61.9%)
Mutual labels:  key-value
nim-lmdb
Nim LMDB wrapper
Stars: ✭ 31 (-50.79%)
Mutual labels:  key-value
thesaurus
TT Hackathon 2018 - Autocomplete for Visual Programming Nodes
Stars: ✭ 23 (-63.49%)
Mutual labels:  dynamo
rosedb
🚀 A high performance NoSQL database based on bitcask, supports string, list, hash, set, and sorted set.
Stars: ✭ 2,957 (+4593.65%)
Mutual labels:  key-value
cachegrand
cachegrand is an open-source fast, scalable and secure Key-Value store, also fully compatible with Redis protocol, designed from the ground up to take advantage of modern hardware vertical scalability, able to provide better performance and a larger cache at lower cost, without losing focus on distributed systems.
Stars: ✭ 87 (+38.1%)
Mutual labels:  key-value
keva
Low-latency in-memory key-value store, Redis drop-in alternative
Stars: ✭ 76 (+20.63%)
Mutual labels:  key-value
Settings
A Laravel multi-tenant settings manager
Stars: ✭ 36 (-42.86%)
Mutual labels:  key-value
Curator
A lightweight key-value file manager written in Swift.
Stars: ✭ 14 (-77.78%)
Mutual labels:  key-value
gocache
High performance and lightweight in-memory cache library with LRU and FIFO support as well as memory-usage-based-eviction
Stars: ✭ 15 (-76.19%)
Mutual labels:  key-value
cantor
Data abstraction, storage, discovery, and serving system
Stars: ✭ 25 (-60.32%)
Mutual labels:  key-value
cruzdb
Append-only key-value database on a distributed shared-log
Stars: ✭ 47 (-25.4%)
Mutual labels:  key-value
TuneUp
A profiler for Dynamo graphs
Stars: ✭ 27 (-57.14%)
Mutual labels:  dynamo
bftkv
A distributed key-value storage that's tolerant to Byzantine fault.
Stars: ✭ 27 (-57.14%)
Mutual labels:  key-value
database-engine
LSM-Tree Key-Value Store based on RocksDB
Stars: ✭ 47 (-25.4%)
Mutual labels:  key-value
quitsies
A persisted drop-in replacement for Memcached, respecting the rules of quitsies.
Stars: ✭ 16 (-74.6%)
Mutual labels:  key-value
SketchUpNET
SketchUp C# API - A C++/CLI API Wrapper for the Trimble(R) SketchUp(R) C API
Stars: ✭ 83 (+31.75%)
Mutual labels:  dynamo
fast-jepsen
Using "Testing Shared Memories" paper to make Jepsen check linearizability in linear time
Stars: ✭ 21 (-66.67%)
Mutual labels:  key-value
DynFreeCAD
Dynamo nodes for FreeCAD
Stars: ✭ 41 (-34.92%)
Mutual labels:  dynamo

Artifact

Artifact is a distributed key-value datastore, which is inspired by the Amazon’s Dynamo Paper.

I’ve benchmarked artifact at 1,200 querys-per-second for a 16 node system with 1GB assigned to each container (single machine). At peak load, 99% of requests fell under 300ms.

Features

  • Consistently hashing load distribution
  • Fair Load balancing
  • Secondary Indexes
  • Custom storage backends (ETS, DETS are standard)
  • Quorum coordinator
  • Memcache and TLL interfaces
  • Gossip protocol membership

Warning!

This is an Elixir rewrite of my original Erlang project and is not guaranteed to work the same way.

This database could have major problems, I’ve never submitted it to any sort of substantial peer review or audit. I’ve been working on it for some time and I’m still hashing things out. If you find any such problems please file an issue!

Running

Standalone

The easiest way to get up and running with Artifact is to boot a standalone instance. Artifacts configuration (config/config.exs) is configured for this use-case by default.

Clustering

iex(1)> Application.start(:artifact)
:ok
iex(2)> Artifact.RPC.check('kai2.local': 11011, 'kai1.local': 11012)
:ok
iex(3)> Artifact.RPC.check('kai2.local': 11011, 'kai1.local': 11012)
:ok

Artifat maintains a node manifest, including the members of it’s own cluster. When invoking check, it’s asking to retrieve the manifest manually from another node. Calling this function twice can bootstrap the process by mutually ensuring that each node has been added to the other’s manifest.

Synchronization will need to synchronize log2(STORAGE_CNT)*32 + overhead bytes, so give it some time if you’ve built up a large entry count.

To verify that a node has been added to the node manifest:

iex(5)> Artifact.RPC.node_manifest('kai1.local')
{:node_manifest, [{{'10.0.0.53', 11011}}, {{'10.0.0.80', 11011}}]

Memcache

Once you have a server started, you can read and write to it just as if it were a memcached daemon.

% nc localhost 11211
set foo 0 0 3
bar
STORED
get foo
VALUE foo 0 3
bar

Configuration

All configuration values are loaded at startup from config/config.exs. If you’d like to know what configuration a system is running, you can query it with

iex> Artifact.config.node_info
{:node_info, {{127,0,0,1}, 10070}, [{:vnodes, 256}]}

Quorum

quorum: {
  # Number of Participants
  1,
  # Reader workers
  1,
  # Writer workers
  1
},

Artifact doesn’t keep a strict quorum system and so the values used in quorum refer to the minimum number of nodes to participate in some operation for it to be successful. N, the first parameter, is the number of participants in the ‘preference list’ and although there can be more nodes added to the system than N, those excess nodes won’t verify replicas. R, the second, is the minimum number of nodes that must participate in a successful read operation. W is the minimum number of nodes that must participate in a successful write operation. The latency of a get (or put) operation is dictated by the slowest of the R (or W) replicas. For this reason, R and W are usually configured to be less than N, to provide better latency.

Ring Parameters & Load Balancing

# Buckets are the atomic unit of interdatabase partitioning. Adjusting
# this upward will give you more flexibility in how finely grained your
# data will be split at the cost of more expensive negotiation.
buckets: 2048,

# Individual physical nodes present themselves as a multitude of
# virtual nodes in order to address the problem within consistent
# hashing of a non-uniform data distribution scheme, therefore vnodes
# represents a limit of how many physical nodes exist in your
# datastore.
vnodes: 256,
tables: 512,

Instead of mapping nodes to a single point in the ring, each node gets assigned to multiple points. To this end, Artifact uses the Dynamo concept of “virtual nodes”. A virtual node looks like a single node in the system, but each node can be responsible for more than one virtual node. Effectively, when a new node is added to the system, it is assigned multiple positions (“tokens”) in the ring. Using virtual nodes has the following advantages:

  • If a node becomes unavailable (due to failures or routine maintenance), the load handled by this node is evenly dispersed across the remaining available nodes.
  • When a node becomes available again, or a new node is added to the system, the newly available node accepts a roughly equivalent amount of load from each of the other available nodes.
  • The number of virtual nodes that a node is responsible can decided based on its capacity, accounting for heterogeneity in the physical infrastructure.

Storage

store: Artifact.Store.ETS,

I haven’t ported DETS over from my original Erlang implementation yet and so you are stuck with ETS for now.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].