author | title | |
---|---|---|
|
Causal Delivery |
The message protocol is of the format : BEGIN<source><command><destination><body>CLOCK<vector clock>END
The
(e.g., Process number
The
INIT
: This command is used to initalize the socket connection, serving as an initial request to create a connection
ACK
: This command is also used in connection initialization. This is how the server confirms a connection request from another process.
MESSAGE
: This command is used to pass information with the message.
TERMINATE
: This command is used to destroy connections after all messages have been sent/received.
The
The vector clock section is where the serialized vector clock is stored.
The vector clock holds the information of
The project contains a make file that can build the java classes with
make
or make Main
.
After that, the program can be run with the following arguments:
java Main <source> <destination 1> <destination 2> <destination 3>
Where the source and destination processes are specified like:
<process number>:<port>
The source destination process number must
match the machine it is running on (If you are running the program on
dc07.utdallas.edu
, then your source process number must be set to 7).
The port specified on the source parameter will be the port that the
program listens on. Similarly, the destination parameters must match
whatever process number and ports you have chosen to run on those
machines.
Example: Running the program on dc07.utdallas.edu
, communicating with
machines
java Main 07:4007 01:4001 21:4021 40:4040
The lower the number of the process, the less connections it has to wait
for. In the example run I just described, proccess
I did run into an issue with this: The processes need to be started
starting from the highest process number going down. I could not fix
this in time to turn in the project, and this could have been done with
a better connection initialization system.\