go-raft

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2022 License: MIT Imports: 1 Imported by: 0

README

Implementation of Raft by Golang

Go Report Card GitHub license

This project is an implementation of Raft algorithm by golang.

What is Raft ? (the introduction below is from Official Site of Raft)

Raft is a consensus algorithm that is designed to be easy to understand. It's equivalent to Paxos in fault-tolerance and performance. The difference is that it's decomposed into relatively independent subproblems, and it cleanly addresses all major pieces needed for practical systems. We hope Raft will make consensus available to a wider audience, and that this wider audience will be able to develop a variety of higher quality consensus-based systems than are available today.

Raft Paper

How to?

  1. Run Server

    go run run_server.go

  2. Run Client

    go run client/run_client.go -leader=[leader host]:[port] -cmd=[command]

Architecture

Unfinished Features

  • Config Change (only single node will be added or removed, for simplicity considering)
  • Log Compaction
  • Log Persistence
  • Long-lived connection of gprc server
  • Redirect to leader when follower received cmd request
  • Error types arrangement
  • Introduce Cobra to client
  • Chaos test

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL