Implementing a pizza restaurant management system.
The pizza restaurant is composed of the following personnels:
- 2 Dough chefs - each one has a 7 seconds dough preparation time
- 3 Topping chefs - each one has 4 seconds to put toppings on a pizza
- 1 Oven - has a 10 seconds preparation time
- 2 Waiters - each one serves the pizza within 5 seconds
To run the application locally, execute the following commands:
npm i
npm run build
sudo node dist/main.js
To run the application in a Docker container, execute the following commands:
docker build -t <YOUR_IMAGE_NAME_OF_CHOICE> .
docker run -v /var/log:/var/log -i <YOUR_CHOSEN_IMAGE_NAME>
Both in the Docker case and in the local case, the application receives pizza orders via the standard input of the process. A pizza order is of the following schema:
[{"name": "<PIZZA_NAME>", "toppings": ["<TOP_1>", "<TOP_2>", ...]}, ... ]
The application prints the progress of the order to the standard output, as well as to a log file. The file is visible in /var/log/pizza-restaurant.log
The application will be closed upon Ctrl-C, with an appropriate message.
Bon Appétit!