hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jakarta-httpclient Wiki] Update of "UseCases/SingleAsyncRequest" by RolandWeber
Date Wed, 28 Dec 2005 17:36:44 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-httpclient Wiki" for change
notification.

The following page has been changed by RolandWeber:
http://wiki.apache.org/jakarta-httpclient/UseCases/SingleAsyncRequest

New page:
= 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.
[[BR]]
Later, when my application needs the response, it will receive the response with a blocking
operation.

== Related / Out of Scope ==

 * multiple asynchronous requests to the same server
 * multiple asynchronous requests to different servers
 * sequences of requests, like chasing redirects


= 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. However, a separate notification
mechanism can be
designed to indicate to the application that the response is available.

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.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org


Mime
View raw message