Question
In the first week of your job, you are asked to build a distributed system to execute jobs in a priority sequence. Each job has
In the first week of your job, you are asked to build a distributed system to execute jobs in a priority sequence. Each job has a unique identifier.
You must be able to:
-
Insert a job, according to its associated priority.
-
Delete a job, based on its identifier.
-
Return the identifier of the highest-priority job waiting to run.
-
Return a list of all jobs in the queue, ordered from top priority to least priority.
-
Return the number of jobs that are waiting in the queue.
a) Write the RESTful API endpoint definition of the above functionality.
For example: GET .../api name?[parameters]
b) How would you ensure data consistency in your system?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started