Skip to content

WyRainBow/cocoKV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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/WyRainBow/cocoKV.git
  1. mod tidy
cd cocoKV && go mod tidy
  1. run
make build && ./bin/coco [--conf confPath] [--port portValue]

Raft Consistency Test

Node1

┌─[coco@coco-PC] - [~] - [Thu Feb 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

┌─[coco@coco-PC] - [~] - [Thu Feb 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
    • CocoKV 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

Releases

Packages

Contributors

Languages