{"id":15365912,"url":"https://github.com/ivanprodaiko94/raft-protocol-implementation","last_synced_at":"2025-04-15T10:50:27.274Z","repository":{"id":57516038,"uuid":"176105347","full_name":"IvanProdaiko94/raft-protocol-implementation","owner":"IvanProdaiko94","description":"Raft protocol implementation as part of \"Distributed databases\" course in UCU","archived":false,"fork":false,"pushed_at":"2019-08-05T08:26:37.000Z","size":22,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T19:13:01.377Z","etag":null,"topics":["consensus","consensus-algorithm","distributed","distributed-systems","raft","raft-consensus","raft-protocol","ucu"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IvanProdaiko94.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}},"created_at":"2019-03-17T13:30:29.000Z","updated_at":"2024-03-21T15:14:24.000Z","dependencies_parsed_at":"2022-08-28T16:23:41.500Z","dependency_job_id":null,"html_url":"https://github.com/IvanProdaiko94/raft-protocol-implementation","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/IvanProdaiko94%2Fraft-protocol-implementation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanProdaiko94%2Fraft-protocol-implementation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanProdaiko94%2Fraft-protocol-implementation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IvanProdaiko94%2Fraft-protocol-implementation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IvanProdaiko94","download_url":"https://codeload.github.com/IvanProdaiko94/raft-protocol-implementation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249057496,"owners_count":21205904,"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","consensus-algorithm","distributed","distributed-systems","raft","raft-consensus","raft-protocol","ucu"],"created_at":"2024-10-01T13:16:40.061Z","updated_at":"2025-04-15T10:50:27.227Z","avatar_url":"https://github.com/IvanProdaiko94.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# raft-protocol-implementation\nRaft protocol implementation as part of \"Distributed databases\" course in UCU\n\n## Raft decomposes the consensus problem into three relatively independent subproblems:\n- **Leader election**: a new leader must be chosen when an existing leader fails.\n- **Log replication**: the leader must accept log entries\n- **Safety**: the key safety property for Raft is the State Machine Safety Property. If any server has applied a particular \nlog entry to its state machine, then no other server may apply a different command for the same log index. The solution involves an\nadditional restriction on the election mechanism.\n\n##  Raft guarantees that each of these properties is true at all times.\n- **Election Safety**: at most one leader can be elected in a given term.\n- **Leader Append-Only**: a leader never overwrites or deletes entries in its log; it only appends new entries.\n- **Log Matching**: if two logs contain an entry with the same index and term, then the logs are identical in all entries\nup through the given index.\n- **Leader Completeness**: if a log entry is committed in a given term, then that entry will be present in the logs\nof the leaders for all higher-numbered terms.\n- **State Machine Safety**: if a server has applied a log entry at a given index to its state machine, no other server\nwill ever apply a different log entry for the same index.\n\n## Info about implementation\n- Each server launches rpc server\n- Communication with client is done via [raft http client](https://github.com/IvanProdaiko94/raft-protocol-implementation-client) or you can do it directly via [evans](https://github.com/ktr0731/evans)\n- Creating new entry is done via leader node, other nodes will respond with no success and leader id.\n- Each node could reveil log via `GetLog` rpc call. (this is done according to task requirements)\n\n## How to launch:\n\n- Install dependencies with `dep ensure`\n- Change number of nodes and set an unique ID to each in `env/env.go`\n- Run `main.go` with `ID=x` env variable set.\n- Run several processes to create cluster.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanprodaiko94%2Fraft-protocol-implementation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanprodaiko94%2Fraft-protocol-implementation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanprodaiko94%2Fraft-protocol-implementation/lists"}