{"id":21485780,"url":"https://github.com/singingwithcode/raft","last_synced_at":"2025-07-12T08:33:19.219Z","repository":{"id":114389738,"uuid":"312167678","full_name":"singingwithcode/Raft","owner":"singingwithcode","description":"Fault Tolerant Server","archived":false,"fork":false,"pushed_at":"2020-11-12T04:44:27.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T19:34:14.829Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/singingwithcode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2020-11-12T04:31:55.000Z","updated_at":"2022-06-16T20:15:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"ebb7d717-6a3c-403f-acfd-f7fe262171d4","html_url":"https://github.com/singingwithcode/Raft","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/singingwithcode%2FRaft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singingwithcode%2FRaft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singingwithcode%2FRaft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/singingwithcode%2FRaft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/singingwithcode","download_url":"https://codeload.github.com/singingwithcode/Raft/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014135,"owners_count":20383715,"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":[],"created_at":"2024-11-23T13:17:28.064Z","updated_at":"2025-03-17T10:09:09.626Z","avatar_url":"https://github.com/singingwithcode.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raft\nFault Tolerance System\n\nTO RUN:\n“sbt run” at root folder\n\nNo further input is necessary. Everything is generated at random so there will be no similar outputs. All phases start at phase0 and increase on the first timeout. The Raft algorithm was implemented using akka actors. I wanted it to be a true distributed system without having a maserActor(server) above the actorServers. So all “actorServers are at /user/_. The servers have direct contact with one another until told not to by the raftTest.\n\nCLASSES:\nThe raftTest randomly chooses to make a actorServer crash or return to service. It may be the leader or a follower that crashes and the raft implementation handles the cases. In some cases, we may not have enough servers to have a majority agreement on the leader, so the running servers will keep trying until the needed majority is back up. Also, the test(s) may start in phase0 with a server down, before it even runs the raft implementation. \n\nThe raftTimer is an actor for each actorServer that tells the actorServer when it times out. The timeout is use for both as a follower and as a leaderElect. A leaderElect is when an actorServer increases the phase but needs a majority to become the leader, before it times out. \n\nThe hearbeatTimer is used to give the leading actorServer heartbeat interval releases to the other actorServers who are following the leader. If you are not the leader or came from being a leader, these will not appear to the actorServer and/or will be CANCELED. \n\nThe raft.scala file is the heart of the algorithm and coordinates as an actorServer. \n\nThe applicationconfig file contains the hard interval numbers. \n\nIf you wish to add/subtract additional servers, you will have to change 3 places:\n-applicationconfig file\n-in “object raft” \u003e add/subtract additional variable declaration(s) of actor\n-under sendAll() you need to add/subtract the path of the new actor\n\nThere are also case classes used to help declare and transmit messages.\n\nNOTES:\nIf you wish to see the returning HEARTBEATREPLYs then uncomment the marked section. This helps aid to see which servers are replying, so you know which servers are down – if they have been down for a while. \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingingwithcode%2Fraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsingingwithcode%2Fraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsingingwithcode%2Fraft/lists"}