Cost of a chatty synchronous design

A mobile app's CartScreen displays 8 items. In the current design, a sequence diagram shows a loop fragment over the items in which CartScreen sends the synchronous call getPrice(id) to a remote PriceService and receives a reply. Each round trip, including server processing, takes 40 ms, the calls are made one after another, and CartScreen does nothing else while it waits. In a proposed design, CartScreen sends one synchronous call getPrices(ids) and receives one reply, and that single round trip takes 70 ms. Give each answer as a whole number: the number of messages exchanged between CartScreen and PriceService in the current design, the total time CartScreen is blocked in the current design in ms, the number of messages exchanged in the proposed design, and the blocked time saved by the proposed design in ms.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Sequence Diagrams Questions: