GitHub repository: AceShiken/restaurant-delivery-service
Primary language: Java
Created: 2020-06-27T15:57:04Z
Description: Problem Statement A Restaurant only delivers online orders. Restaurant has 'N' number of delivery persons. Each order has a unique id and a time duration it will take to deliver. Each delivery person can deliver only one order at a time. (Example request/response are included, do enhance them as you see necessary) - Create two rest services, one simulating Restaurant and another simulating delivery person. Restaurant APIs - Post API to place an order, returns order id in response. Request: { "itemId" : "", "noOfItems" : 5, } Response : { "orderId" : "234", "status" : "" } - Get API to get status of the order. Request : orderId=saa Response : { "status" : "" } - Post API to update delivery status (to be used by delivery person). Request : { "orderId" : "", "status" : "" } Response : { "status" : "" } - Get API Listing status of each delivery person which is active. Response : [ { "Delivery Person current status" } ] Delivery Person APIs - Post API to delegate an order to a delivery person, returns Order Accepted Status. Request : { "orderId" : "", "deliveryPersonId" : "" } Response : { "status" : "Accepted" } - Get API to get the state of a delivery person. The State should mention if delivery person is active or not, if active what order the person is handling and how much time left for delivery. Request : deliveryPersonId=asas Response : { "status" : "" } Things to note - Manage all states in memory. - When Delivery Person service is started it tells Resturant service how to talk to it. (eg host:port) Assume any parameters you may think are necessary. Try to come up with proper project structure and entity design. Optional : write a test case simulating delivering orders.