Here is the revised README in English, with the requested adjustments:
This project extends the Assignment 1 by adding dynamic membership. Nodes should be able to join and leave the network dynamically. The system includes an expanded HTTP API to manage dynamic node operations and simulate node failures.
- The project is developed in Rust, building upon the foundation laid in Assignment 1.
- Nodes are organized using a hash function that determines their position in the Chord ring.
- Core server logic is implemented in
main.rs
, while key-value storage operations are handled by theStorage
struct instorage.rs
. - The
run-node.sh
script starts individual nodes, whilerun.sh
coordinates the deployment of multiple nodes and sets up the Chord-like network with dynamic membership features.
-
Log in to the compute cluster where the system will be deployed.
-
Download the deployment script using the following commands:
wget https://raw.githubusercontent.com/SeraMadeleine/INF3200-2/master/src/run.sh chmod 552 run.sh
NB: if you have an old version of the repo, you have to delete the following folder from the cluster inf2300-a1-bin-x86_64-unknown-linux-gnu
- The system can be deployed as a containerized service (e.g., using Docker) or as a binary for Linux (x86_64) and macOS (aarch64).
- Ensure that all dependencies are installed and network configurations are set according to the assignment requirements before running.
The system can be tested using the api_check.py
script to verify that all API endpoints comply with the specifications.
Note: For compatibility with Rust, a
Content-Type
header has been added to the tests. This modification is included in the version of the test script located atpython_tests/api_check.py
.
-
Start the system:
Run the following command to start the system:../src/run-unjoined.sh 4 8001
Copy the output after running this command.
-
Run the API check:
Execute theapi_check.py
script using the command below, replacing[nodes]
with the list of nodes output from the previous step:python3 api_check.py '[nodes]'
For example:
python3 api_check.py '["c11-3:52769","c6-2:49970","c3-29:52453","c3-13:64421"]'
- Performance testing can be conducted to validate that the network maintains its functionality and stability as nodes dynamically join or leave.
- Additionally, the
join_and_leave.sh
script, found inpython_tests/join_and_leave_test.py
, can be used to measure the times and results. This script generates the metrics and output that are used in the report.
After completing the testing and tasks, it's recommended to clean up the cluster to release resources. This can be done by running the following command:
/share/ifi/cleanup.sh