Skip to content

Latest commit

 

History

History
29 lines (28 loc) · 645 Bytes

README.md

File metadata and controls

29 lines (28 loc) · 645 Bytes

ReplicatedDatabase

Implementing a replicated database using Raft

Dependencies:

pip3 install virtualenv
pip3 install grpcio
pip3 install grpcio-tools 
pip3 install leveldb

Building

Create python virtual env

python3 -m virtualenv venv
source venv/bin/activate

Build protobuffs

python3 -m grpc_tools.protoc -I./protos --python_out=. --pyi_out=. --grpc_python_out=. ./protos/database.proto
python3 -m grpc_tools.protoc -I ./protos --python_out=. --pyi_out=. --grpc_python_out=. ./protos/*

Run server

python3 server.py --nodes "IP address:port"

Run client

python3 client.py