A remote procedure call invokes an operation provided by a component outside the caller’s local process or machine. In a distributed application, services communicate through a network rather than sharing one addressing space. section 11.3
Treating a remote call like a local method call introduces additional constraints:
- The call can fail because of timeouts, application crashes, unreachable services, or network problems, independently of the requested operation’s validity. section 11.1.2
- Latency becomes part of the operation, and an absent response may leave success uncertain: an order might have been placed even though the caller received nothing. section 11.1.2
- Order-processing logic becomes non-linear because the application must account for remote-service availability and communication failures. section 11.3
Ordering from a retailer
An e-commerce application calls shop.order on a retailer’s separate server. The retailer’s inventory may be stale, the HTTP call may time out, or the server may crash; checking the response still may not reveal whether the order succeeded. section 11.1.2
Figure 11.5 A more realistic design for the e-commerce application, taking into account the complexity of a distributed architecture and introducing a separate application server to deal with failures of HTTP calls to the shops’ servers
Shows a distributed e-commerce design with separate retailer servers and an application server responsible for dealing with failed HTTP calls. section 11.3




