{"id":20721366,"url":"https://github.com/calvinneo/nuft","last_synced_at":"2025-10-05T14:09:47.125Z","repository":{"id":89526648,"uuid":"160189075","full_name":"CalvinNeo/Nuft","owner":"CalvinNeo","description":"Nuft is an C++17 implementation of the Raft consensus algorithm.","archived":false,"fork":false,"pushed_at":"2022-04-12T14:30:03.000Z","size":204,"stargazers_count":26,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T15:14:56.606Z","etag":null,"topics":["consensus-algorithm","consensus-protocol","raft","raft-cpp"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CalvinNeo.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}},"created_at":"2018-12-03T12:40:27.000Z","updated_at":"2025-02-23T05:56:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"d02c3e00-768d-4bc3-965a-119e27808f4f","html_url":"https://github.com/CalvinNeo/Nuft","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalvinNeo%2FNuft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalvinNeo%2FNuft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalvinNeo%2FNuft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CalvinNeo%2FNuft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CalvinNeo","download_url":"https://codeload.github.com/CalvinNeo/Nuft/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250457792,"owners_count":21433734,"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":["consensus-algorithm","consensus-protocol","raft","raft-cpp"],"created_at":"2024-11-17T03:27:14.867Z","updated_at":"2025-10-05T14:09:47.062Z","avatar_url":"https://github.com/CalvinNeo.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nuft\nNuft is an C++17 implementation of the Raft protocol.\n\n# Build\n## Requirement\n1. C++17 standard(e.g. g++ 7.2)\n2. gRPC\n3. [Nuke](https://github.com/CalvinNeo/Nuke), which is already packed in source\n4. gtest(in /usr/local/lib)\n\n## Build tests\nBuild all tests by\n```\nmake\n```\nRun all tests by\n```\n./test\n```\nRun all tests until failby(This can be used to debug)\n```\npython ./src/test/test_until_fail.py\n```\n\nSome tests maybe fail, I will later revise them.\n\n# Usage\n## API \n1. `NuftResult RaftNode::do_log(const std::string \u0026 log_string)`\n2. `NuftResult RaftNode::do_log(raft_messages::LogEntry entry, int command = 0)`\n3. `void RaftNode::run()`\n4. `void RaftNode::run(const std::string \u0026 new_name)`\n5. `void RaftNode::stop()`\n6. `void RaftNode::resume()`\n7. `NuftResult RaftNode::do_install_snapshot(IndexID last_included_index, const std::string \u0026 state_machine_state)`\n8. `NuftResult RaftNode::update_configuration(const std::vector\u003cstd::string\u003e \u0026 app, const std::vector\u003cstd::string\u003e \u0026 rem)`\n9. `std::string RaftNode::get_leader_name() const`\n10. `void safe_leave()`\n\n## Callbacks\n\n# License\n\n    Nuft -- A C++17 Raft consensus algorithm library\n    Copyright (C) 2018  Calvin Neo \n    Email: calvinneo@calvinneo.com;calvinneo1995@gmail.com\n    Github: https://github.com/CalvinNeo/Nuft/\n\n    This program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalvinneo%2Fnuft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcalvinneo%2Fnuft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcalvinneo%2Fnuft/lists"}