HTTP 1.1 pipelining

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • noviceUser

    HTTP 1.1 pipelining

    can some one guide me how to use HTTP 1.1 pipelining in Python.

    Client will generate 3 get requests continuously as shown below and
    then read the response for each GET request.

    Algorithm
    ----------
    GET(ur1_l)
    GET(url_2)
    GET(url_3)
    readResponse(ur l_1)
    readResponse(ur l_2)
    readResponse(ur l_3)

    i m a python newbie and pls forgive me if this question sounds silly.
    thanks in advance for any help.
  • Ivan Voras

    #2
    Re: HTTP 1.1 pipelining

    noviceUser wrote:[color=blue]
    > can some one guide me how to use HTTP 1.1 pipelining in Python.
    >
    > Client will generate 3 get requests continuously as shown below and
    > then read the response for each GET request.
    >
    > Algorithm
    > ----------
    > GET(ur1_l)
    > GET(url_2)
    > GET(url_3)
    > readResponse(ur l_1)
    > readResponse(ur l_2)
    > readResponse(ur l_3)[/color]

    I don't think this is how HTTP/1.1 pipelining works. It is still a
    request-response protocol - the only "pipelining " is in the fact that it
    doesn't require a separate connection session for each request-response
    pair. That is:

    HTTP/1.0:
    <establish connection>
    GET(url_1)
    readResponse(ur l_1)
    <close connection>
    <establish connection>
    GET(url_2)
    readResponse(ur l_2)
    <close connection>
    <establish connection>
    GET(url_3)
    readResponse(ur l_3)
    <close connection>

    HTTP/1.1:
    <establish connection>
    GET(url_1)
    readResponse(ur l_1)
    GET(url_2)
    readResponse(ur l_2)
    GET(url_3)
    readResponse(ur l_3)
    <close connection>

    Or maybe you are thinking of establishing parallel connections? In that
    case look for some examples using threads and sockets...




    --
    C isn't that hard: void (*(*f[])())() defines f as an array of
    unspecified size, of pointers to functions that return pointers to
    functions that return void.

    Comment

    • JanC

      #3
      Re: HTTP 1.1 pipelining

      Ivan Voras <ivoras@__geri. cc.fer.hr> schreef:
      [color=blue]
      > I don't think this is how HTTP/1.1 pipelining works. It is still a
      > request-response protocol - the only "pipelining " is in the fact that it
      > doesn't require a separate connection session for each request-response
      > pair.[/color]

      "Pipelining " != "Connection : Keep-Alive"

      <http://www.mozilla.org/projects/netlib/http/pipelining-faq.html>

      --
      JanC

      "Be strict when sending and tolerant when receiving."
      RFC 1958 - Architectural Principles of the Internet - section 3.9

      Comment

      • Ivan Voras

        #4
        Re: HTTP 1.1 pipelining

        JanC wrote:
        [color=blue]
        > Ivan Voras <ivoras@__geri. cc.fer.hr> schreef:
        >
        >[color=green]
        >>I don't think this is how HTTP/1.1 pipelining works. It is still a
        >>request-response protocol - the only "pipelining " is in the fact that it
        >>doesn't require a separate connection session for each request-response
        >>pair.[/color]
        >
        >
        > "Pipelining " != "Connection : Keep-Alive"
        >
        > <http://www.mozilla.org/projects/netlib/http/pipelining-faq.html>[/color]

        Thank you - it's clearer to me now!

        But, isn't this a direct consequence of keep-alive?

        Comment

        Working...