This repository contains the project template for completing Task 1, Task 2 of Assignment 4. Execute the commands from the root folder BCS-DS-Assignment-Package/tasks.
NOTE: After loading the project depending on which IDE (if using), you might see some file not found errors. However, they will disappear after you have successfully built the project using following command from the tasks folder.
src
├── main
│ └── java
│ └── com
│ └── assignment4
│ └── tasks
│ ├── LTClientThread.java
│ ├── LamportTimestamp.java (Lamports Timestamp implementaion)
│ ├── Message.java (Message format to be exchanged between server and the clients. This class can be instantiated to hold and access the content of the message and the timestamp)
│ ├── ServerThread.java (Server thread)
│ ├── UdpLTClient.java (UDP client to use lamports Timestamp implementation)
│ ├── UdpServer.java (Server main implementation)
│ ├── UdpVectorClient.java (UDP client to use vector clock)
│ ├── VectorClientThread.java
│ └── VectorClock.java (VectorClock implementation)
└── test
└── java
└── com
└── assignment4
└── test
├── LamportTimestampTest.java (Test file for LogicalClock.java)
└── VectorClockTest.java (Test file for VectorClock.java)
./gradlew build -x test
./gradlew run -PchooseMain="com.assignment4.tasks.UdpServer"
.\gradlew build -x test
.\gradlew run -PchooseMain="com.assignment4.tasks.UdpServer"
- Test your Lamport Timestamp implementation
./gradlew test
.\gradlew test
- Run your Lamport Timestamp client
./gradlew run -PchooseMain="com.assignment4.tasks.UdpLTClient" --console=plain
.\gradlew run -PchooseMain="com.assignment4.tasks.UdpLTClient" --console=plain
- Test your vector clock implementation
./gradlew test
.\gradlew test
- Run your vector clock client
./gradlew run -PchooseMain="com.assignment4.tasks.UdpVectorClient" --console=plain
.\gradlew run -PchooseMain="com.assignment4.tasks.UdpVectorClient" --console=plain