Differences between revisions 5 and 6
Revision 5 as of 2006-02-01 03:46:44
Size: 1581
Editor: RolandWeber
Comment:
Revision 6 as of 2009-09-20 21:46:22
Size: 1541
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
[[BR]] <<BR>>
Line 11: Line 11:
 * [wiki:Self:UseCases/AsyncReceiveWhileSending send a request, receive response while still sending]
 * [wiki:Self:UseCases/SingleAsyncRequestNotify single asynchronous request with notification]
 * [wiki:Self:UseCases/AsyncRequestSequence send a request asynchronously, with automatic follow-up requests]
 * [wiki:Self:UseCases/AsyncFireAndForget send a single request asynchronously, forget about the response]
 * [wiki:Self:UseCases/MultiAsyncRequests multiple asynchronous requests]
 * [[UseCases/AsyncReceiveWhileSending|send a request, receive response while still sending]]
 * [[UseCases/SingleAsyncRequestNotify|single asynchronous request with notification]]
 * [[UseCases/AsyncRequestSequence|send a request asynchronously, with automatic follow-up requests]]
 * [[UseCases/AsyncFireAndForget|send a single request asynchronously, forget about the response]]
 * [[UseCases/MultiAsyncRequests|multiple asynchronous requests]]

Use Case: Single Asynchronous Request

Description

I want to send a request for which I expect a long response time without blocking the application immediately.
Later, when my application needs the response, it will receive the response with a blocking operation.

Discussion

This is the most basic case of asynchronous communication, possibly useful if the request includes a large body or if the server is expected to respond with a huge delay. It can be used to interlock HTTP communication with something else, but eventually the application has to receive the response synchronously, which limits the applicability.

The focus of this use case is the design of an interface for sending the request asynchronously, and for receiving the response synchronously. An initial implementation of that interface could spawn a background thread for each request that is sent. The responsibility for processing of the response headers can be assigned to the application thread as well as to the background thread.

UseCases/SingleAsyncRequest (last edited 2009-09-20 21:46:22 by localhost)