<aside>
đź’ˇ This document contains design decisions/reasoning for Barge. This project implements the original RAFT paper as closely as possible.
</aside>
Objective
- To create a minimal consensus layer implementing RAFT algorithm in golang.
- To keep the interface of consensus layer simple and pluggable with multiple transport and storage options.
- To structure the code such that barge can be used as an SDK.(
pkg
)
- To create a minimal implementation of Barge with a simple in-mem key-value store. (
cmd
)
- To create a cli that can manage bargedb instance. (
bargectl
)
- To create a Kubernetes operator for barge which can manage the lifecycle of a bargedb instance.
- To have strong consistency at the cost of slow writes. The writes will be semi-sync and will not be completed till confirmed by majo
Non-objectives
- To create a complex storage layer.
Implementation
- Each Barge instance can be modelled as a state machine transitioning through Candidate↔Follower↔Leader.
- Transport package will define the interface implemented by Consensus and vice versa.
- Mock implementation of transport interface will be used to test consensus layer.
- Mock implementation of transport interface will also be unit tested. The mock implementation will simulate RPC’s with go channels.