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/AsyncReceiveWhileSending

New page:
= Use Case: Receive Response While Sending Request =

== Description ==

I have to send a big request entity to the server, and expect a big response 
entity in return.
[[BR]]
The server does not wait for the end of the request before starting to send the 
response.
[[BR]]
I want to start receiving the response as soon as possible, not waiting for the 
request to be send completely.
[[BR]]
Otherwise, a lot of data would need to be buffered somewhere along the line.

== Background ==

This use case was contributed by 
[http://mail-archives.apache.org/mod_mbox/jakarta-httpclient-user/200601.mbox/[EMAIL
 PROTECTED] Roger Menday]
on the user mailing list.

== Related / Out of Scope ==

 * [wiki:Self:UseCases/SingleAsyncRequest single asynchronous request]
 * [wiki:Self:UseCases/MultiAsyncRequests multiple asynchronous requests] 
(pipelining)


= Discussion =

Unlike the [wiki:Self:UseCases/SingleAsyncRequest single asynchronous request], 
this use case can not be handled
by a background thread that alternatingly sends and receives. Two threads are 
needed, one for sending and one for
receiving. They have to synchronize with eachother in order to achieve one of 
the following:
 1. requests are not sent until the response for the previous one has been 
processed completely (no pipelining)
 1. responses are correctly matched to the requests that were sent (pipelining)
This use case provides an intermediate step on the road to implement full 
support for pipelining.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to