Git Product home page Git Product logo

c5-replicator's Introduction

c5 replicator

Build status HuBoard badge Gitter chat

This is an implementation of the Raft consensus protocol. It can replicate arbitrary data between several servers.

Building

To build this project, simply

mvn install

Using in another project

This project hosts its own maven snapshot repository on github. To access it, add these lines to your pom.xml:

<repositories>
  <repository>
    <id>c5-replicator-mvn-repo</id>
    <url>https://raw.github.com/OhmData/c5-replicator/mvn-repo/</url>
    <snapshots>
      <enabled>true</enabled>
      <updatePolicy>always</updatePolicy>
    </snapshots>
  </repository>
</repositories>

Then you'll be able to add the project's dependencies:

<dependency>
  <groupId>c5db</groupId>
  <artifactId>c5-replicator-api</artifactId>
  <version>0.1-SNAPSHOT</version>
</dependency>

Module overview

  • c5-replicator-api: Interfaces used by all other modules to communicate with each other, as well as value-type and generated classes referred to by the interfaces
  • c5-replicator: Implementation of the consensus protocol logic (see class ReplicatorInstance), as well as networking and starting/stopping the server
  • c5-replicator-log: Implementation of the (local disk) log used by the replicator (see class QuorumDelegatingLog)
  • c5-replicator-proto: Generated classes and their .proto specs
  • c5-replicator-util: Common utilities for implementations and tests
  • c5-general-replication: Example usage of all preceding modules to host a three-replicator node all on localhost
  • cat-olog: Log-reading utility

Example usage

Example usage may be found in the test(s) in project module c5-general-replication.

Log-reading utility usage

Provided is a utility for reading the logs generated by the replicator; the code for this utility is in module cat-olog, and it may be run from the command line as:

cat-olog/bin/cat_olog.sh <log file name>

Troubleshooting

On Mac OSX:

export JAVA_HOME=`/usr/libexec/java_home -v 1.8`

More documentation

For more information about the code and package structure, please see the package-info.java files in the c5-replicator module in package c5db.replication; and in the c5-replicator-log module in package c5db.log, respectively.

C5 is hosted on GitHub at https://github.com/cloud-software-foundation/c5.

c5-replicator's People

Contributors

joshua-g avatar ryanobjc avatar posix4e avatar time-palominodb avatar alexy avatar

Watchers

James Cloos avatar Thirugnanam Subbiah avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.