<?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: Rails deployment: wouldn&#039;t it be great if it worked like this?</title>
	<atom:link href="http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/feed/" rel="self" type="application/rss+xml" />
	<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/</link>
	<description>Ecchi nanowa ikenai to omoimasu</description>
	<lastBuildDate>Tue, 03 Jan 2012 16:14:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Roger Pack</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7694</link>
		<dc:creator>Roger Pack</dc:creator>
		<pubDate>Thu, 07 Feb 2008 22:21:38 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7694</guid>
		<description>Have you looked into mod_ruby?  I believe I once read that it can handle multiple rails guys going at once, but...I&#039;d say the main problem with mod_rails is the huge RAM cost.  Unless all the rails apps are trained to &#039;play nice&#039; and &#039;not take too long&#039; and &#039;don&#039;t override each other class methods&#039; you&#039;ll need lots and lots of memory.  Or I could be wrong.  I don&#039;t see an easy way out.  Thoughts?</description>
		<content:encoded><![CDATA[<p>Have you looked into mod_ruby?  I believe I once read that it can handle multiple rails guys going at once, but&#8230;I&#8217;d say the main problem with mod_rails is the huge RAM cost.  Unless all the rails apps are trained to &#8216;play nice&#8217; and &#8216;not take too long&#8217; and &#8216;don&#8217;t override each other class methods&#8217; you&#8217;ll need lots and lots of memory.  Or I could be wrong.  I don&#8217;t see an easy way out.  Thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Lorriman</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7680</link>
		<dc:creator>Greg Lorriman</dc:creator>
		<pubDate>Mon, 04 Feb 2008 22:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7680</guid>
		<description>My own problems with with deployment where mostly due to the bad documentation on the mongrel site. It is confusing. I instead turned to my VPS service documentation for mongrel setup, and it was also inadequate. I ended up having to solve the problems myself, having never configured Apache before: it took a long time.

A secondary problem is the number of problems with gem updates/installs. Gems seems to confuse the functionality of &#039;install&#039; and &#039;update&#039;. Even though I technically needed to update, actually I had to install. It took a long time to discover that.</description>
		<content:encoded><![CDATA[<p>My own problems with with deployment where mostly due to the bad documentation on the mongrel site. It is confusing. I instead turned to my VPS service documentation for mongrel setup, and it was also inadequate. I ended up having to solve the problems myself, having never configured Apache before: it took a long time.</p>
<p>A secondary problem is the number of problems with gem updates/installs. Gems seems to confuse the functionality of &#8216;install&#8217; and &#8216;update&#8217;. Even though I technically needed to update, actually I had to install. It took a long time to discover that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7657</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Mon, 28 Jan 2008 21:15:06 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7657</guid>
		<description>Dan Kubb: Yes it would, but instead of port administration you now have to do socket administration (though this is easier because there&#039;s less chance on conflicts). It would be best if no administration is needed, at all.</description>
		<content:encoded><![CDATA[<p>Dan Kubb: Yes it would, but instead of port administration you now have to do socket administration (though this is easier because there&#8217;s less chance on conflicts). It would be best if no administration is needed, at all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Kubb</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7656</link>
		<dc:creator>Dan Kubb</dc:creator>
		<pubDate>Mon, 28 Jan 2008 21:11:07 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7656</guid>
		<description>I know the thin server just added support for running via unix sockets.   I wonder if this would solve problem #3.</description>
		<content:encoded><![CDATA[<p>I know the thin server just added support for running via unix sockets.   I wonder if this would solve problem #3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7655</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Mon, 28 Jan 2008 20:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7655</guid>
		<description>Neil Wilson: mod_rails will not run the Rails app inside Apache&#039;s process space. It is not mod_ruby. Rails apps crashing will have no effect on Apache other than returning an Internal Server Error back to the client.

Whether all this trouble is worth it, is something that the users should decide.</description>
		<content:encoded><![CDATA[<p>Neil Wilson: mod_rails will not run the Rails app inside Apache&#8217;s process space. It is not mod_ruby. Rails apps crashing will have no effect on Apache other than returning an Internal Server Error back to the client.</p>
<p>Whether all this trouble is worth it, is something that the users should decide.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Wilson</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7654</link>
		<dc:creator>Neil Wilson</dc:creator>
		<pubDate>Mon, 28 Jan 2008 19:30:53 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7654</guid>
		<description>You&#039;ll probably pull in all the Apache memory management routines, which you would have to use to get Ruby running in the shared space without running into something else. Otherwise you risk potentially destabalising the web server with your parent forking structure.

I don&#039;t think there is much to be gained from sticking Rails within the Apache process. The real gain is CoW forking from the cluster start up processes with preloading, and again I wonder if it is worth creating the programming necessary to allow forking across users - with all the security problems that may turn up.

Fire up a mongrel/thin cluster using forking from user space using crontab @boot with the Rails app in the Unix user home directory. If you use thin as opposed to Mongrel you can use Unix sockets rather than ports and they have proper names! A crontab watch script can allow a restart on a file touch.

What I suggest is simple and can be done today with existing technology. You can use edge Rails and Gems - even a different Ruby interpreter if you change your path.

One commercial advantage of having multiple backend application servers running is that you can charge per port. The more concurrent ports you require for your app, the more it costs.</description>
		<content:encoded><![CDATA[<p>You&#8217;ll probably pull in all the Apache memory management routines, which you would have to use to get Ruby running in the shared space without running into something else. Otherwise you risk potentially destabalising the web server with your parent forking structure.</p>
<p>I don&#8217;t think there is much to be gained from sticking Rails within the Apache process. The real gain is CoW forking from the cluster start up processes with preloading, and again I wonder if it is worth creating the programming necessary to allow forking across users &#8211; with all the security problems that may turn up.</p>
<p>Fire up a mongrel/thin cluster using forking from user space using crontab @boot with the Rails app in the Unix user home directory. If you use thin as opposed to Mongrel you can use Unix sockets rather than ports and they have proper names! A crontab watch script can allow a restart on a file touch.</p>
<p>What I suggest is simple and can be done today with existing technology. You can use edge Rails and Gems &#8211; even a different Ruby interpreter if you change your path.</p>
<p>One commercial advantage of having multiple backend application servers running is that you can charge per port. The more concurrent ports you require for your app, the more it costs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7652</link>
		<dc:creator>Hongli</dc:creator>
		<pubDate>Mon, 28 Jan 2008 18:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7652</guid>
		<description>Neil Wilson: You&#039;re misunderstanding a few things, namely:
- Ruby&#039;s current garbage collector is not copy-on-write friendly, this is correct. But I&#039;ve already fixed this. See my previous blog articles in the Optimizing Rails category.
- Ruby&#039;s copy-on-write unfriendliness only affects the Ruby object heap, not everything else. A garbage collection will *not* make all the Apache data pages dirty as well.</description>
		<content:encoded><![CDATA[<p>Neil Wilson: You&#8217;re misunderstanding a few things, namely:<br />
- Ruby&#8217;s current garbage collector is not copy-on-write friendly, this is correct. But I&#8217;ve already fixed this. See my previous blog articles in the Optimizing Rails category.<br />
- Ruby&#8217;s copy-on-write unfriendliness only affects the Ruby object heap, not everything else. A garbage collection will *not* make all the Apache data pages dirty as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neil Wilson</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7650</link>
		<dc:creator>Neil Wilson</dc:creator>
		<pubDate>Mon, 28 Jan 2008 14:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7650</guid>
		<description>Slight problem with your vision. &#039;mod_rails&#039; is an Apache module. If you fork that then you will replicate the entire Apache process again - including the bits you don&#039;t want. Add to that the Ruby interpreters annoying inability to handle Copy on write effectively and you&#039;ll be up to Mongrel size in no time.

What you actually need is a mongrel cluster generator that forks the processes, and a Ruby interpreter that doesn&#039;t expand cause memory replication. Then what you do is create a Unix user for every customer you have, and boot empty mongrel clusters on preallocated ports (the ones you&#039;ve paid for) via the users own crontab. The mongrels run in user space, pointing at a blank Rails app sat in the users home directory. This is all created automagically via the Unix skeleton system. The web server proxies onto these ports for whaver domain it is managing. You then upload the Rails app into the home directory via capistrano in the normal fashion.

The solution is here http://accounts4free.rubyforge.org/svn/multi-tenant, but is in a pretty rough form at present and is probably out of date with regards to Rails 2, etc.</description>
		<content:encoded><![CDATA[<p>Slight problem with your vision. &#8216;mod_rails&#8217; is an Apache module. If you fork that then you will replicate the entire Apache process again &#8211; including the bits you don&#8217;t want. Add to that the Ruby interpreters annoying inability to handle Copy on write effectively and you&#8217;ll be up to Mongrel size in no time.</p>
<p>What you actually need is a mongrel cluster generator that forks the processes, and a Ruby interpreter that doesn&#8217;t expand cause memory replication. Then what you do is create a Unix user for every customer you have, and boot empty mongrel clusters on preallocated ports (the ones you&#8217;ve paid for) via the users own crontab. The mongrels run in user space, pointing at a blank Rails app sat in the users home directory. This is all created automagically via the Unix skeleton system. The web server proxies onto these ports for whaver domain it is managing. You then upload the Rails app into the home directory via capistrano in the normal fashion.</p>
<p>The solution is here <a href="http://accounts4free.rubyforge.org/svn/multi-tenant" rel="nofollow">http://accounts4free.rubyforge.org/svn/multi-tenant</a>, but is in a pretty rough form at present and is probably out of date with regards to Rails 2, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saimon Moore</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7649</link>
		<dc:creator>Saimon Moore</dc:creator>
		<pubDate>Mon, 28 Jan 2008 12:56:33 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7649</guid>
		<description>Good idea, right the module for nginx first and make sure it does &#039;fair&#039;:http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel proxying while you&#039;re at it :)</description>
		<content:encoded><![CDATA[<p>Good idea, right the module for nginx first and make sure it does &#8216;fair&#8217;:<a href="http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel" rel="nofollow">http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel</a> proxying while you&#8217;re at it <img src='http://izumi.plan99.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: karmi</title>
		<link>http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/comment-page-1/#comment-7648</link>
		<dc:creator>karmi</dc:creator>
		<pubDate>Mon, 28 Jan 2008 10:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://izumi.plan99.net/blog/index.php/2008/01/27/rails-deployment-wouldnt-it-be-great-if-it-worked-like-this/#comment-7648</guid>
		<description>&lt;blockquote&gt;&quot;Why can’t Rails deployment be as easy as PHP, i.e. upload-and-forget?&quot;&lt;/blockquote&gt;&#039;&#039;

Because the current Rails Way of deployment with versioned source code and Capistrano promotes much better and healthier development practices than PHP deployment in &quot;upload-and-forget&quot; style?

(If you&#039;re looking for &quot;a la PHP&quot; Ruby framework, have a look on magnificent http://sinatra.rubyforge.org/)</description>
		<content:encoded><![CDATA[<blockquote><p>&#8220;Why can’t Rails deployment be as easy as PHP, i.e. upload-and-forget?&#8221;</p></blockquote>
<p>&#8221;</p>
<p>Because the current Rails Way of deployment with versioned source code and Capistrano promotes much better and healthier development practices than PHP deployment in &#8220;upload-and-forget&#8221; style?</p>
<p>(If you&#8217;re looking for &#8220;a la PHP&#8221; Ruby framework, have a look on magnificent <a href="http://sinatra.rubyforge.org/" rel="nofollow">http://sinatra.rubyforge.org/</a>)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

