Code Monkey home page Code Monkey logo

raft-rs's Introduction

Raft

Build Status

Problem and Importance

When building a distributed system one principal goal is often to build in fault-tolerance. That is, if one particular node in a network goes down, or if there is a network partition, the entire cluster does not fall over. The cluster of nodes taking part in a distributed consensus protocol must come to agreement regarding values, and once that decision is reached, that choice is final.

Distributed Consensus Algorithms often take the form of a replicated state machine and log. Each state machine accepts inputs from its log, and represents the value(s) to be replicated, for example, a hash table. They allow a collection of machines to work as a coherent group that can survive the failures of some of its members.

Two well known Distributed Consensus Algorithms are Paxos and Raft. Paxos is used in systems like Chubby by Google, and Raft is used in things like tikv or etcd. Raft is generally seen as a more understandable and simpler to implement than Paxos.

Links for Further Research

Using It

To include this project as a dependency:

[dependencies]
raft = "0.1"

This crate is currently being used in production with TiKV, and is an actively developed project. There are still several jobs, including writing extensive documentation and creating more examples, that need to be finished before reaching 1.0.

Developing

raft is intended to track the latest stable, though you'll need to use nightly to simulate a full CI build with clippy.

Using rustup you can get started this way:

rustup override set stable
rustup toolchain install nightly

In order to have your PR merged running the following must finish without error:

cargo +nightly test --features dev

You may optionally want to install cargo-check to allow for automated rebuilding while editing:

cargo watch -s "cargo check --features dev"

Acknowledgments

Thanks etcd for providing the amazing Go implementation!

Projects using raft

  • TiKV, a distributed transactional key value database powered by Rust and Raft.

raft-rs's People

Contributors

andelf avatar andremouche avatar busyjay avatar busyjon avatar c4pt0r avatar csmoe avatar cssivision avatar disksing avatar hhkbp2 avatar hicqu avatar jackdrogon avatar july2993 avatar lishuai87 avatar morefreeze avatar mrmiywj avatar ngaut avatar odeits avatar overvenus avatar richard-zhang avatar siddontang avatar tiancaiamao avatar zhangjinpeng87 avatar

Watchers

 avatar  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.