From Wikipedia, the free encyclopedia
(Redirected from Request-response)

In computer science, request–response or request–reply is one of the basic methods computers use to communicate with each other in a network, in which the first computer sends a request for some data and the second responds to the request. More specifically, it is a message exchange pattern in which a requestor sends a request message to a replier system, which receives and processes the request, ultimately returning a message in response. It is analogous to a telephone call, in which the caller must wait for the recipient to pick up before anything can be discussed. This is a simple but powerful messaging pattern which allows two applications to have a two-way conversation with one another over a channel; it is especially common in client–server architectures.[1]

For simplicity, this pattern is typically implemented in a purely synchronous fashion, as in web service calls over HTTP, which holds a connection open and waits until the response is delivered or the timeout period expires. However, request–response may also be implemented asynchronously, with a response being returned at some unknown later time. When a synchronous system communicates with an asynchronous system, it is referred to as "sync over async" or "sync/async".[2] This is common in enterprise application integration (EAI) implementations where slow aggregations, time-intensive functions, or human workflow must be performed before a response can be constructed and delivered.

In contrast, one-way computer communication, which is like the push-to-talk or "barge in" feature found on some phones and two-way radios, sends a message without waiting for a response. Sending an email is an example of one-way communication, and another example are fieldbus sensors, such as most CAN bus sensors, which periodically and autonomously send out their data, whether or not any other devices on the bus are listening for it. (Most of these systems use a "listen before talk" or other contention-based protocol so multiple sensors can transmit periodic updates without any pre-coordination.)

See also[edit]


  1. ^ Hohpe, Gregor. Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions. ISBN 0-321-20068-3. p. 184
  2. ^ "Sync-over-Async Switch - IBM Business Process Management Products Support Blog Blog". IBM. 2009-10-20.

External links[edit]