<?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: A solution to scaling Ruby on Rails</title>
	<atom:link href="http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/feed" rel="self" type="application/rss+xml" />
	<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails</link>
	<description>Thoughts on poker, programming and other stuff.</description>
	<pubDate>Thu, 08 Jan 2009 18:04:38 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: New Mexico</title>
		<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/comment-page-1#comment-1358</link>
		<dc:creator>New Mexico</dc:creator>
		<pubDate>Sat, 19 May 2007 02:57:33 +0000</pubDate>
		<guid isPermaLink="false">http://thebull.macsimumweb.com/2007/04/16/a-solution-to-scaling-ruby-on-rails/#comment-1358</guid>
		<description>Warm greetings! Thanks for all the information, a very nice and well done site! Cheers.</description>
		<content:encoded><![CDATA[<p>Warm greetings! Thanks for all the information, a very nice and well done site! Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Olesen</title>
		<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/comment-page-1#comment-1334</link>
		<dc:creator>Per Olesen</dc:creator>
		<pubDate>Thu, 17 May 2007 07:33:34 +0000</pubDate>
		<guid isPermaLink="false">http://thebull.macsimumweb.com/2007/04/16/a-solution-to-scaling-ruby-on-rails/#comment-1334</guid>
		<description>Good reasons for using prepared statements are:

* Server better able to cache and reuse execution plans for sql-statements on server-side. It takes time/resources for db-server to parse and prepare an execution plan for a sql-statement. If it reads "select foo from bar where bleech = 42", it needs to be re-parsed when it comes in again with "select foo from bar where bleech = 666". Had it been "select foo from bar where bleech = :value", the execution plan could have been reused.

* Some java app-servers can cache prepared statement objects and reuse on client side. Weblogic for instance, can do this. Of course, there needs to be connection pooling to, then.

* Security: Many issues with sql-injection disappears, as doing for instance preparedStatement.setString(1, "blah 'blah' blah") will automatically escape the "illegal" chars in the driver.</description>
		<content:encoded><![CDATA[<p>Good reasons for using prepared statements are:</p>
<p>* Server better able to cache and reuse execution plans for sql-statements on server-side. It takes time/resources for db-server to parse and prepare an execution plan for a sql-statement. If it reads &#8220;select foo from bar where bleech = 42&#8243;, it needs to be re-parsed when it comes in again with &#8220;select foo from bar where bleech = 666&#8243;. Had it been &#8220;select foo from bar where bleech = :value&#8221;, the execution plan could have been reused.</p>
<p>* Some java app-servers can cache prepared statement objects and reuse on client side. Weblogic for instance, can do this. Of course, there needs to be connection pooling to, then.</p>
<p>* Security: Many issues with sql-injection disappears, as doing for instance preparedStatement.setString(1, &#8220;blah &#8216;blah&#8217; blah&#8221;) will automatically escape the &#8220;illegal&#8221; chars in the driver.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hongli Lai</title>
		<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/comment-page-1#comment-1327</link>
		<dc:creator>Hongli Lai</dc:creator>
		<pubDate>Wed, 16 May 2007 20:50:54 +0000</pubDate>
		<guid isPermaLink="false">http://thebull.macsimumweb.com/2007/04/16/a-solution-to-scaling-ruby-on-rails/#comment-1327</guid>
		<description>I've been working on implementing prepared statements support in Ruby on Rails. You can read about it here: http://izumi.plan99.net/blog/?p=35
I've mailed rubyonrails-core about this. Some people seem to be skeptical about the usage of prepared statements. Some argued that prepared statements can be a bit slower (because it requires an extra database roundtrip), and according to benchmarks, they are (at least for MySQL). What are good reasons to use prepared statements over regular ("manually built") SQL statements?</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been working on implementing prepared statements support in Ruby on Rails. You can read about it here: <a href="http://izumi.plan99.net/blog/?p=35" rel="nofollow">http://izumi.plan99.net/blog/?p=35</a><br />
I&#8217;ve mailed rubyonrails-core about this. Some people seem to be skeptical about the usage of prepared statements. Some argued that prepared statements can be a bit slower (because it requires an extra database roundtrip), and according to benchmarks, they are (at least for MySQL). What are good reasons to use prepared statements over regular (&#8221;manually built&#8221;) SQL statements?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JRuby on Rails in Tomcat Just Works! &#171; Kiyo&#8217;s Blog</title>
		<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/comment-page-1#comment-1215</link>
		<dc:creator>JRuby on Rails in Tomcat Just Works! &#171; Kiyo&#8217;s Blog</dc:creator>
		<pubDate>Thu, 03 May 2007 21:44:32 +0000</pubDate>
		<guid isPermaLink="false">http://thebull.macsimumweb.com/2007/04/16/a-solution-to-scaling-ruby-on-rails/#comment-1215</guid>
		<description>[...] I am really looking forward to JRuby 1.0. It&#8217;s a very exciting time. [...]</description>
		<content:encoded><![CDATA[<p>[...] I am really looking forward to JRuby 1.0. It&#8217;s a very exciting time. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Olesen</title>
		<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/comment-page-1#comment-1088</link>
		<dc:creator>Per Olesen</dc:creator>
		<pubDate>Wed, 18 Apr 2007 16:23:48 +0000</pubDate>
		<guid isPermaLink="false">http://thebull.macsimumweb.com/2007/04/16/a-solution-to-scaling-ruby-on-rails/#comment-1088</guid>
		<description>I'm trying deployment of my Rails apps on the JRuby/JVM platform too currently. At first to have a deployment with one instance only to administrate, taking advantage of the thread-pooling of Java application servers.

But with respect to raw performance the JVM still needs some support for dynamic languages, doesn't it? Here http://www.infoq.com/presentations/gilad-bracha-dynamic-languages-jvm Gilad Bracha talks about this, especially the invokedynamic bytecode. When (if) this becomes implemented, we might start to get some of the benefits that we get today with Javas static way of working. Like hotspot compiling and the like.

Until then, we must rely on the JRuby JIT-stuff. If not, it will be interpretation of a VM-based languange on top of another language...</description>
		<content:encoded><![CDATA[<p>I&#8217;m trying deployment of my Rails apps on the JRuby/JVM platform too currently. At first to have a deployment with one instance only to administrate, taking advantage of the thread-pooling of Java application servers.</p>
<p>But with respect to raw performance the JVM still needs some support for dynamic languages, doesn&#8217;t it? Here <a href="http://www.infoq.com/presentations/gilad-bracha-dynamic-languages-jvm" rel="nofollow">http://www.infoq.com/presentations/gilad-bracha-dynamic-languages-jvm</a> Gilad Bracha talks about this, especially the invokedynamic bytecode. When (if) this becomes implemented, we might start to get some of the benefits that we get today with Javas static way of working. Like hotspot compiling and the like.</p>
<p>Until then, we must rely on the JRuby JIT-stuff. If not, it will be interpretation of a VM-based languange on top of another language&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Bull</title>
		<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/comment-page-1#comment-1080</link>
		<dc:creator>The Bull</dc:creator>
		<pubDate>Mon, 16 Apr 2007 19:39:17 +0000</pubDate>
		<guid isPermaLink="false">http://thebull.macsimumweb.com/2007/04/16/a-solution-to-scaling-ruby-on-rails/#comment-1080</guid>
		<description>I think it certainly could be. The only real barrier I see at the moment is getting the word out and overcoming in Java related FUD. 

I completely missed the connection pooling of the app server (duh...) :-)

Prepared statements would be a big plus as well. Any DBA worth his certification will tell you that dynamic SQL isn't good. I think this area is really missed since a lot of people going to rails is coming from PHP and related languages that don't normally use prepared statements.</description>
		<content:encoded><![CDATA[<p>I think it certainly could be. The only real barrier I see at the moment is getting the word out and overcoming in Java related FUD. </p>
<p>I completely missed the connection pooling of the app server (duh&#8230;) <img src='http://thebull.macsimumweb.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Prepared statements would be a big plus as well. Any DBA worth his certification will tell you that dynamic SQL isn&#8217;t good. I think this area is really missed since a lot of people going to rails is coming from PHP and related languages that don&#8217;t normally use prepared statements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Oliver Nutter</title>
		<link>http://thebull.macsimumweb.com/a-solution-to-scaling-ruby-on-rails/comment-page-1#comment-1079</link>
		<dc:creator>Charles Oliver Nutter</dc:creator>
		<pubDate>Mon, 16 Apr 2007 18:26:17 +0000</pubDate>
		<guid isPermaLink="false">http://thebull.macsimumweb.com/2007/04/16/a-solution-to-scaling-ruby-on-rails/#comment-1079</guid>
		<description>A few other points in our favor:

- JRuby on Rails deployed to a clusterable app server like GlassFish will use GF's session replication (this is not yet working, but it's planned)
- JRoR will use a Java connection pool for sharing database connections
- Some proof-of-concept work has been done with JRoR to use prepared statements. The tricky bit seems to be deciding when to prepare statements, since Rails generates a lot of different SQL. It's a JIT-like question
- There are also bound to be efforts soon to build things like ActiveHibernate or ActiveJPA, to allow using a more Java/Appserver-friendly ORM layer that's still Rails-feeling. See Ola Bini's blog for a bit of discussion on that.

We certainly hope that JRuby will be an option (perhaps THE option) for large, scalable Rails apps, and we're looking for anyone and everyone to help us get there.</description>
		<content:encoded><![CDATA[<p>A few other points in our favor:</p>
<p>- JRuby on Rails deployed to a clusterable app server like GlassFish will use GF&#8217;s session replication (this is not yet working, but it&#8217;s planned)<br />
- JRoR will use a Java connection pool for sharing database connections<br />
- Some proof-of-concept work has been done with JRoR to use prepared statements. The tricky bit seems to be deciding when to prepare statements, since Rails generates a lot of different SQL. It&#8217;s a JIT-like question<br />
- There are also bound to be efforts soon to build things like ActiveHibernate or ActiveJPA, to allow using a more Java/Appserver-friendly ORM layer that&#8217;s still Rails-feeling. See Ola Bini&#8217;s blog for a bit of discussion on that.</p>
<p>We certainly hope that JRuby will be an option (perhaps THE option) for large, scalable Rails apps, and we&#8217;re looking for anyone and everyone to help us get there.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.266 seconds -->
