Distributed Deposit and Transfer System is a distributed system of multiple processes that maintain accounts and transactions. We use the ISIS algorithm to satisfy the requirement of total ordering and build a reliable multicast through implementing the reliable multicast algorithm. TCP errors are captured to detect failures.
We do not have a makefile since we are using Golang, which is not a compiled language. We do, however, use go build to compile executables.
go 1.15 google/uuid v1.3.0
-cmd/
-node/
-node.go // main function
-test/
-logs/ // save the logs for the evaluation matrix
-node // compiled binary
-gentx.py // generate stimulated transactions, including "DEPOSIT" and "TRANSFER"
-config.txt // record the address of each node in the distributed system
-api/
-proto.go // transmitted message protocal
-internal/
-peers/
-peers.go // store the information of the current node and peers
-accounts/
-accounts.go // store and manage the accounts information
-message/
-messageService.go // send and handle the receival of messages
-ISIS.go // ISIS algorithm implementation
-message.go // internal message structure
-deposit/
-depositAndTransfer.go // process the stimulated transactions
-logs/
-graph.ipynb // generate the evaluation graph
-go.sum
-go.mod
-
Go into the folder “mp1/test/”
-
Executable files “mp1_node” should be present
-
Run with the same commands as specified on CS 425’s website with any valid corresponding node name and config filename
python3 -u gentx.py 0.5 | ./node node1 config.txt
- If somehow those executables did not work, please try our building instructions.
-
Go into the folder “mp1/test/”, if it is not presented, please create a new folder with the name “test” under “mp1”, and put “gentx.py” and config file into the “test” folder
-
Run the following commands in the “test” folder
go build ../api/node/node.go
We use the ISIS algorithm to satisfy the requirement of total ordering, and build a reliable multicast through implementing the reliable multicast algorithm. TCP errors are captured to detect failures.
- Total ordering:
We implement the ISIS algorithm for total ordering. After every node receives the message, it would reply to the proposed sequence to the sender. After the sender collected all the proposed sequence numbers and selects the largest one, as the next agreed sequence number. Then, it would R-multicasts to other nodes.
- Reliable delivery under failures:
To ensure reliable delivery, we implement the reliable multicast algorithm. After a process B-multicasts the message to the processes in the destination group, the recipient checks if it has received the message, if not, it would then B-multicasts the message to the group. In this way, the failure of delivering messages between two nodes would be more reliable.
To detect failures, each node would check the state of the connections with other nodes regularly. If some connection is broken, the node would delete the message sent by the failed node from the hold-back queue. Then, it would check the messages sent by the current node which have not received all responses from other nodes. If the failed node has not responded, we would “pretend” the broken node has responded to the proposed sequence number to the message, and check if the process collects all the proposed sequence numbers.
The performance of the system is evaluated using the “transaction processing time”, measuring the time difference between the message generation and the message delivery. The time difference distribution is represented as the CDF (cumulative distribution function).
- 3 nodes, 0.5 Hz each, running for 100 seconds
- 8 nodes, 5 Hz each, running for 100 seconds
- 3 nodes, 0.5 Hz each, running for 100 seconds, then one node fails, and the rest continue to run for 100 seconds
- 8 nodes, 5 Hz each, running for 100 seconds, then 3 nodes fail simultaneously, and the rest continue to run for 100 seconds