I have a problem described here: http://github.com/couchrest/couchrest/issues#issue/43
Couchrest is using rest-client.
It would be great if the library wouldn't create new connection per every request.
So this is possible without using hard socket api. May be it is useful to use Mechanize(without nokogiri) for requests?
From what I read on keep alive, wouldn't reusing the same connection prevent the library to be multithreaded ?
If I correctly understood your question, yes if the library use keep-alive connections it is not thread-safe(without some cheats). But this problem may be solved by reconnecting if socket is closed. Anyway mechanize can do it by itself.
*sorry for my english.
So I think I prefer to keep rest-client simple (mechnize is a big dependency) and thread-safe so to not support keep-alive, but you could perhaps do it with restclient-components http://github.com/crohr/rest-client-components
hmm it is good idea.
when I find time I'll implement this in my fork of rest-client-components.
@prettynatty +1 for this did you ever get this implemented?