hermes

Go Report Card tests GitHub last commit GitHub repo size Lines of code GitHub HitCount

Hermes is a distributed key-value store which guarantees data consistency through CRDT’s


Dowload

Please run

go get "github.com/bjornaer/hermes"

Introduction

CRDT

Conflict-Free Replicated Data Types (CRDTs) are data structures that power real-time collaborative applications in distributed systems. CRDTs can be replicated across systems, they can be updated independently and concurrently without coordination between the replicas, and it is always mathematically possible to resolve inconsistencies that might result.

In other (more practical) words: CRDTs are a certain form of data types that when replicated across several nodes over a network achieve eventual consistency without the need for a consensus round

BTree

In computer science, a B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree is a generalization of a binary search tree in that a node can have more than two children. Unlike self-balancing binary search trees, the B-tree is well suited for storage systems that read and write relatively large blocks of data, such as discs. It is commonly used in databases and file systems.


Package

This package implements a CRDT interface that runs on top of a BTree structure which by itself abstracts the filesystem blocks to store data

This codebase is set to implement a DB server that allows for multiple nodes of the same DB to be run distributed and uses CRDT to derive consistency.


Examples

While I haven’t added examples to this DB directly you can find examples of CRDT usage over here


Run tests

To run tests

go test ./...

Roadmap

  • Enable multiple nodes to be created
  • Have peer to peer connection working
  • CI/CD
  • Create Hermes-Client to acces hermes from the code
  • Publish Hermes binary to Brew


Bibliography

GitHub

View Github