{"id":13504420,"url":"https://github.com/eBay/NuRaft","last_synced_at":"2025-03-29T21:30:34.584Z","repository":{"id":35617335,"uuid":"199921433","full_name":"eBay/NuRaft","owner":"eBay","description":"C++ implementation of Raft core logic as a replication library","archived":false,"fork":false,"pushed_at":"2024-04-10T05:43:10.000Z","size":1005,"stargazers_count":939,"open_issues_count":58,"forks_count":216,"subscribers_count":41,"default_branch":"master","last_synced_at":"2024-04-14T13:06:50.549Z","etag":null,"topics":["availability","consensus","consistency","cpp","distributed-systems","network","raft","raft-cpp","raft-cxx","replication"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eBay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-07-31T20:05:08.000Z","updated_at":"2024-04-15T18:09:59.932Z","dependencies_parsed_at":"2023-10-03T04:40:45.205Z","dependency_job_id":"57fde556-bea3-47c3-9dc5-66a26b901b9f","html_url":"https://github.com/eBay/NuRaft","commit_stats":{"total_commits":240,"total_committers":32,"mean_commits":7.5,"dds":"0.24583333333333335","last_synced_commit":"c711f7beba4d45c3b979c7e2e4442c7b85d88f84"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FNuRaft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FNuRaft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FNuRaft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eBay%2FNuRaft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eBay","download_url":"https://codeload.github.com/eBay/NuRaft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246249134,"owners_count":20747164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["availability","consensus","consistency","cpp","distributed-systems","network","raft","raft-cpp","raft-cxx","replication"],"created_at":"2024-08-01T00:00:37.360Z","updated_at":"2025-03-29T21:30:34.573Z","avatar_url":"https://github.com/eBay.png","language":"C++","funding_links":[],"categories":["Components","C++"],"sub_categories":["Vectors"],"readme":"\nNuRaft\n======\n\n[![build](https://github.com/eBay/NuRaft/workflows/build/badge.svg)](https://github.com/eBay/NuRaft/actions)\n[![codecov](https://codecov.io/gh/eBay/NuRaft/branch/master/graph/badge.svg)](https://codecov.io/gh/eBay/NuRaft)\n\nRaft implementation derived from the [cornerstone](https://github.com/datatechnology/cornerstone) project, which is a very lightweight C++ implementation with minimum dependencies, originally written by [Andy Chen](https://github.com/andy-yx-chen).\n\nNew features that are not described in the [original paper](https://raft.github.io/raft.pdf), 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.\n\n\nFeatures\n--------\n### In the original cornerstone ###\n* Core Raft algorithm\n    * Log replication \u0026 compaction\n    * Leader election\n    * Snapshot\n    * Dynamic membership \u0026 configuration change\n* Group commit \u0026 pipelined write\n* User-defined log store \u0026 state machine support\n\n### New features added in this project ###\n* [Pre-vote protocol](docs/prevote_protocol.md)\n* [Leadership expiration](docs/leadership_expiration.md)\n* [Priority-based semi-deterministic leader election](docs/leader_election_priority.md)\n* [Read-only member (learner)](docs/readonly_member.md)\n* [Object-based logical snapshot](docs/snapshot_transmission.md)\n* [Custom/separate quorum size for commit \u0026 leader election](docs/custom_quorum_size.md)\n* [Asynchronous replication](docs/async_replication.md)\n* [SSL/TLS support](docs/enabling_ssl.md)\n* [Parallel Log Appending](docs/parallel_log_appending.md)\n* [Custom Commit Policy](docs/custom_commit_policy.md)\n\nHow to Build\n------------\n#### 1. Install `cmake` and `openssl`: ####\n\n* Ubuntu\n```sh\n$ sudo apt-get install cmake openssl libssl-dev libz-dev\n```\n\n* OSX\n```sh\n$ brew install cmake\n$ brew install openssl\n```\n* Windows\n    * Download and install [CMake](https://cmake.org/download/).\n    * Currently, we do not support SSL for Windows.\n\n#### 2. Fetch [Asio](https://github.com/chriskohlhoff/asio) library: ####\n\n##### Using git submodule\n\n```sh\n$ git submodule update --init\n```\n\n##### Other ways to fetch:\n\n* Linux \u0026 OSX: using the bash script\n\n```sh\n$ ./prepare.sh\n```\n\n* Windows: doing it manually\n  * Clone [Asio](https://github.com/chriskohlhoff/asio) `asio-1-24-0` into the project directory.\n\n```sh\nC:\\NuRaft\u003e git clone https://github.com/chriskohlhoff/asio -b asio-1-24-0\n```\n\n#### 3. Build static library, tests, and examples: ####\n\n* Linux \u0026 OSX\n```sh\n$ mkdir build\n$ cd build\nbuild$ cmake ../\nbuild$ make\n```\n\nRun unit tests\n```sh\nbuild$ ./runtests.sh\n```\n\n* Windows:\n```sh\nC:\\NuRaft\u003e mkdir build\nC:\\NuRaft\u003e cd build\nC:\\NuRaft\\build\u003e cmake -G \"NMake Makefiles\" ..\\\nC:\\NuRaft\\build\u003e nmake\n```\n\nYou may need to run `vcvars` script first in your `build` directory. For example (it depends on how you installed MSVC):\n```sh\nC:\\NuRaft\\build\u003e c:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat\n```\n\nAlternative build method - with Conan\n----------\nIf you project needs to integrate with NuRaft and you build your project with Conan you might want \nto have NuRaft built with Conan too. This is now supported: this project has conanfile.py which can be used\nto build locally and export the package to conan cache/repository or use it in **editable** mode locally.\n\n1. Install conan using one of the methods desribed here: https://conan.io/downloads\n1. `conan build .` - builds Release configuration\n1. `conan build . -s build_type=Debug` builds an alternative configuration supported by CMake\n1. You can control supported build options via command line as well, ex:\n    `conan build . -o build_tests=True`\n\nHow to Use\n----------\nPlease refer to [this document](./docs/how_to_use.md).\n\n\nExample Implementation\n-----------------------\nPlease refer to [examples](./examples).\n\n\nBenchmark\n---------\nPlease refer to [tests/bench](./tests/bench).\n\n[Quick Benchmark Results](./docs/bench_results.md)\n\n\nSupported Platforms\n-------------------\n* Ubuntu (tested on 14.04 -- 20.04)\n* Centos (tested on 7)\n* OSX (tested on 10.13 -- 12.3)\n* Windows (built using MSVC 2019, not thoroughly tested)\n\n\nContributing to This Project\n----------------------------\nWe welcome contributions. If you find any bugs, potential flaws and edge cases, improvements, new feature suggestions or discussions, please submit issues or pull requests.\n\n\nContact\n-------\n* Jung-Sang Ahn \u003cjungsang.ahn@gmail.com\u003e\n\n\nLicense Information\n--------------------\nCopyright 2017-present eBay Inc.\n\nAuthor/Developer: Jung-Sang Ahn\n\nLicensed 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\n\nhttps://www.apache.org/licenses/LICENSE-2.0\n\nUnless 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.\n\n\n3rd Party Code\n--------------\n1. URL: https://github.com/datatechnology/cornerstone\u003cbr\u003e\nLicense: https://github.com/datatechnology/cornerstone/blob/master/LICENSE\u003cbr\u003e\nOriginally licensed under the Apache 2.0 license.\n\n2. URL: https://github.com/stbrumme/crc32\u003cbr\u003e\nOriginal Copyright 2011-2016 Stephan Brumme\u003cbr\u003e\nSee Original ZLib License: https://github.com/stbrumme/crc32/blob/master/LICENSE\n\n3. URL: https://github.com/greensky00/simple_logger\u003cbr\u003e\nLicense: https://github.com/greensky00/simple_logger/blob/master/LICENSE\u003cbr\u003e\nOriginally licensed under the MIT license.\n\n4. URL: https://github.com/greensky00/testsuite\u003cbr\u003e\nLicense: https://github.com/greensky00/testsuite/blob/master/LICENSE\u003cbr\u003e\nOriginally licensed under the MIT license.\n\n5. URL: https://github.com/greensky00/latency-collector\u003cbr\u003e\nLicense: https://github.com/greensky00/latency-collector/blob/master/LICENSE\u003cbr\u003e\nOriginally licensed under the MIT license.\n\n6. URL: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/lcov_cobertura/lcov_cobertura.py\u003cbr\u003e\nLicense: https://github.com/eriwen/lcov-to-cobertura-xml/blob/master/LICENSE\u003cbr\u003e\nCopyright 2011-2012 Eric Wendelin\u003cbr\u003e\nOriginally licensed under the Apache 2.0 license.\n\n7. URL: https://github.com/bilke/cmake-modules\u003cbr\u003e\nLicense: https://github.com/bilke/cmake-modules/blob/master/LICENSE_1_0.txt\u003cbr\u003e\nCopyright 2012-2017 Lars Bilke\u003cbr\u003e\nOriginally licensed under the BSD license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeBay%2FNuRaft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FeBay%2FNuRaft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FeBay%2FNuRaft/lists"}