Implementation of the accepted paper PlainDAG.
Machines are divided into two types:
- Workcomputer: configure serversandclientsparticularly viaansibletool
- Servers: run daemons of PlainDAG, communicate with each other via P2P model
- Clients: run client, communicate withservervia RPC model
- Recommended OS releases: Ubuntu 20.04
- Go version: 1.19
- Python version: 3.9.4
- Ansible version: 2.5.1
Commands below are run on the work computer.
sudo apt install python3-pip
sudo pip3 install --upgrade pip
pip3 install ansible
# add ~/.local/bin to your $PATH
echo 'export PATH=$PATH:~/.local/bin:/usr/local/go/bin' >> ~/.bashrc
source ~/.bashrcEnable workcomputer to login in servers and clients without passwords.
install go modules/packages on the work computer.
Generate configurations for each server.
Operations below are done on the work computer.
- Change ips,port, and other parameters in filebenchmark/configs.yaml
- Run go run ./config_gen/main.go
Change the hosts file in the directory ansible-remote, the hostnames and IPs should be consistent with benchmark/configs.yaml.
And commands below are run on the work computer.
# Enter the directory `PlainDAG`
go build
# Enter the directory `ansible`
ansible-playbook -i ./hosts conf-server.yaml# run PlainDAG servers
ansible-playbook -i ./hosts run-server.yamlYou can stop servers by using command
# stop PlainDAG servers
ansible-playbook -i ./hosts kill-server.yamlFor stable testing, we let the primary node to package a batch by itself if it does not receive any request from the client within the batchtimeout period. And you can also run a client to send request.
You can use the workserver as the client or run a client on a remote host. The following command will start a client and the client will keep sending requests to the primary node until you stop it:
#Enter the directory `client`
go run main.go -rpcaddress $IP_ADDR_OF_Linked sendrequestIf you want to send exact number of requests, you can use:
#Enter the directory `client`
go run main.go -rpcaddress $IP_ADDR_OF_Linked sendrequest -n $numberFor the full list of flags, run go run main.go -rpcaddress $IP_ADDR_OF_Leader hlep sendrequest.