Feature matrix of Ruby HTTP clients

I posted Ruby HTTP clients feature matrix which compares various Ruby HTTP client implementations, as a product of Asakusa.rb meetups. I hope Ruby users find it informative.

Listed clients: net/http, open-uri, httparty, rest-client, right_http_connection, rufus-verbs, simplehttp, curb, patron, typhoeus, eventmachine, excon, httpclient, faraday, wrest, activeresource and rfuzz.

Sample and test scripts for this matrix is at github repo. Let me know if you find any mistakes (it must include some!) and my misunderstandings.

This matrix is a part of my presentation Oedo HTTP client picture scroll at Oedo RubyKaigi01(in Japanese) hosted by Asakusa.rb yesterday. You can see other comparisons including dependency, timeline and performance in the presentation. There are some Japanese commentary in it but almost major parts are in English and images.

Disclaimer: I'm the author of httpclient gem, which is one of a clients in the list. :)

Here's Summary in the presentation:
- net/http has various derivatives and alternatives because of old-style API and simple structure.
- Few derivatives of net/http offers full-features of net/http. Too simple to extend?
- Implemented features are vary from product to product.
- APIs are vary, too. Making simple API tends to introduce disunity.
- There's no performance difference between products but it's worth checking Keep-Alive and gzip compression support.
- Eventmachine is considerably fast, if you can do non-blocking all your code.
- Take care if you use C-ext libcurl variants. Some introduce interpreter blocking and JRuby/Rubinius incompatibility (at this moment).

And if you need SSL support, clients you can use are not much.

Have fun!


Eike said...

I'd like to know if the clients support the use of custom HTTP verbs like e.g. PURGE (used for varnish and squid)

NaHi said...

Updated. See 'custom (ex. PURGE)' column. And this commit would help you how to use it. https://github.com/asakusarb/odrk-http-client/commit/23151985f264cfa0e02e44fb4c6a402c17630797

Sidu said...

Thanks for mentioning Wrest - I was pleasantly surprised because hardly anyone knows it exists.

NaHi said...

Sidu: I think Wrest has an unique API set and I want to see how it gets users. Keep developing!

Kasper said...

Would you consider including clients that build on Apaches HttpClient such as https://github.com/aesterline/jruby-httpclient ?