Distributed Systems Project 2024
(fill the table below with the team members, and then delete this line)
Number | Name | User | |
---|---|---|---|
1103808 | João Miguel Nogueira | https://github.com/Dageus | mailto:joao.miguel.nogueira@tecnico.ulisboa.pt |
1103465 | João Rocha | https://github.com/jonhspyro | mailto:joaonolascorocha@tecnico.ulisboa.pt |
1103809 | Rodrigo Ganância | https://github.com/RodrigoGanancia | mailto:rodrigo.ganancia@tecnico.ulisboa.pt |
The overall system is made up of several modules. The different types of servers are located in ServerX (where X denotes stage 1, 2 or 3). The clients is in Client. The definition of messages and services is in Contract. The future naming server is in NamingServer.
See the Project Statement for a complete domain and system description.
The Project is configured with Java 17 (which is only compatible with Maven >= 3.8), but if you want to use Java 11 you can too -- just downgrade the version in the POMs.
To confirm that you have them installed and which versions they are, run in the terminal:
javac -version
mvn -version
Before executing:
Create a virtual environment and activate it:
python -m venv .venv
source .venv/bin/activate
Install grpcio and grpcio-tools packages:
python -m pip install grpcio
python -m pip install grpcio-tools
If you wish to deactivate the virtual environment, run in terminal:
deactivate
To compile and install all modules:
mvn clean install
mvn exec:exec
python server.py
mvn compile
mvn compile
mvn compile
python server.py
mvn exec:java
mvn exec:java -Dexec.args="<host> <port> <qualificador> <serivco>" [-Ddebug]
Terminal 1:
mvn exec:java -Dexec.args="localhost 2001 A TupleSpacesTotalOrder"
Terminal 2:
mvn exec:java -Dexec.args="localhost 2002 B TupleSpacesTotalOrder"
Terminal 3:
mvn exec:java -Dexec.args="localhost 2003 C TupleSpacesXuTotalOrder"
The Name Server automatically provides the client's ID.
mvn exec:java -Dexec.args="<NS_host> <NS_port> <qualificador> <service>" [-Debug]
mvn exec:java
Extra tests for synchronization purposes in sync_tests directory where multiple clients try requesting at the same time
./run_tests.sh