A JVM Implementation of the Raft Consensus Protocol
Java CSS Clojure Other
Latest commit 0af2610 Oct 7, 2015 @mgodave Merge pull request #82 from orthographic-pedant/spell_check/consensus
Fix typographical error(s)


Build Status

barge (ALPHA)

An implementation of the Raft Consensus Protocol.


Barge is still a work in progress, two major missing features are:

  • Log Compaction (alpha2)
  • Dynamic Membership (alpha2)


Barge is currently at 0.1.0-alpha1. I intend to release an alpha2 when the library is feature complete from the standpoint of the paper. Interest and involvement will determine how the library progresses past the alpha stage.

Get It


Use It

public class Test implements StateMachine {

  public void applyOperation(@Nonnull ByteBuffer entry) {

  public static void main(String... args) throws Exception {

    ClusterConfig config = ClusterConfig.from(
      Replica.fromString("localhost:10000"), // local
      Replica.fromString("localhost:10001"), // remote
      Replica.fromString("localhost:10002")  // remote

    File logDir = new File(args[0]);

    // configure the service
    RaftService raft = 
        .build(new Test());

    // start this replica

    // let's commit some things
    for (int i = 0; i < 10; i++) {
      raft.commit(new byte[] {'O', '_', 'o'}).get();