Skip to content

WyRainBow/FincasKV

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  ______ _                     _  ____      __
 |  ____(_)                   | |/ /\ \    / /
 | |__   _ _ __   ___ __ _ ___| ' /  \ \  / / 
 |  __| | | '_ \ / __/ _` / __|  <    \ \/ /  
 | |    | | | | | (_| (_| \__ \ . \    \  /   
 |_|    |_|_| |_|\___\__,_|___/_|\_\    \/

Description

A distributed Key/Value storage based on Bitcask storage model, compatible with RESP protocol.

How To Run

  1. clone
git clone https://github.com/FinnTew/FincasKV.git
  1. mod tidy
cd FincasKV && go mod tidy
  1. run
make build && ./bin/fincaskv [--conf confPath] [--port portValue]

Raft Consistency Test

Node1

┌─[finntew@FinnTew-PC] - [~] - [四 2月 06, 11:59]
└─[$] <> redis-cli -p 8911
127.0.0.1:8911> cluster init node1 127.0.0.1:7000
OK
127.0.0.1:8911> cluster join node2 127.0.0.1:7001
OK
127.0.0.1:8911> set a bc
OK
127.0.0.1:8911> 

Node2

┌─[finntew@FinnTew-PC] - [~] - [四 2月 06, 11:59]
└─[$] <> redis-cli -p 8912
127.0.0.1:8912> cluster init node2 127.0.0.1:7001
OK
127.0.0.1:8912> cluster info
127.0.0.1:8912> get a
bc
127.0.0.1:8912> 

TODO

  • Storage(Bitcask)
    • Basic Bitcask
    • Async Write
    • Merge Ticker
    • Multi-Type-MemIndex
      • BTree
      • SkipList
      • SwissTable
    • ShardMemIndex
    • MemCache(implement LRUCache only)
    • Use BloomFilter
  • DB
    • Put With TTL
    • Batch Operation
    • Redis DataStructure
      • String
      • List
      • Hash
      • Set
      • ZSet
    • FincasKV DB
  • Network (Based on CloudWeGo Netpoll)
    • TCP Conn
    • Basic RESP Protocol
    • Server
    • Stats Record
    • Handle For Redis DataStructure
      • String
      • List
      • Hash
      • Set
      • ZSet
  • Raft (Based on hashicorp/raft)
    • FSM
    • Raft Node
    • Command Apply
      • String
      • List
      • Hash
      • Set
      • ZSet
    • Server Handle
      • INIT
      • JOIN
      • INFO
    • Forward Write Operation To Leader

About

A distributed Key/Value storage based on Bitcask.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 99.8%
  • Makefile 0.2%