how pipeline works

Hi All,
here I have a basic question regarding pipeline:

we all know that by having persistent connection client doesn't need to open
a new TCP connection for sending following requests
Moreover, we can adopt pipeline to send out next request "before" client
receives the response for current request

- By using pipeline, does client need only one TCP connection? ( all
requests go through the same connection )
- If yes, how does it guatantee the sequence of consecutive responses? e.g.
server takes longer time to deal with 1st request, but shorter time for 2nd
request. The server would hold 2nd response until 1st response is generated
then send them both sequentially back to client, or the server just sends
back directly no matter which response is ready
- for doing that, we at least need 2 threads, one is for sending requests,
another is for receiving reponses, don't we?

Regds,
- Jerry

Received on Friday, 5 September 2003 13:46:25 UTC