The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
net-http-pipeline 1.0

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Eric Hodel

Posts: 660
Nickname: drbrain
Registered: Mar, 2006

Eric Hodel is a long-time Rubyist and co-founder of Seattle.rb.
net-http-pipeline 1.0 Posted: Mar 29, 2011 4:39 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Eric Hodel.
Original Post: net-http-pipeline 1.0
Feed Title: Segment7
Feed URL: http://blog.segment7.net/articles.rss
Feed Description: Posts about and around Ruby, MetaRuby, ruby2c, ZenTest and work at The Robot Co-op.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Eric Hodel
Latest Posts From Segment7

Advertisement

An HTTP/1.1 pipelining implementation atop Net::HTTP. A pipelined connection sends multiple requests to the HTTP server without waiting for the responses. The server will respond in-order.

Example:

require 'net/http/pipeline'

Net::HTTP.start 'localhost' do |http|
  req1 = Net::HTTP::Get.new '/'
  req2 = Net::HTTP::Get.new '/'
  req3 = Net::HTTP::Get.new '/'

  http.pipeline [req1, req2, req3] do |res|
    puts res.code
    puts res.body[0..60].inspect
    puts
  end
end

1.0 / 2011-03-29

  • API change

    • Net::HTTP::Pipeline#pipeline requires an Array of Net::HTTPRequests now.

  • Major enhancement

    • If a sequence of requests contains a non-idempotent request #pipeline now waits for a response to the previous request.

  • Minor enhancements

    • Check for HTTP/1.1 and persistent connections before attempting pipelining

    • Added Net::HTTP#persistent= to avoid pipelining-capability check.

Read: net-http-pipeline 1.0

Topic: net-http-pipeline 1.0 Previous Topic   Next Topic Topic: Debugging an ASP .NET website with embedded Flash

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use