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/AsyncRequestSequence" by RolandWeber
Date Thu, 29 Dec 2005 18:24:18 GMT
Dear Wiki user,

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

The following page has been changed by RolandWeber:

New page:
= Use Case: Asynchronous Sequence of Requests =

== Description ==

I want to send a request over a connection, without blocking the application.
If the response requires a follow-up request, for example to perform authentication or chase
a redirect,
I want that to be generated and sent automatically.
I want a notification when the final response is available for my application.

== Related / Out of Scope ==

 * [wiki:Self:UseCases/SingleAsyncRequest single asynchronous request]
 * [wiki:Self:UseCases/SingleAsyncRequestNotify single asynchronous request with notification]
 * [wiki:Self:UseCases/MultiAsyncRequests multiple asynchronous requests]
 * fire and forget

= Discussion =

The problem with this use case is to assign the responsibility for generating follow-up requests.
The background thread that would otherwise [wiki:Self:UseCases/SingleAsyncRequestNotify notify]
the application could generate the follow-up request in most cases. A noteworthy exception
authentication if user interaction is required to obtain the credentials, for example from
password dialog. The usual background threads must remain available for handling asynchronous
requests and responses, they can not block in this situation. Even if that is not the case,
requests or responses may be delayed if follow-up requests are created by the background threads.
Some possible solutions are:
 * have the background threads create the follow-up requests and live with the consequences
 * use extra background threads to generate follow-up requests
 * require an application thread to generate follow-up requests and make it easy
 for the application developer to provide it

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

View raw message