For validating our Chord protocol, we have implemented several tests to simulate certain test cases using the in-house validation tool, Sentry. The details of these test cases can be found in Section 8 of our Final Report. The command to run the test case (as selected in code) is:
cd ./integration-tests/
go run sentry.go
The Panopticon is an in-house debugger tool for viewing all chord nodes' predecessor and successor. Panopticon exists as a docker container that will sustain a consistent and easy to read table. Below is such an example
ID predecessor successor stabilized
panopticon | alpha (68601): nodeCharlie (53816) nodeBravo (96447) true
panopticon | nodeBravo (96447): alpha (68601) nodeCharlie (53816) true
panopticon | nodeCharlie (53816): nodeBravo (96447) alpha (68601) true
To use this, you can run the following command in one terminal (append more services at the end if there are more). Or add a -d
if you wish to detach the stdout.
docker-compose -f docker-compose.debug.yaml up alpha bravo charlie
Then in a clean terminal (which you don't need the previous print-outs anymore), run
docker-compose -f docker-compose.debug.yaml up panopticon
The above command will start the Panopticon container.
- Install
protoc
: https://grpc.io/docs/protoc-installation/ - Install go plugins for protocol compiler
go get google.golang.org/protobuf/cmd/protoc-gen-go \ google.golang.org/grpc/cmd/protoc-gen-go-grpc
- Ensure that
$GOPATH/bin
is located withinPATH
export PATH="$PATH:$(go env GOPATH)/bin"
Build the generated protoc code with:
protoc --go_out=./node/gossip/ --go_opt=paths=source_relative \
--go-grpc_out=./node/gossip/ --go-grpc_opt=paths=source_relative \
./proto/internal.proto
./builder.sh
docker-compose up
To build a DockerFile as the image chord_node
:
docker build -t chord_node .
Ensure that 4th step has been configured properly:
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo -ldflags '-w' -o node_exec <file with main function>
docker-compose up
For dynamic scaling version:
docker-compose up --scale chord_member=9 #9 members