<?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"
	>
<channel>
	<title>Comments on: Ruby EventMachine - The Speed Demon</title>
	<atom:link href="http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/</link>
	<description>A goal is a dream with a deadline.</description>
	<pubDate>Thu, 20 Nov 2008 20:03:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Concurrency is a Myth in Ruby - igvita.com</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-145930</link>
		<dc:creator>Concurrency is a Myth in Ruby - igvita.com</dc:creator>
		<pubDate>Thu, 13 Nov 2008 17:16:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-145930</guid>
		<description>[...] is powered by a cluster of app servers (Mongrel, Ebb, Thin), and alternative strategies like EventMachine, and Revactor (equivalents of Twisted in Python) are gaining ground as a simple way to defer and [...]</description>
		<content:encoded><![CDATA[<p>[...] is powered by a cluster of app servers (Mongrel, Ebb, Thin), and alternative strategies like EventMachine, and Revactor (equivalents of Twisted in Python) are gaining ground as a simple way to defer and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Asynchronous DB: DBSlayer &#38; HTTP - igvita.com</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-110345</link>
		<dc:creator>Asynchronous DB: DBSlayer &#38; HTTP - igvita.com</dc:creator>
		<pubDate>Mon, 11 Aug 2008 16:12:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-110345</guid>
		<description>[...] to easily turn any HTTP request into a non-blocking request! Borrowing some sample code from my previous post on Ruby EventMachine, we have an easy Ruby web-server (port 8082) which makes an asynchronous DB call to fetch the [...]</description>
		<content:encoded><![CDATA[<p>[...] to easily turn any HTTP request into a non-blocking request! Borrowing some sample code from my previous post on Ruby EventMachine, we have an easy Ruby web-server (port 8082) which makes an asynchronous DB call to fetch the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-104022</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Mon, 16 Jun 2008 00:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-104022</guid>
		<description>Jens, that's a great point. As odd as it sounds: it's so refreshing to work in a shared nothing state of mind!</description>
		<content:encoded><![CDATA[<p>Jens, that&#8217;s a great point. As odd as it sounds: it&#8217;s so refreshing to work in a shared nothing state of mind!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jens Alfke</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103928</link>
		<dc:creator>Jens Alfke</dc:creator>
		<pubDate>Tue, 10 Jun 2008 14:49:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103928</guid>
		<description>This all sounds very familiar to me, as it's the way the Mac OS X frameworks (CFNetwork and Cocoa) operate. Nice to see this approach being used elsewhere!

One other advantage you didn't point out is that, by avoiding multithreading where possible, you can leave your code simpler and easier to read (and debug!) since it doesn't have to deal with deadlocks or race conditions. I've written lots of networked Cocoa code and almost never had to deal with thread synchronization or locking, thank god.</description>
		<content:encoded><![CDATA[<p>This all sounds very familiar to me, as it&#8217;s the way the Mac OS X frameworks (CFNetwork and Cocoa) operate. Nice to see this approach being used elsewhere!</p>
<p>One other advantage you didn&#8217;t point out is that, by avoiding multithreading where possible, you can leave your code simpler and easier to read (and debug!) since it doesn&#8217;t have to deal with deadlocks or race conditions. I&#8217;ve written lots of networked Cocoa code and almost never had to deal with thread synchronization or locking, thank god.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103828</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Fri, 06 Jun 2008 12:13:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103828</guid>
		<description>Jan, good point, here are the results:

&lt;blockquote&gt;
Concurrency Level:      20
Time taken for tests:   4.61886 seconds
Complete requests:      40
&lt;/blockquote&gt;</description>
		<content:encoded><![CDATA[<p>Jan, good point, here are the results:</p>
<blockquote><p>
Concurrency Level:      20<br />
Time taken for tests:   4.61886 seconds<br />
Complete requests:      40
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103577</link>
		<dc:creator>Jan</dc:creator>
		<pubDate>Fri, 30 May 2008 02:56:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103577</guid>
		<description>I think you should post the result of

ab -c 20 -n 40 "http://127.0.0.1:8081/"

for comparison (let threaded version run on 8081)</description>
		<content:encoded><![CDATA[<p>I think you should post the result of</p>
<p>ab -c 20 -n 40 &#8220;http://127.0.0.1:8081/&#8221;</p>
<p>for comparison (let threaded version run on 8081)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: This Week in Ruby (May 29, 2008) &#124; Zen and the Art of Programming</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103574</link>
		<dc:creator>This Week in Ruby (May 29, 2008) &#124; Zen and the Art of Programming</dc:creator>
		<pubDate>Thu, 29 May 2008 23:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103574</guid>
		<description>[...] do so. Other must-read tutorials and articles were Ruby &#38;&#38; DTrace! (really neat results), Ruby EventMachine &#8211; The Speed Demon by one of my favorite Ruby bloggers, and Will&#8217;s Guide to Mashing-up Remote Databases using [...]</description>
		<content:encoded><![CDATA[<p>[...] do so. Other must-read tutorials and articles were Ruby &#38;&#38; DTrace! (really neat results), Ruby EventMachine &#8211; The Speed Demon by one of my favorite Ruby bloggers, and Will&#8217;s Guide to Mashing-up Remote Databases using [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ilya Grigorik</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103566</link>
		<dc:creator>Ilya Grigorik</dc:creator>
		<pubDate>Thu, 29 May 2008 17:11:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103566</guid>
		<description>Patrick, I think the implementation depends on the underlying kernel. I would hope that most modern systems would default to per-page model you've described, but as we all know, assumptions are dangerous. In either case, fork is expensive (but has its benefits against memory leaks, security, etc.), so if you can use a threading/evented server.. you should.

Harish, yep, that's certainly the idea behind any remote worker pattern. BackgrounDRB specifically allows you to delegate a job to remote server, plus gives you the ability to memoize the results, check status, etc. 

In general, your ability to make a synchronous call asynchoronous (aka, delegate it) seems to be directly correlated with your ability to scale your application. ;)</description>
		<content:encoded><![CDATA[<p>Patrick, I think the implementation depends on the underlying kernel. I would hope that most modern systems would default to per-page model you&#8217;ve described, but as we all know, assumptions are dangerous. In either case, fork is expensive (but has its benefits against memory leaks, security, etc.), so if you can use a threading/evented server.. you should.</p>
<p>Harish, yep, that&#8217;s certainly the idea behind any remote worker pattern. BackgrounDRB specifically allows you to delegate a job to remote server, plus gives you the ability to memoize the results, check status, etc. </p>
<p>In general, your ability to make a synchronous call asynchoronous (aka, delegate it) seems to be directly correlated with your ability to scale your application. ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harish Mallipeddi</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103564</link>
		<dc:creator>Harish Mallipeddi</dc:creator>
		<pubDate>Thu, 29 May 2008 15:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103564</guid>
		<description>@Ilya, I guess you can do that but in the end you're just delegating the CPU-intensive task to someone else so you can be event-driven and single-threaded. I'm not much of a Ruby guy myself but is this how Backgroundrb works?</description>
		<content:encoded><![CDATA[<p>@Ilya, I guess you can do that but in the end you&#8217;re just delegating the CPU-intensive task to someone else so you can be event-driven and single-threaded. I&#8217;m not much of a Ruby guy myself but is this how Backgroundrb works?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Dubroy</title>
		<link>http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103563</link>
		<dc:creator>Patrick Dubroy</dc:creator>
		<pubDate>Thu, 29 May 2008 14:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.igvita.com/2008/05/27/ruby-eventmachine-the-speed-demon/#comment-103563</guid>
		<description>@Ilya: But copy-on-write is on a per-page basis, right? So there's not an up-front copy of the entire address space, it happens 4k at a time. And hopefully subsequent writes will tend to be on pages that have already been copies, rather than a new page each time.

I could be wrong, but I would think that in something like a web server, which doesn't have to do a lot of writing to its heap variables, the context switch overhead would be the problem, not the memory copy.</description>
		<content:encoded><![CDATA[<p>@Ilya: But copy-on-write is on a per-page basis, right? So there&#8217;s not an up-front copy of the entire address space, it happens 4k at a time. And hopefully subsequent writes will tend to be on pages that have already been copies, rather than a new page each time.</p>
<p>I could be wrong, but I would think that in something like a web server, which doesn&#8217;t have to do a lot of writing to its heap variables, the context switch overhead would be the problem, not the memory copy.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
