SHARE
TWEET

Untitled

a guest Sep 21st, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dear Candidate,
  2.  
  3. We need your help finalising two of our services which is really important for us. The service is called Aggregator and it joins together information about orders from Order service, Offer Service, Product service and Image Service.
  4.  
  5. It works as follows:
  6.  
  7. - The Aggregator uses sellerId to retrieve OrderId, OfferId, and ProductId from the Order Service.
  8.  
  9. - Then it uses the OfferId and ProductId to retrieve information from Offer service and Product service respectively
  10.  
  11. - Then it uses the product title, from the Product Service, to retrieve a list of images from the ImageService.
  12.  
  13. - The Aggregator uses the information retrieved from the Order Service, Offer Service, Product Service and Image Service and returns an EnrichedOrder.
  14.  
  15.  
  16. Image Service:
  17.  
  18. - Unfortunately the team could not finish the Image Service in time :( We need your help to implement it. The specifications are as follows:
  19.     There is an interface named ImageService defined for the service. You should implement the interface.
  20.     There is a JSON file in the resources directory containing all the images necessary to initial load the ImageService. Your implementation should load such images from the file.
  21.     Since you are a new team member, you should prove to us that your ImageService implementation is *correct*.
  22.     Since the new ImageService is used in the AggregatorService, you should improve the existing unit tests and also integrate the ImageService without breaking the existing ones.
  23.  
  24.  
  25. Restrictions:
  26.  
  27. - Every service can fail. The following guidelines for failures are :
  28.  
  29. - If Order service fails, throw an exception, because we cannot fetch any data from Product or Offer service
  30.  
  31. - If Order service succeeds and Offer Service succeeds but Product service fails, we return an EnrichedOrder with Info from Order service and Offer service; Product id is -1 and product title is null
  32.  
  33. - If Order service succeeds and Product service succeeds but Offer service fails, we return EnrichedOrder with Info from Order service and Product service; Offer id is -1 and Offer condition is UNKNOWN
  34.  
  35. - If Order service succeeds but Product service and Offer Service fails, we return an EnrichedOrder with info from Order service only; Offer id is -1 and Offer condition is UNKNOWN. Product id is -1 and product title is null
  36.  
  37. - If Order service, Product service and Offer service all succeeds, we return an EnrichedOrder with info from Order service, Offer Service and Product service
  38.  
  39. The team that was working on this service already wrote all the unit test for Aggregator service and implemented Order, Offer and Product services
  40.  
  41. However, they haven't gotten around to implementing the Aggregator service itself, though. Can you please help them by implementing it?
  42.  
  43. Important: your application should be self-contained, no installation required.
  44.  
  45. Extras:
  46.  
  47. - Make a REST API out of the aggregator and the other services
  48.  
  49. - Make a consumer for the REST API
  50.  
  51. - Introduce a new technology: database, indexing, front-end, etc
  52.  
  53. - Containerize your application
  54.  
  55. - Whatever you love
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top