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.

Discussion

The problem with this use case is to assign the responsibility for generating follow-up requests. The background thread that would otherwise notify the application could generate the follow-up request in most cases. A noteworthy exception is authentication if user interaction is required to obtain the credentials, for example from a 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, other requests or responses may be delayed if follow-up requests are created by the background threads. Some possible solutions are:

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