Request and Reply

Request/reply is an important communication pattern. Proper use of this pattern places requirements on the runtime environment.

Design programs to ensure robust behavior in situations where these requirements are not satisfied.

For example, a program that sends a request and then waits indefinitely for a reply is fragile. If the replying process is not available, or the transport’s communications are not operating, then the request message does not reach its intended recipient, and the requesting process does not receive any information about this failure.

A more robust program would repeat the request at intervals until it receives a reply, or until it exceeds some reasonable limit.