-
Docker Desktop Must be installed
- This app was tested & developed with docker engine v27.2.0
-
You must install the rabbitmq image by running:
docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:4.0-management
-
The docker rabbitmq container must be running before trying to run the application
- Can take 15 - 60 seconds for rabbitmq to startup
-
Python must be installed
The person application simulates the movement on the 10 x 10 grid. To run the application you must do the following (so long as prerequisites are met):
-
Clone the application from github:
# Default clone to user folder git clone https://github.com/Cloud090/PBT205.git # Or clone to custom directory git clone https://github.com/Cloud090/PBT205.git [desired_clone_directory_here]
-
Open the projected directory in CMD
- By default:
cd PBT205
- Or enter whatever directory you cloned it to
- By default:
-
Switch to the James branch:
git checkout James
-
To ensure the code is pulled from github:
git pull
-
For all applications you can use CTRL + C to exit
-
BEFORE running any applications you must activate venv on windows:
.\venv\scripts\activate
- If you do not run venv it will return a not found error
-
Command format:
python src\person.py [person-name] [speed]
- person-name: name of the actor
- speed: how fast they move (1 is faster - 10 slowest)
- Example:
python src\person.py James 2
-
It will print the coordinates everytime it moves & send it over rabbitmq
-
It is recommended to run at least 3+ people
-
Command:
python src\tracker.py
-
Once run it will wait for messages from the person application & will keep track of all contacts
-
This only needs to be run once whilst running the person applications
-
Command usage:
python src\query.py [person-name]
Example:
python src\query.py James
-
It will output a list of who, where, when and how many times the queried person has come into contact with specific people
-
This only needs to run every so often