Archive

Posts Tagged ‘Net/HTTP’

benchmarking curb/net::http/evdispatch

June 4th, 2008

I started to put together some benchmarks to validate my work on evdispatch. Here’s what I have so far…

Curb as a pure C extension runs on the main ruby thread, meaning no ruby threads can be schedule while it’s blocking. It uses the easy curl interface meaning it’s all blocking. This makes it very easy to use and for single requests it’s great. For multiple requests, it’s as though all the requests are made one after the other in serial.
Read more…

Software , , , ,

Debugging Ruby net/http

December 4th, 2007

I just discovered this really useful feature built into Ruby’s network library.

set_debug_output

You can use this to get extensive debugging for everything sent or received.

You might use it like this:

@uri = URI.parse(service_url)
@url = Net::HTTP.new(@uri.host, @uri.port)
@url.set_debug_output $stderr

That will print out everything sent and received using that @url object.

Software ,