Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raft-inmemory-kv

My attempt at implementing RAFT based inmemorykey-value data store

Roadmap:

  • Implement a basic key-value server
  • Write unit tests for in-memory key-value server
  • Add support for REPL
  • Implement logs
  • Implement naive log replication
  • Test naive replication
  • Implement AppendEntries and AppendEntriesResponse RPC
  • Test AppendEntries and AppendEntriesResponse RPC
  • Implement leader election via VoteRequest and VoteResponse RPC
  • [-] Test leader election
  • [] Persist node state
  • [] Persist log state

Issues:

  • replica's are not handling get's, i know set's shouldn't be allowed
  • how to make the rpc framework generic so that it can handle all kinds of RPCs

Learnings

  • In go you can keep main logic in internal directory
  • If you want multiple executables you can keep it in cmd directory and have seperate package, because go doesn't allow two main methods inside same package, they act as entry point
  • Root dir name doesn't matter you can keep it anything but while importing it inside the executables say repl.go use import "raftkv/internal/raftkv
  • internal packages cannot be imported in external packages via go get
  • if classess are in same package you can call one class objects from other

Resources:

About

In memory key value data store that does RAFT replication

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages