Giter Site home page Giter Site logo

chakra-coder / incubator-ratis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apache/ratis

0.0 1.0 0.0 3.48 MB

Mirror of Apache Ratis (Incubating)

License: Apache License 2.0

Shell 1.23% Dockerfile 0.19% Java 90.40% CMake 0.81% C 7.06% C++ 0.31%

incubator-ratis's Introduction

Apache Ratis

Apache Ratis is a java library that implements the RAFT protocol [1]. The Raft paper can be accessed at (https://raft.github.io/raft.pdf). The paper introduces Raft and states its motivations in following words:

Raft is a consensus algorithm for managing a replicated log. It produces a result equivalent to (multi-)Paxos, and it is as efficient as Paxos, but its structure is different from Paxos; this makes Raft more understandable than Paxos and also provides a better foundation for building practical systems.

Ratis aims to make raft available as a java library that can be used by any system that needs to use a replicated log. It provides pluggability for state machine implementations to manage replicated states. It also provides pluggability for Raft log, and rpc implementations to make it easy for integration with other projects. Another important goal is to support high throughput data ingest so that it can be used for more general data replication use cases.

Usage

Compile the repository using mvn clean package -DskipTests

FileStore

Server

To spawn the FileStoreStateMachineServer, use bin/server.sh filestore server --id <selfid> --storage <storage_dir> --peers <id:ip_address,...>

selfid is the id of the instance being spwaned, this should be one of the ids in the peer list.

For example ratis-examples/src/main/bin/server.sh filestore server --id n0 --storage /tmp/data --peers n0:172.26.32.224:6000,n1:172.26.32.225:6001,n2:172.26.32.226:6002

Client

To spawn the FileStoreStateMachine client, use bin/client.sh filestore loadgen --size <file_size> --numFiles <num_files> --peers <id:ip_address,...>

Where, file_size is the size of the file to be generated in bytes, num_files is the number of files to be generated.

For example ratis-examples/src/main/bin/client.sh filestore loadgen --size 1048576 --numFiles 1000 --peers n0:172.26.32.224:6000,n1:172.26.32.225:6001,n2:172.26.32.226:6002

Arithmetic

Server

To spawn the ArithmeticStateMachineServer, use bin/server.sh arithmetic server --id <selfid> --storage <storage_dir> --peers <id:ip_address,...>

selfid is the id of the instance being spwaned, this should be one of the ids in the peer list.

For example ratis-examples/src/main/bin/server.sh arithmetic server --id n0 --storage /tmp/data --peers n0:172.26.32.224:6000,n1:172.26.32.225:6001,n2:172.26.32.226:6002

Client

To spawn the ArithmeticStateMachine client, use bin/client.sh arithmetic get --name b --peers <id:ip_address,...>

Where, b is the name of the variable.

For example ratis-examples/src/main/bin/client.sh arithmetic get --name b --peers n0:172.26.32.224:6000,n1:172.26.32.225:6001,n2:172.26.32.226:6002

PS: the peer is a id, ipaddress pair seperated by ':', for eg. n0:172.26.32.224:6000

Reference

[1] Diego Ongaro and John Ousterhout. 2014. In search of an understandable consensus algorithm. In Proceedings of the 2014 USENIX conference on USENIX Annual Technical Conference (USENIX ATC'14), Garth Gibson and Nickolai Zeldovich (Eds.). USENIX Association, Berkeley, CA, USA, 305-320.

incubator-ratis's People

Contributors

anuengineer avatar bshashikant avatar elek avatar enis avatar jing9 avatar jnp avatar joshelser avatar khmarbaise avatar liuml07 avatar ljainhwx avatar lokeshj1703 avatar mukul1987 avatar ss77892 avatar szetszwo avatar xiaoyuyao avatar

Watchers

 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.