barge

JVM Raft Concensus Implementation

Лицензия

Лицензия

Категории

Категории

Ninja Взаимодействие с пользователем Веб-фреймворки
Группа

Группа

org.robotninjas.barge
Идентификатор

Идентификатор

barge
Последняя версия

Последняя версия

0.1.0-alpha1
Дата

Дата

Тип

Тип

pom
Описание

Описание

barge
JVM Raft Concensus Implementation
Ссылка на сайт

Ссылка на сайт

http://www.github.com/mgodave/barge
Система контроля версий

Система контроля версий

https://github.com/mgodave/barge

Скачать barge

Имя Файла Размер
barge-0.1.0-alpha1.pom 1 KB
Обзор

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.robotninjas.barge/barge/ -->
<dependency>
    <groupId>org.robotninjas.barge</groupId>
    <artifactId>barge</artifactId>
    <version>0.1.0-alpha1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.robotninjas.barge/barge/
implementation 'org.robotninjas.barge:barge:0.1.0-alpha1'
// https://jarcasting.com/artifacts/org.robotninjas.barge/barge/
implementation ("org.robotninjas.barge:barge:0.1.0-alpha1")
'org.robotninjas.barge:barge:pom:0.1.0-alpha1'
<dependency org="org.robotninjas.barge" name="barge" rev="0.1.0-alpha1">
  <artifact name="barge" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.robotninjas.barge', module='barge', version='0.1.0-alpha1')
)
libraryDependencies += "org.robotninjas.barge" % "barge" % "0.1.0-alpha1"
[org.robotninjas.barge/barge "0.1.0-alpha1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

  • barge-core
  • barge-tools

Build Status

barge (ALPHA)

An implementation of the Raft Consensus Protocol.

Todo

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

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

Roadmap

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

<dependency>
    <groupId>org.robotninjas.barge</groupId>
    <artifactId>barge-core</artifactId>
    <version>0.1.0-alpha1</version>
</dependency>

Use It

public class Test implements StateMachine {

  @Override
  public void applyOperation(@Nonnull ByteBuffer entry) {
    System.out.println(entry.getLong());
  }

  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]);
    logDir.mkdir();

    // configure the service
    RaftService raft = 
      RaftService.newBuilder(config)
        .logDir(logDir)
        .timeout(300)
        .build(new Test());

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

  }

}

Версии библиотеки

Версия
0.1.0-alpha1