A Pizza Management System implemented using bullmq processing order at each step and recording time at each step and total time taken.
- You need to install NodeJs before running this project.
- Install it according to your Operating System.
- Clone this Project
- Go to cloned project directory of it with cd and open terminal.
- To install required dependencies run command:
npm install
Start the server using command:
npm start
Base URL to be used before every api requests
localhost:3000.
-
/api/add-order
- This api is used to place pizza order with query params asname
andid
. -
/api/ui
- This api is used to see the bullmq dashboard where we can see how order is being processed in each queue. -
/api/report
- This api is used to see the reports generated for each order placed, time taken to process at each step and total time taken for each order.
pizza-service
: Contains queue.js which is responsible for creating workers and jobs using bullmq.config.js
: Config file for all kind of created queues.index.js
: Entry point to run server and to route requests.
- Placing Order -
- Bullmq dashboard shows queue and how the order is getting processed at each step and its movement from active to completed -
- Terminal after running server and placing order -
- Reports for each order placed and time taken at each step and total time taken for them as json -
- I didn't use any database to store reports data but it can be expanded further to store.
- For the sake of simplicity and time crunch not able to do the full fledged solution but tried to implement producer consumer structure using bullmq.