<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Engine Yard Blog &#187; Engine Yard</title>
	<atom:link href="http://www.engineyard.com/blog/author/engineyard/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.engineyard.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 19:36:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Programming Contest! And The Winners are&#8230;</title>
		<link>http://www.engineyard.com/blog/2009/programming-contest-and-the-winners-are/</link>
		<comments>http://www.engineyard.com/blog/2009/programming-contest-and-the-winners-are/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 17:10:50 +0000</pubDate>
		<dc:creator>Engine Yard</dc:creator>
				<category><![CDATA[Contests]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[Hash]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=1621</guid>
		<description><![CDATA[<p>Now that everyone's CPU and GPU clusters have cooled down, we're ready to announce the contest winners!</p>
<p>Everyone can still sleep well at night: SHA1 was brutally assaulted, but its walls remain inviolate. The winning Hamming Distance was 30 -- which given the time and resources available was a terrific achievement. That means the winner generated a hash that matched 130 bits of the 160 bits of the challenge hash!</p>
<p><a href="http://twitter.com/seibert">@seibert</a> leaped into an early lead on Monday afternoon and held it alone until, with 75 minutes left in the contest, <a href="http://twitter.com/hashbreaker">@hashbreaker</a> crashed in with a HD31 entry. The leaderboard was tied. Then with a few minutes left in the contest, <a href="http://twitter.com/CodingCrypto">@CodingCrypto</a> jumped in with the sole HD30 entry FTW! @seibert won the coin-toss vs. @hashbreaker for second place -- congrats to all the finalists!</p>
<p><span id="more-1621"></span></p>
<p><strong>First Place</strong>:  @CodingCrypto with <strong><span class="status-body"><span class="entry-content">BuGS bugs bUgs BUGs BLAnK BlAnK blANK BlaNK BuGS BUgS buGS bugS FkCjV </span></span></strong><span class="status-body"><span class="entry-content">using a </span></span><a href="http://www.win.tue.nl/cccc/sha-1-challenge.html"><span class="status-body"><span class="entry-content">10 machine cluster of mixed CPU and GPU execution</span></span></a><strong></strong><span class="status-body"><span class="entry-content">. A Hamming Distance of 30.</span></span><strong><span class="status-body"><span class="entry-content"> </span></span></strong>@CodingCrypto<strong><span class="status-body"><span class="entry-content"> </span></span></strong><span class="status-body"><span class="entry-content">wins the iPhone 3GS and $2k in Engine Yard Cloud credit.<br />
</span></span></p>
<p><span class="status-body"><span class="entry-content"><strong>Second Place: </strong></span></span>@seibert with <strong><span class="status-body"><span class="entry-content">lINeS lInUX ligHTtpD lIb leheY LIBRaRY libcRyPt linK layer LeSK linus laYOuT j|39 </span></span></strong><span class="status-body"><span class="entry-content">using 4 high end NVIDIA cards and a CUDA program written by Steve Worley. A Hamming Distance of 31. @seibert gets the second place iPhone 3GS!<br />
</span></span></p>
<p><span class="status-body"><span class="entry-content">[Greg Lehey is a FreeBSD contributor and Michael Lesk wrote lex and uucp for Unix<strong>]</strong></span></span></p>
<p>@CodingCrypto was an international team from the Technical University of Eindhoven, San Diego Super Computer Center, University of Illinois at Chicago, National Taiwan University, and Academia Sinica, Taiwan. @seibert was <span class="status-body"><span class="entry-content">Stan Seibert</span></span>, a <span class="status-body"><span class="entry-content">postdoctoral researcher at Los Alamos National Laboratory</span></span>.</p>
<p>There were a bunch of neat things we learned during the contest:</p>
<ul>
<li>A clutch of desktop GPUs is <a href="http://www.flickr.com/photos/hoyhoy/3743710781/">silly fast</a> for these kinds of calculations. Most of the higher scorers were using some kind of GPU rig from Nvidia or ATI.</li>
<li>Using browser-based javascript engines to <a href="http://www.raycmorgan.com/">crowd-source</a> your computations delivers better than average performance, but couldn't compete with a multi-GPU rig.</li>
<li>If you're crowd-sourcing, better check the inputs! One of the crowd-sourcers was thrilled to receive a result with a reported hamming distance of zero! Only to discover one of his crowd-sourcers had hacked his javascript to report back this (incorrect) result.</li>
</ul>
<p>Shout-Outs and Miscellanea!</p>
<ul>
<li>http://jazzychad.com/engineyard/ and http://digitalworkboxlabs.com/ did very cool automated leaderboards</li>
<li>The <a href="http://www.raycmorgan.com/">excellent</a> and <a href="http://shacontest.doloreslabs.com/">creative</a> crowdsourcers</li>
<li>The Nvidia CUDA hivemind collaboration with <a href="http://forums.nvidia.com/index.php?showtopic=102349">some gnarly CUDA code</a></li>
<li><a href="http://twitter.com/antirez">@antirez</a> who did the math on hash collision probabilities</li>
<li><a href="http://twitter.com/rkneufeld">@rkneufeld</a> with his HD34 entry <span id="msgtxt2758495179" class="msgtxt en">"ruby ruBy RuBY RuBy rUBy ruBY ruby ruby ruby ruby ruby ruby 3:OID"</span></li>
<li><span id="msgtxt2758495179" class="msgtxt en">And finally, the OCD-like HD33 entry from @hashbreaker: </span>"CoWS coWS CowS cOWS DiRTY DIrtY DirTy DIRtY COWS COWS cOwS cOWS bvpDq"</li>
</ul>
<p>We thought our sample challenge phrase would give Ruby on Rails folks a small advantage since it was a DHH quote, as was our second sample phrase. It wasn't impossible to figure out what other possible phrases we might use, and start crunching away on the dictionary excerpt last week (it had enough entropy). But alas, it did not appear anyone took advantage of the head-start.</p>
<p>The dictionary was made up of notable programmers, computer scientists, cryptologists, major internet RFC's, Ruby and Rails community Twitter handles, ruby and rails function calls, and a mishmash of random things like xkcd.</p>
<p>Hope you enjoyed the contest! We'll be doing another related blog post next week with a bit more information on some of the creative solutions people came up with, complete with code and stories.</p>
<p>Stay tuned for our September contest, but no more with the brute-forcing! The next contest will entail some creative Ruby programming!
<p><a href="http://www.engineyard.com/blog"><img height="98" width="61" title="logo-engineyard" alt="" class="attachment-post-thumbnail wp-post-image" src="http://www.engineyard.com/blog/wp-content/uploads/logo-engineyard.png"/></a></p>
]]></description>
		<wfw:commentRss>http://www.engineyard.com/blog/2009/programming-contest-and-the-winners-are/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Engine Yard Contest Challenge Phrase And Dictionary</title>
		<link>http://www.engineyard.com/blog/2009/engine-yard-contest-challenge-phrase-and-dictionary/</link>
		<comments>http://www.engineyard.com/blog/2009/engine-yard-contest-challenge-phrase-and-dictionary/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 18:59:30 +0000</pubDate>
		<dc:creator>Engine Yard</dc:creator>
				<category><![CDATA[Contests]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[sha1]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=1595</guid>
		<description><![CDATA[<p>We know you've all been working diligently and waiting, so here it is!</p>
<p>The challenge phrase is:</p>
<p><code>I would much rather hear more about your whittling project</code></p>
<p>And <a href="http://eyweb-documents.s3.amazonaws.com/ContestDictionary.rtf">here is the phrase dictionary</a>.</p>
<p><strong>Remember</strong>:</p>
<ul>
<li>The cut-off time/date for the contest is 6pm PDT tomorrow July 21st</li>
<li>You must be following <a href="http://twitter.com/engineyard">@engineyard</a> for your entries to count</li>
<li>Max of five entries per person</li>
</ul>
<p>While your CPU's are burning through this, you might want to <a href="https://www2.gotomeeting.com/register/710188275">check out our developer webinar</a> on the Engine Yard Cloud at 11am PDT tomorrow; after all, if you're going to <em>win</em> the cloud credit, don't you want to learn all about it? ;)</p>
<p>Good luck!</p>
<p><strong>Note:</strong> If you liked this contest, stay tuned for our September contest! Similar levels of trickery + programming will prevail.
<p><a href="http://www.engineyard.com/blog"><img height="98" width="61" title="logo-engineyard" alt="" class="attachment-post-thumbnail wp-post-image" src="http://www.engineyard.com/blog/wp-content/uploads/logo-engineyard.png"/></a></p>
]]></description>
		<wfw:commentRss>http://www.engineyard.com/blog/2009/engine-yard-contest-challenge-phrase-and-dictionary/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>Programming Contest! Win iPhone 3GS &amp; $2,000 Cloud Credit</title>
		<link>http://www.engineyard.com/blog/2009/programming-contest-win-iphone-3gs-2k-cloud-credit/</link>
		<comments>http://www.engineyard.com/blog/2009/programming-contest-win-iphone-3gs-2k-cloud-credit/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 16:43:41 +0000</pubDate>
		<dc:creator>Engine Yard</dc:creator>
				<category><![CDATA[Engine Yard Cloud]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[Hash]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=1493</guid>
		<description><![CDATA[<p>We're kicking off a programming contest today that is sure to challenge even the most comp-sci heavy engineers out there, and we're excited to see what you all come up with. With the difficulty of the challenge in mind, we've got some great prizes for the winner: an iPhone 3GS AND $2,000 of Cloud (Flex or Solo) credit.  Now to jump right in and answer all your questions...</p>
<h2>What is the contest?</h2>
<p>You must tweet a sequence of twelve words that <strong>when hashed</strong> is bit-wise closest to a hash of a challenge phrase that we will announce the morning of July 20th.  All words must be from a 1,000 word dictionary we will provide at that same time. You are allowed to append up to five random characters to the end of your entry. We're pretty confident you'll want to write a program to automate the finding of close matches, so announcing this a week in advance should give you enough time to get your programs up and running.</p>
<h2>How do I enter?</h2>
<p>To enter the contest, follow <a href="http://twitter.com/engineyard" target="_blank">@engineyard</a> on Twitter and tweet your best candidate word sequence before 6pm Pacific Time on July 21st. This means you have about 30 hours between the availability of the challenge phrase and dictionary, and the entry submission cut-off time.</p>
<p>As previously mentioned, the winner of the contest will get an iPhone 3GS AND $2,000 of Cloud (Flex or Solo) credit). [You can also choose an alternative of load test credits worth $2,000 from browsermob]. Second prize is another iPhone 3GS.</p>
<h2>So how does it work exactly? (Update! Example Now Clearer!)</h2>
<p>Let's take an example: a dictionary excerpt is: "Cloud, Ruby, DHH, one, eight, six, active, record, controller, data, rspec, mongrel, MySQL, postgresSQL, tokyo, MRI, jruby, rubinius, memcached, exception, metaprogramming, reflection."  Let's also say we announce that the challenge phrase is <code>I am not a big believer in fortune telling</code></p>
<p>To submit a contest entry, you would follow us on Twitter and tweet your best entry, e.g:<br />
"@engineyard Rubinius one eight six active active record memcached exception JRuby DHH TOKYO sdfe3"</p>
<p>We will take the SHA-1 hash of this phrase: <code>Rubinius one eight six active active record memcached exception JRuby DHH TOKYO sdfe3</code> which hashes to <code>cd36b6dc8d4ed51b36dd7fce08f500392a7fb782</code> and compare it to the SHA-1 hash of <code>I am not a big believer in fortune telling</code> (which hashes to: <code>6cac827bae250971a8b1fb6e2a96676f7a077b60</code>).</p>
<p>When we say "compare," we mean that we will take the Hamming distance between the two hashes; the sum of the count of dissimilar bits when the hex hashes are converted to binary.</p>
<p>For example, here the binary of <code>cd36...etc.</code> is:<br />
<code>1100110100110110...etc.</code><br />
and the binary of <code>6cac...etc.</code> is:<br />
<code>0110110010101100...etc.</code></p>
<p>So calculating the Hamming distance is done as follows:<br />
<code>- first two bits (1 vs 0) don't match -&gt; +1 to Hamming distance<br />
- second two bits (1 vs. 1) do match -&gt; no change to Hamming distance<br />
- third two bits (0 vs. 1) don't match -&gt; +1 to Hamming distance</code><br />
etc.</p>
<p>In the case of the complete example hashes above, the Hamming difference is 74. If you are the submitter with the lowest Hamming distance, you win the prizes - it's that simple ;)</p>
<p><strong>Extra Prize</strong>: If you manage to achieve a Hamming distance of zero, we'll throw in a MacBook Pro: you are either highly improbable, have mad algorithm cracking skills or you work for the NSA, any of which makes you cool enough to deserve random goodness and recognition. Note: we know the probability of anyone getting to a zero Hamming distance is truly vanishingly small, but we wanted to acknowledge anyone making it there!</p>
<p>There are some obvious brute force strategies to win this prize. We'd suggest building a really fast word permutation algorithm, and finding a fast SHA-1 hash algorithm. Then find a way to get your hands on a whole bunch of computation for the 24 hours that the contest will run (hmm... perhaps the cloud would be useful).</p>
<p>More details and conditions:</p>
<ol>
<li>Only US ASCII printable characters in your custom five character string please (we really want to avoid Unicode rat-holes)</li>
<li>The words in your string must be single space separated; no other punctuation is allowed</li>
<li>Spamming new entries as you find better ones is a fail whale; limit your contest tweets to a maximum of five</li>
<li>The dictionary will be a Macintosh TextEdit file in RTF format, with each word on a separate line, and no white-space.</li>
<li>In the case of a tied Hamming distance (entirely possible), the winner will be chosen by lottery among people with the best distance</li>
<li>You may permute capitalization for the dictionary words (i.e. you may use Ruby, rUby, RUBY, and RUBy)</li>
<li>Please scrub your custom five character string for the five words you can't say on television</li>
<li>If the exact same string is submitted multiple times, only the first submission counts</li>
<li>Employees and contractors of Engine Yard, and their family members are not eligible</li>
</ol>
<p>Okay, so maybe "It's that simple" was a bit, well, over-simplified, but we're confident we'll get some great submissions. The Ruby community is nothing if not persistent, creative and intelligent -- so show us what you've got!</p>
<h2>Miscellaneous clarifications </h2>
<p>1) When you convert the hexadecimal hash to binary -- you need to convert the hex to the equivalent number in binary  e.g. "c" = "12" in decimal = "1100" in (big endian) binary. Make sure that your binary conversion function is NOT treating "c" as ASCII letter "c" -- which gets you the completely different answer of "63" in decimal or "01100011" in binary.<br />
2) Be careful if you end up using string hashing functions in C. Remember that C strings are null terminated, and from reports we're getting, at least some string functions out there take the Null string terminator ( "�") as an input to the hash function. This will get you in trouble because we will not be including a null terminator when we calculate the hash of your tweets. Naturally, we will treat your tweet as a (sane) Ruby string.  </p>
<h2>Another example for folks</h2>
<p>People have asked for another example to test their hashing algorithms so here it is:<br />
<br />
Example challenge phrase #2:<br />
<code>What you write today will become legacy</code><br />
which hashes to:<br />
<code>7f83e6b422af5ca4e3112486aea3e702e98a894e</code> or in hex to binary (big-endian):<br />
<code>0111	1111	1000	0011	1110	0110	1011	0100	0010	0010	1010	1111	0101	1100	1010	0100	1110	0011	0001	0001	0010	0100	1000	0110	1010	1110	1010	0011	1110	0111	0000	0010	1110	1001	1000	1010	1000	1001	0100	1110</code><br />
<br />
Example contest entry tweet #2:<br />
@engineyard RuBy one eight six rspec mongrel MRI jruby jruby memcached exception reflection utf8E</p>
<p>We will take the hash of <code>RuBy one eight six rspec mongrel MRI jruby jruby memcached exception reflection utf8E</code><br />
which hashes to:<br />
<code>075a32acb1816b570607189475ebbbaccce8b79f</code> or in hex to binary (big-endian):<br />
<code> 0000	0111	0101	1010	0011	0010	1010	1100	1011	0001	1000	0001	0110	1011	0101	0111	0000	0110	0000	0111	0001	1000	1001	0100	0111	0101	1110	1011	1011	1011	1010	1100	1100	1100	1110	1000	1011	0111	1001	1111</code></p>
<p>The hamming distance between these two hashes (again, remember treating the hash as HEXADECIMAL, NOT ASCII) is 80.</p>
<p>Example dictionary file: <a href='http://eyweb-documents.s3.amazonaws.com/SampleDictionary.rtf'>sampledictionary</a></p>
<p><a href="http://www.engineyard.com/blog"><img height="98" width="61" title="logo-engineyard" alt="" class="attachment-post-thumbnail wp-post-image" src="http://www.engineyard.com/blog/wp-content/uploads/logo-engineyard.png"/></a></p>
]]></description>
		<wfw:commentRss>http://www.engineyard.com/blog/2009/programming-contest-win-iphone-3gs-2k-cloud-credit/feed/</wfw:commentRss>
		<slash:comments>159</slash:comments>
		</item>
		<item>
		<title>Getting Started With JRuby</title>
		<link>http://www.engineyard.com/blog/2009/getting-started-with-jruby/</link>
		<comments>http://www.engineyard.com/blog/2009/getting-started-with-jruby/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 16:48:46 +0000</pubDate>
		<dc:creator>Engine Yard</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JRuby]]></category>
		<category><![CDATA[Support]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=1332</guid>
		<description><![CDATA[<p><em>In the wake of our recent announcement of JRuby support, we have a guest post from <a href="http://blog.headius.com/">Charlie Nutter</a> of the JRuby team on getting starting with JRuby:</em></p>
<p>"Last week, Engine Yard announced they would soon <a href="http://www.engineyard.com/products/jruby-support">support running JRuby</a> in their cloud environment. I think I speak for the whole JRuby community when I say how excited we are about this new possibility. JRuby has proven itself a top-notch, production-quality Ruby implementation, and the Engine Yard announcement really made us feel proud of what we've accomplished. It also got us thinking about what JRuby really means for Engine Yard customers.</p>
<p>JRuby is, simply put, Ruby on top of the Java virtual machine. While this means you get the benefits of the JVM's world-class garbage collectors, libraries, and optimizations, it does not mean you have to know Java to use JRuby. We've worked very hard to make JRuby look and feel "just like Ruby." So much so, that these days basically all pure-Ruby libraries should "just work" out of the box. Rails runs great, and there's dozens of production users out there reaping the benefits of JRuby's outstanding memory management, native threads (actually running in parallel!), and excellent performance...all of which we continue to improve with every release. JRuby at Engine Yard means you'll also be able to take advantage of Engine Yard Ruby and Rails expertise, along with the assurances that your application will "just work" in their cloud.</p>
<p>So how do you get started with JRuby? Easy!</p>
<ul>
<li>Download JRuby from <a href="http://www.jruby.org" rel="nofollow">http://www.jruby.org</a>. JRuby 1.3.0 is the current release, but you can feel comfortable testing out either 1.3.0 or 1.2.0: the previous release several folks already have in production.</li>
<li>Unpack it somewhere convenient. You don't have to install it as root, but you can if you like. And you can have as many separate JRuby installs as you want, alongside any standard Ruby installs already on your system.</li>
<li>Put JRuby's "bin" directory somewhere in your PATH, so you can run the "jruby" command easily.</li>
</ul>
<p>That's it! You're ready to try it out!</p>
<p><span id="more-1332"></span></p>
<p>Depending on how you have your PATH set up, you can either run "gem" to install RubyGems (if JRuby's "gem" comes earlier in the path than standard Ruby), or you can run "jruby -S gem" to force JRuby's copy to run (this will work for anything else in JRuby's bin dir, too). A few gems you'll probably want to know about:</p>
<ul>
<li>Rails works great! Just "gem install rails" or "jruby -S gem install rails" and you're nearly there.</li>
<li>ActiveRecord is also well-supported in JRuby, but you'll need to install the JDBC-based (Java's DB API) adapters. So for mysql, you want "gem install activerecord-jdbcmysql-adapter" and "jdbcmysql" as your adapter type in database.yml. For sqlite3 there's "activerecord-jdbcsqlite3-adapter", and so on.</li>
<li>Gems that have native extensions (C code, usually indicated by RubyGems trying to build something on install) will not work in JRuby. Usually there's an equivalent library, either a port of the C version, a wrapper around the actual C library, or a Java version. <a href="http://www.jruby.org" rel="nofollow">jruby.org</a> provides a good list of commonly-used extensions and their equivalents on JRuby, or you can check <a href="http://isitjruby.org" rel="nofollow">isitjruby.org</a> to see if your favorite extension is supported or has an alternative.</li>
</ul>
<p>We'll be publishing more information about how to get up and running with JRuby, especially if you have native dependencies, over the next couple weeks. And of course you can join the JRuby mailing lists or visit our IRC channel #jruby on FreeNode any time. There's never been a better time to try JRuby!"
<p><a href="http://www.engineyard.com/blog"><img height="98" width="61" title="logo-engineyard" alt="" class="attachment-post-thumbnail wp-post-image" src="http://www.engineyard.com/blog/wp-content/uploads/logo-engineyard.png"/></a></p>
]]></description>
		<wfw:commentRss>http://www.engineyard.com/blog/2009/getting-started-with-jruby/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Http Digest Auth: Vulnerability in Rails 2.3.1/2</title>
		<link>http://www.engineyard.com/blog/2009/http-digest-auth-vulnerability-in-rails-2312/</link>
		<comments>http://www.engineyard.com/blog/2009/http-digest-auth-vulnerability-in-rails-2312/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 01:28:16 +0000</pubDate>
		<dc:creator>Engine Yard</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[http digest auth]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=1197</guid>
		<description><![CDATA[<p>If you are using Ruby on Rails 2.3.1 or 2.3.2,  using http *digest* authentication and setting the username / password via hash, then you will be affected by this vulnerability. This vulnerability allows users to bypass http authentication without a valid password.</p>
<p>Please read the <a rel="nofollow" href="http://groups.google.com/group/rubyonrails-security/browse_thread/thread/20e17a978d2ccbd3?hl=en">full posting on the Rails Security Group</a> for more details and the appropriate workaround to implement in your code, until the official fix is available in the 2.3.3 release.</p>
<p>(Engine Yard customers have already been contacted via email about this vulnerability).
<p><a href="http://www.engineyard.com/blog"><img height="98" width="61" title="logo-engineyard" alt="" class="attachment-post-thumbnail wp-post-image" src="http://www.engineyard.com/blog/wp-content/uploads/logo-engineyard.png"/></a></p>
]]></description>
		<wfw:commentRss>http://www.engineyard.com/blog/2009/http-digest-auth-vulnerability-in-rails-2312/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>5 Tips to Scale Your Ruby on Rails Application</title>
		<link>http://www.engineyard.com/blog/2009/5-tips-to-scale-your-ror-application/</link>
		<comments>http://www.engineyard.com/blog/2009/5-tips-to-scale-your-ror-application/#comments</comments>
		<pubDate>Wed, 20 May 2009 13:00:23 +0000</pubDate>
		<dc:creator>Engine Yard</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Scalability]]></category>
		<category><![CDATA[Scaling Rails]]></category>
		<category><![CDATA[Sharding]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=1061</guid>
		<description><![CDATA[<p>There are lots of resources on the web that explain how to scale web applications and how to scale Rails. Here's a quick summary of just five of the basic strategies for a scalable Ruby on Rails web application. Some of them are specific to Ruby on Rails; others generalize to any shared-nothing application server architecture.</p>
<p><strong>1) Cache, cache, cache and more cache.</strong><br />
Cache at the client and use Ajax libraries like JQuery to stream in data to the browser on demand. Use gateway /reverse proxy caches to cache HTTP responses at your website, and learn how to use expiration and etags. Take full advantage of Rails' built-in action, page and fragment caching. Use memcache to cache results that you'd otherwise pull from your database.</p>
<p><strong>2) Segregate data and data serving</strong><br />
Don't munge all your data storage into a single database "for convenience." Datasets that are independent should go into separate databases. Serve static assets from a separate tier, or use Amazon S3 or a CDN like Akamai to serve those assets. It's more expensive, but it simplifies scaling. Relational databases scale up, not out, so sit down and have a heart to heart talk with your DBA over whether you really need a relational data model for all your data stores. Maybe you can get away with a simpler key-value data store for some of your simpler data. There are ruby clients, so use Hadoop for scaling the storage and analysis of large amounts of unstructured data. Also know the scalability limitations of whatever file system you're using. If you have heavy data reporting needs, do your reporting from a copy of your main database, not from your production database!</p>
<p><strong>3) Minimize &amp; handle external dependencies</strong><br />
Watch for dependencies on external services like ad serving networks or RSS feeds. If a service isn't responding or can't handle your growing request load, make sure that you have a fallback strategy.</p>
<p><strong>4) Tend your database and your job handlers</strong><br />
Any ORM, including Rails' ActiveRecord can generate SQL queries that cause database performance issues. Make sure you're looking at your slow query log after each major integration to make sure you don't have "missing" database indices, and haven't written inappropriate find-all's in your Rails code. Scrub your database periodically for indices that are no longer being used. Similarly, watch the resource consumption of your background and scheduled jobs. As your user base grows jobs can start to overlap, and daily log processing can start to take more than 24 hrs! This kind of thing can sneak up on you easily. Ideally, segregate your jobs in a separate tier. And, as you grow, look at moving to a message based job handler.</p>
<p><strong>5) Shard your unavoidably relational data</strong><br />
At high scaling levels, your MySQL database will have to be sharded. Sharding involves breaking up your datasets into independent pieces based on a key. For many consumer-oriented Rails sites, that can mean sharding based on userid's, but other sharding schemes use data-age, or access-frequency (if that's predictable.)
<p><a href="http://www.engineyard.com/blog"><img height="98" width="61" title="logo-engineyard" alt="" class="attachment-post-thumbnail wp-post-image" src="http://www.engineyard.com/blog/wp-content/uploads/logo-engineyard.png"/></a></p>
]]></description>
		<wfw:commentRss>http://www.engineyard.com/blog/2009/5-tips-to-scale-your-ror-application/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

