This project simulates a distributed task processing system using Python threads and queues. It randomly generates tasks (email sending, data backup, etc.) and simulates how these tasks are handled by worker threads — including automatic retries for failures.
This is a student-level simulation project inspired by real-world distributed systems like those used in AWS and other large-scale tech environments.
- Python 3
threading
queue
random
time
- Simulates real-time task generation (like a server receiving jobs)
- Uses consumer threads to process each task
- Randomly fails tasks, and retries them up to 3 times
- Prints the status of each task and retry attempt in the terminal
- Automatically shuts down after 30 seconds (for demo purposes)
- Make sure you have Python 3 installed
- Clone this repo or download the
.py
file - Open terminal and navigate to the file location
- Run:
python distributed_simulation.py