Code Monkey home page Code Monkey logo

raft's Introduction

Raft

Raft is a simple consensus algorithm, an alternative to Paxos. This project provides an embeddable library to store consistent replicated log. Also the clients can run this as a service.

Consensus algorithm is usually a way to build replicated state machines.

It provides the clients with a simple function

updateState(byte[])

The library just replicates the byte[] array across all servers. Also the library provides the hook for the clients to plugin what to do when a log can be committed to a state machine. The library abstracts leader election, replicating logs across the cluster of machines, adding/removing a member from the cluster.

Architecture

  1. Logs and other relevant information are stored on LevelDB. LevelDB uses log structured merge tree, which provides higher write throughput.
  2. When a log is replicated across majority of the servers, the log can be applied to state machine. As this library just takes care of replicating the logs, the client has to maintain the actual state machine.

Performance

Unit testing

This library provides a simpler unit testing code base, using which you can easily launch virtual set of servers, and you can inject failures (like shutdown server, restart a server, make a partition between set of servers), but does not provide a way to test network failures.

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.