<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Socket Timeouts in Ruby</title>
	<atom:link href="http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/</link>
	<description>On Ruby, software and the Internet</description>
	<lastBuildDate>Wed, 21 Jul 2010 20:03:10 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sergeych</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-445</link>
		<dc:creator>sergeych</dc:creator>
		<pubDate>Sun, 08 Nov 2009 03:07:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-445</guid>
		<description>doesn&#039;t work on Mac OS 10.5/ruby1.9. Does anybody ever wrote a decent sockets lib interface? Maybe everybody use dl direct calls for real work? Sockets in ruby, even 1.9, looks more like a joke...</description>
		<content:encoded><![CDATA[<p>doesn&#8217;t work on Mac OS 10.5/ruby1.9. Does anybody ever wrote a decent sockets lib interface? Maybe everybody use dl direct calls for real work? Sockets in ruby, even 1.9, looks more like a joke&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodjer</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-376</link>
		<dc:creator>Rodjer</dc:creator>
		<pubDate>Tue, 16 Jun 2009 07:37:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-376</guid>
		<description>Mike, any impression on how memcache client fares against memcached? 

While the memcache gem is certainly more managable and well supported in eg. Rails and related projects, then libmemcached appears to be the C lib that gets the most love.

Any thoughts on where we&#039;re headed and on the pros/cons of either library?

Thanks</description>
		<content:encoded><![CDATA[<p>Mike, any impression on how memcache client fares against memcached? </p>
<p>While the memcache gem is certainly more managable and well supported in eg. Rails and related projects, then libmemcached appears to be the C lib that gets the most love.</p>
<p>Any thoughts on where we&#8217;re headed and on the pros/cons of either library?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mperham</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-365</link>
		<dc:creator>mperham</dc:creator>
		<pubDate>Sat, 06 Jun 2009 19:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-365</guid>
		<description>@cheapRoc, memcache-client is designed to work on all ruby platforms.  It&#039;s included with Rails and so compatibility is the #1 priority.

If you need absolute maximum speed, you should upgrade to fauna/memcached, which in my experience is extremely fast but difficult to use on anything but Linux.

And, as Aaron has proven, often Ruby can be made quite fast without sacrificing compatibility if you know what you are doing.  Thanks Aaron!</description>
		<content:encoded><![CDATA[<p>@cheapRoc, memcache-client is designed to work on all ruby platforms.  It&#8217;s included with Rails and so compatibility is the #1 priority.</p>
<p>If you need absolute maximum speed, you should upgrade to fauna/memcached, which in my experience is extremely fast but difficult to use on anything but Linux.</p>
<p>And, as Aaron has proven, often Ruby can be made quite fast without sacrificing compatibility if you know what you are doing.  Thanks Aaron!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Patterson</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-364</link>
		<dc:creator>Aaron Patterson</dc:creator>
		<pubDate>Sat, 06 Jun 2009 18:42:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-364</guid>
		<description>Hi!  I patched memcache-client to make it fast by using a buffered IO object and non-blocking reads.  I think it will work on all platforms.  Bonus is that you don&#039;t need SystemTimer at all.

Here are my benchmarks:

http://gist.github.com/124957

Here is my patch:

http://github.com/tenderlove/memcache-client/commit/5d7f38ca066fcc9059432186d15c8fc50fcdfbcf

Oh, I sent a pull request too.  :-)</description>
		<content:encoded><![CDATA[<p>Hi!  I patched memcache-client to make it fast by using a buffered IO object and non-blocking reads.  I think it will work on all platforms.  Bonus is that you don&#8217;t need SystemTimer at all.</p>
<p>Here are my benchmarks:</p>
<p><a href="http://gist.github.com/124957" rel="nofollow">http://gist.github.com/124957</a></p>
<p>Here is my patch:</p>
<p><a href="http://github.com/tenderlove/memcache-client/commit/5d7f38ca066fcc9059432186d15c8fc50fcdfbcf" rel="nofollow">http://github.com/tenderlove/memcache-client/commit/5d7f38ca066fcc9059432186d15c8fc50fcdfbcf</a></p>
<p>Oh, I sent a pull request too.  <img src='http://www.mikeperham.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cheapRoc</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-363</link>
		<dc:creator>cheapRoc</dc:creator>
		<pubDate>Sat, 06 Jun 2009 16:37:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-363</guid>
		<description>@mperham excellent, excellent article and code.

one question though, i don&#039;t seem to understand rolling back features just because all platforms do not support them. 

shouldn&#039;t the features that we implement be tailored to each platform, utilizing the best that they provide, not dulling them down by spreading basic functionality across all of them... 

personally, i completely ignore Windows all together because i&#039;m not best fit to provide that Windows support. the power of OSS compels you. ;)</description>
		<content:encoded><![CDATA[<p>@mperham excellent, excellent article and code.</p>
<p>one question though, i don&#8217;t seem to understand rolling back features just because all platforms do not support them. </p>
<p>shouldn&#8217;t the features that we implement be tailored to each platform, utilizing the best that they provide, not dulling them down by spreading basic functionality across all of them&#8230; </p>
<p>personally, i completely ignore Windows all together because i&#8217;m not best fit to provide that Windows support. the power of OSS compels you. <img src='http://www.mikeperham.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mperham</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-362</link>
		<dc:creator>mperham</dc:creator>
		<pubDate>Sat, 06 Jun 2009 13:41:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-362</guid>
		<description>raggi, the benchmark is part of the test suite in the memcache-client source at http://github.com/mperham/memcache-client

And as an update, I&#039;ve had to roll back any use of socket timeouts in Ruby.  They don&#039;t work on all platforms (like Solaris mentioned above).</description>
		<content:encoded><![CDATA[<p>raggi, the benchmark is part of the test suite in the memcache-client source at <a href="http://github.com/mperham/memcache-client" rel="nofollow">http://github.com/mperham/memcache-client</a></p>
<p>And as an update, I&#8217;ve had to roll back any use of socket timeouts in Ruby.  They don&#8217;t work on all platforms (like Solaris mentioned above).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raggi</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-361</link>
		<dc:creator>raggi</dc:creator>
		<pubDate>Sat, 06 Jun 2009 11:12:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-361</guid>
		<description>What was the benchmark, and why is there such a massive discrepancy?

Just because timeout is broken in it&#039;s capabilities, I can&#039;t see why it would be over 200% slower.</description>
		<content:encoded><![CDATA[<p>What was the benchmark, and why is there such a massive discrepancy?</p>
<p>Just because timeout is broken in it&#8217;s capabilities, I can&#8217;t see why it would be over 200% slower.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David R</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-329</link>
		<dc:creator>David R</dc:creator>
		<pubDate>Sun, 12 Apr 2009 23:16:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-329</guid>
		<description>Apparently SO_RCVTIMEO/SO_SNDTIMEO are not supported in solaris, which renders the most recent version of the memcache-client pretty impotent.  I am getting these errors:

Errno::ENOPROTOOPT: Option not supported by protocol

And some googling on SO_RCVTIMEO and solaris didn&#039;t come up with any great solutions.</description>
		<content:encoded><![CDATA[<p>Apparently SO_RCVTIMEO/SO_SNDTIMEO are not supported in solaris, which renders the most recent version of the memcache-client pretty impotent.  I am getting these errors:</p>
<p>Errno::ENOPROTOOPT: Option not supported by protocol</p>
<p>And some googling on SO_RCVTIMEO and solaris didn&#8217;t come up with any great solutions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmytro Shteflyuk</title>
		<link>http://www.mikeperham.com/2009/03/15/socket-timeouts-in-ruby/comment-page-1/#comment-322</link>
		<dc:creator>Dmytro Shteflyuk</dc:creator>
		<pubDate>Wed, 25 Mar 2009 15:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikeperham.com/?p=220#comment-322</guid>
		<description>Hey Mike,

Thanking you for the great sharing! I was looking for some technique to handle timeouts in my Sphinx ruby client for a long time. Currently we (Scribd) wrap all calls in SystemTimer blocks, but your solution is much cleaner and it would be great improvement. Keep up your good work.

PS. We are using your memcache-client too and really enjoyed it. You rock!</description>
		<content:encoded><![CDATA[<p>Hey Mike,</p>
<p>Thanking you for the great sharing! I was looking for some technique to handle timeouts in my Sphinx ruby client for a long time. Currently we (Scribd) wrap all calls in SystemTimer blocks, but your solution is much cleaner and it would be great improvement. Keep up your good work.</p>
<p>PS. We are using your memcache-client too and really enjoyed it. You rock!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
