A generic raft library
:warning: ERaftKV is still being developed, you can find a golang version for ebooks - Distributed Data Services at branch eraftbook
ERaftKV is a persistent distributed KV storage system, uses the Raft protocol to ensure data consistency, At the same time, it supports sharding for large-scale data storage.
Execute follow build command on the machine with docker installed.
sudo make build-dev
sudo make create-net
command output
docker network create --subnet=172.18.0.0/16 mytestnetwork
f57ad3d454f27f4b84efca3ce61bf4764bd30ce3d4971b85477daf05c6ae28a3
sudo make run-demo
add_group: ./eraftkv-ctl [metaserver addresses] add_group [groupid] [group server addresses]
remove_group: ./eraftkv-ctl [metaserver addresses] remove_group [group id] [node id]
query_groups: ./eraftkv-ctl [metaserver addresses] query_groups
set_slot: ./eraftkv-ctl [metaserver addresses] set_slot [groupid] [startSlot-endSlot]
put_kv: ./eraftkv-ctl [metaserver addresses] put_kv [key] [value]
get_kv: ./eraftkv-ctl [metaserver addresses] get_kv [key]
You can use follow command to run a basic rw bench test with ERaftKV
sudo make run-demo-test
sudo make stop-demo
sudo make rm-net
All you need to do is submit a Pull Request to our repository, and all compile, build, and testing will be automatically executed.
You can check the ERatfKVGitHubActions See the execution process of code build tests.
To compile eraftkv, you will need:
To build:
make gen-protocol-code
make build-dev
Run test:
make tests
If you want to build image youtself
make image
You can quickly participate in development by following the instructions in CONTROLUTING.md