-
docker-compose up -d
-
The docker-compose file creates
- MongoDB instance to use as a backend for passing task
- RabbitMQ instance to use as a message queuing system for passing tasks from the server to the client
- An instance of the server program
- An instance of the worker
-
The server doesn't activate unless the offline script file has been run
-
Once the database is populated with the
tasks
, the server will start sending them one by one to thecelery
backend viaRabbitMQ
where it gets executed and the result is sent back (but not used as there's no real purpose for the result for this demo). -
The server uses the actor system via
thespian
on python to gracefully spawn 2 actors:- taskSender - Sends the tasks to the client and does initial updating of the database document
- statusChecker - Checks the status of each task and updates the data with new information
-
The actor system is quite robust and shuts itself down gracefully when all tasks are executed completely
-
The server is the only one with access to the database
-
The client only has access to the message queue for receiving tasks and contains the code for the actual tasks
-
The offline script has been created in a way that replaces the old data when it is run so that there can be a fresh start every time
docker-compose up -d
- run
creator.py