All Projects → eBay → Nuraft

eBay / Nuraft

Licence: apache-2.0
C++ implementation of Raft core logic as a replication library

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Nuraft

Copycat
A novel implementation of the Raft consensus algorithm
Stars: ✭ 551 (+28.74%)
Mutual labels:  replication, consensus, raft, distributed-systems
Etcd
Distributed reliable key-value store for the most critical data of a distributed system
Stars: ✭ 38,238 (+8834.11%)
Mutual labels:  consensus, raft, distributed-systems
coolbeans
Coolbeans is a distributed work queue that implements the beanstalkd protocol.
Stars: ✭ 56 (-86.92%)
Mutual labels:  distributed-systems, raft, consensus
Verdi Raft
An implementation of the Raft distributed consensus protocol, verified in Coq using the Verdi framework
Stars: ✭ 143 (-66.59%)
Mutual labels:  consensus, raft, distributed-systems
epaxos
A pluggable implementation of the Egalitarian Paxos Consensus Protocol
Stars: ✭ 39 (-90.89%)
Mutual labels:  distributed-systems, replication, consensus
Rqlite
The lightweight, distributed relational database built on SQLite
Stars: ✭ 9,147 (+2037.15%)
Mutual labels:  consensus, raft, distributed-systems
Zatt
Python implementation of the Raft algorithm for distributed consensus
Stars: ✭ 119 (-72.2%)
Mutual labels:  consensus, raft, distributed-systems
Hraftd
A reference use of Hashicorp's Raft implementation
Stars: ✭ 732 (+71.03%)
Mutual labels:  consensus, raft, distributed-systems
raftor
Distributed chat system built with rust
Stars: ✭ 31 (-92.76%)
Mutual labels:  distributed-systems, raft, consensus
Pysyncobj
A library for replicating your python class between multiple servers, based on raft protocol
Stars: ✭ 468 (+9.35%)
Mutual labels:  replication, raft, distributed-systems
Bifrost
Pure rust building block for distributed systems
Stars: ✭ 118 (-72.43%)
Mutual labels:  consensus, raft, distributed-systems
Dragonboat
Dragonboat is a high performance multi-group Raft consensus library in pure Go.
Stars: ✭ 3,983 (+830.61%)
Mutual labels:  consensus, raft, distributed-systems
Atomix
A reactive Java framework for building fault-tolerant distributed systems
Stars: ✭ 2,182 (+409.81%)
Mutual labels:  consensus, raft, distributed-systems
little-raft
The lightest distributed consensus library. Run your own replicated state machine! ❤️
Stars: ✭ 316 (-26.17%)
Mutual labels:  distributed-systems, raft, consensus
Raft
Raft Consensus Algorithm
Stars: ✭ 370 (-13.55%)
Mutual labels:  consensus, raft, distributed-systems
Kites
🪁 A consistency, partition tolerance completed distributed KV store, implementation of the Raft distributed consensus protocol and Kotlin.
Stars: ✭ 41 (-90.42%)
Mutual labels:  distributed-systems, raft
Odin
A programmable, observable and distributed job orchestration system.
Stars: ✭ 405 (-5.37%)
Mutual labels:  raft, distributed-systems
FISCO-BCOS
FISCO BCOS是由微众牵头的金链盟主导研发、对外开源、安全可控的企业级金融区块链底层技术平台。 单链配置下,性能TPS可达万级。提供群组架构、并行计算、分布式存储、可插拔的共识机制、隐私保护算法、支持全链路国密算法等诸多特性。 经过多个机构、多个应用,长时间在生产环境中的实践检验,具备金融级的高性能、高可用性及高安全性。FISCO BCOS is a secure and reliable financial-grade open-source blockchain platform. The platform provides rich features including group architecture, cross-chain communication protoc…
Stars: ✭ 1,603 (+274.53%)
Mutual labels:  raft, consensus
raft
raft is a golang library that provides a simple, clean, and idiomatic implementation of the Raft consensus protocol
Stars: ✭ 35 (-91.82%)
Mutual labels:  raft, consensus
raft-rocks
A simple database based on raft and rocksdb
Stars: ✭ 38 (-91.12%)
Mutual labels:  raft, consensus

NuRaft

build codecov

Raft implementation derived from the cornerstone project, which is a very lightweight C++ implementation with minimum dependencies, originally written by Andy Chen.

New features that are not described in the original paper, but required for the real-world use cases in eBay, have been added. We believe those features are useful for others outside eBay as well.

Features

In the original cornerstone

  • Core Raft algorithm
    • Log replication & compaction
    • Leader election
    • Snapshot
    • Dynamic membership & configuration change
  • Group commit & pipelined write
  • User-defined log store & state machine support

New features added in this project

How to Build

1. Install cmake and openssl:

  • Ubuntu
$ sudo apt-get install cmake openssl libssl-dev libz-dev
  • OSX
$ brew install cmake
$ brew install openssl
  • Windows
    • Download and install CMake.
    • Currently, we do not support SSL for Windows.

2. Fetch Asio library:

  • Linux & OSX
$ ./prepare.sh
  • Windows
    • Clone Asio into the project directory.

3. Build static library, tests, and examples:

  • Linux & OSX
$ mkdir build
$ cd build
build$ cmake ../
build$ make

Run unit tests

build$ ./runtests.sh
  • Windows:
C:\NuRaft> mkdir build
C:\NuRaft> cd build
C:\NuRaft\build> cmake -G "NMake Makefiles" ..\
C:\NuRaft\build> nmake

You may need to run vcvars script first in your build directory. For example (it depends on how you installed MSVC):

C:\NuRaft\build> c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat

How to Use

Please refer to this document.

Example Implementation

Please refer to examples.

Benchmark

Please refer to tests/bench.

Quick Benchmark Results

Supported Platforms

  • Ubuntu (tested on 14.04, 16.04, and 18.04)
  • Centos (tested on 7)
  • OSX (tested on 10.13 and 10.14)
  • Windows (built using MSVC 2019, not thoroughly tested)

Contributing to This Project

We welcome contributions. If you find any bugs, potential flaws and edge cases, improvements, new feature suggestions or discussions, please submit issues or pull requests.

Contact

License Information

Copyright 2017-2019 eBay Inc.

Author/Developer: Jung-Sang Ahn

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

3rd Party Code

  1. URL: https://github.com/datatechnology/cornerstone
    License: https://github.com/datatechnology/cornerstone/blob/master/LICENSE
    Originally licensed under the Apache 2.0 license.

  2. URL: https://github.com/stbrumme/crc32
    Original Copyright 2011-2016 Stephan Brumme
    See Original ZLib License: https://github.com/stbrumme/crc32/blob/master/LICENSE

  3. URL: https://github.com/greensky00/simple_logger
    License: https://github.com/greensky00/simple_logger/blob/master/LICENSE
    Originally licensed under the MIT license.

  4. URL: https://github.com/greensky00/testsuite
    License: https://github.com/greensky00/testsuite/blob/master/LICENSE
    Originally licensed under the MIT license.

  5. URL: https://github.com/greensky00/latency-collector
    License: https://github.com/greensky00/latency-collector/blob/master/LICENSE
    Originally licensed under the MIT license.

  6. URL: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/lcov_cobertura/lcov_cobertura.py
    License: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/LICENSE
    Copyright 2011-2012 Eric Wendelin
    Originally licensed under the Apache 2.0 license.

  7. URL: https://github.com/bilke/cmake-modules
    License: https://github.com/bilke/cmake-modules/blob/master/LICENSE_1_0.txt
    Copyright 2012-2017 Lars Bilke
    Originally licensed under the BSD license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].