Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/lanthony734/raft_consensus

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/lanthony734/raft_consensus

  • v0.0.0-20240329202946-da557500c69c
  • Source
  • Go
  • Socket score

Version published
Created
Source

Date created: 10/12/23


This project was an exercise in the Raft replicated state machine protocol and the Go language. Referencing a lab assignment adapted from MIT's 2021 6.824 course with the support of Frans Kaashoek, Robert Morris, and Nickolai Zeldovich:

"Raft is a replicated state machine protocol. A replicated service (e.g., key/value database) achieves 
fault tolerance by storing copies of its data on multiple replica servers. Replication allows the 
service to continue operating even if some of its servers experience failures (crashes or a broken or 
flaky network). The challenge is that failures may cause the replicas to hold differing copies
of the data...
...Raft manages a service's state replicas, and in particular it helps the service sort out what the correct
state is after failures. Raft implements state machine replication. It organizes client requests into a 
sequence, called the log, and ensures that all the replicas agree on the contents of the log. Each replica 
executes the client requests in the log in the order they appear in the log, applying those requests to 
the replica's local copy of the service's state. Since all the live replicas see the same log contents, 
they all execute the same requests in the same order, and thus continue to have identical service state. 
If a server fails but later recovers, Raft takes care of bringing its log up to date. Raft will continue 
to operate as long as at least a majority of the servers are alive and can talk to each other. If there is
no such majority, Raft will make no progress, but will pick up where it left off as soon as a majority 
can communicate again."

See https://en.wikipedia.org/wiki/Raft_(algorithm) for more details about Raft. More project details are available upon request.

Note: This implemention relies on function and type definitions from files not provided in this repository. As such, the provided Raft.go file does not compile on its own.

FAQs

Package last updated on 29 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc