<?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>Brain Matters &#187; Engineering</title>
	<atom:link href="http://blog.agoragames.com/category/engineering/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.agoragames.com</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 19:13:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Brightercove</title>
		<link>http://blog.agoragames.com/2010/07/29/brightercove/</link>
		<comments>http://blog.agoragames.com/2010/07/29/brightercove/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 19:13:58 +0000</pubDate>
		<dc:creator>David Czarnecki</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[brightcove]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=676</guid>
		<description><![CDATA[We&#8217;re using Brightcove here at Agora Games for some video platform work. In our group chats, we&#8217;ve talked about, &#8220;It would be nice if we had a Ruby API for interacting with Brightcove.&#8221;
And so I did just that, http://github.com/agoragames/brightcove


sudo gem install brightcove-api

&#62;&#62; require &#039;brightcove-api&#039;
=&#62; true
&#62;&#62; brightcove = Brightcove::API.new(&#039;0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.&#039;)
=&#62; #&#60;brightcove ::API:0x114dbc8 @token=&#34;0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.&#34;, @api_url=&#34;http://api.brightcove.com/services/library&#34;&#62;
&#62;&#62; response = brightcove.get(&#039;find_all_videos&#039;, [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re using <a href="http://www.brightcove.com/en/">Brightcove</a> here at Agora Games for some video platform work. In our group chats, we&#8217;ve talked about, &#8220;It would be nice if we had a Ruby API for interacting with Brightcove.&#8221;</p>
<p>And so I did just that, <a href="http://github.com/agoragames/brightcove">http://github.com/agoragames/brightcove</a></p>
<pre class="brush: ruby">

sudo gem install brightcove-api

&gt;&gt; require &#039;brightcove-api&#039;
=&gt; true
&gt;&gt; brightcove = Brightcove::API.new(&#039;0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.&#039;)
=&gt; #&lt;brightcove ::API:0x114dbc8 @token=&quot;0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.&quot;, @api_url=&quot;http://api.brightcove.com/services/library&quot;&gt;
&gt;&gt; response = brightcove.get(&#039;find_all_videos&#039;, {:page_size =&gt; 3, :video_fields =&gt; &#039;id,name,linkURL,linkText&#039;})
=&gt; {&quot;items&quot;=&gt;[{&quot;name&quot;=&gt;&quot;Documentarian Skydiving&quot;, &quot;id&quot;=&gt;496518762, &quot;linkText&quot;=&gt;nil, &quot;linkURL&quot;=&gt;nil}, {&quot;name&quot;=&gt;&quot;Surface Tricks&quot;, &quot;id&quot;=&gt;496518763, &quot;linkText&quot;=&gt;nil, &quot;linkURL&quot;=&gt;nil}, {&quot;name&quot;=&gt;&quot;Free Skiing&quot;, &quot;id&quot;=&gt;496518765, &quot;linkText&quot;=&gt;nil, &quot;linkURL&quot;=&gt;nil}], &quot;page_number&quot;=&gt;0, &quot;page_size&quot;=&gt;3, &quot;total_count&quot;=&gt;-1}
</pre>
<p></brightcove></p>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F29%2Fbrightercove%2F&amp;title=Brightercove" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F29%2Fbrightercove%2F&amp;title=Brightercove&amp;bodytext=We%27re%20using%20Brightcove%20here%20at%20Agora%20Games%20for%20some%20video%20platform%20work.%20In%20our%20group%20chats%2C%20we%27ve%20talked%20about%2C%20%22It%20would%20be%20nice%20if%20we%20had%20a%20Ruby%20API%20for%20interacting%20with%20Brightcove.%22%0D%0A%0D%0AAnd%20so%20I%20did%20just%20that%2C%20http%3A%2F%2Fgithub.com%2Fagoragames%2Fbrightco" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F29%2Fbrightercove%2F&amp;title=Brightercove&amp;notes=We%27re%20using%20Brightcove%20here%20at%20Agora%20Games%20for%20some%20video%20platform%20work.%20In%20our%20group%20chats%2C%20we%27ve%20talked%20about%2C%20%22It%20would%20be%20nice%20if%20we%20had%20a%20Ruby%20API%20for%20interacting%20with%20Brightcove.%22%0D%0A%0D%0AAnd%20so%20I%20did%20just%20that%2C%20http%3A%2F%2Fgithub.com%2Fagoragames%2Fbrightco" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F29%2Fbrightercove%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/07/29/brightercove/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grabbing the Rabbit by the Horns</title>
		<link>http://blog.agoragames.com/2010/07/28/grabbing-the-rabbit-by-the-horns/</link>
		<comments>http://blog.agoragames.com/2010/07/28/grabbing-the-rabbit-by-the-horns/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 15:17:37 +0000</pubDate>
		<dc:creator>Aaron Westendorf</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Infrastructure]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=644</guid>
		<description><![CDATA[RabbitMQ is a very powerful tool, especially when deployed in a cluster.  Among RabbitMQ&#8217;s more useful features is rabbitmqctl, the command line tool which can be used to query a node and list its exchanges, queues, connections, number of consumers, memory usage and more.
The application, and cluster deployment in general, is hamstrung by Erlang&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>RabbitMQ is a very powerful tool, especially when deployed in a cluster.  Among RabbitMQ&#8217;s more useful features is rabbitmqctl, the command line tool which can be used to query a node and list its exchanges, queues, connections, number of consumers, memory usage and more.</p>
<p>The application, and cluster deployment in general, is hamstrung by Erlang&#8217;s standard approach to cookies.  The cookie, typically .erlang.cookie in the HOME directory of an application, must have only user read permissions.  For a Linux RabbitMQ install, that would look like this:</p>
<pre class="brush: text">
bofh@rabbit_host1:~$ ls -al /var/lib/rabbitmq/
total 333
drwxr-xr-x  3 rabbitmq rabbitmq    160 2010-07-12 17:49 .
drwxr-xr-x 37 root     root       1008 2010-07-02 14:29 ..
-r--------  1 rabbitmq rabbitmq     20 2010-05-04 20:44 .erlang.cookie
drwxr-xr-x  3 rabbitmq rabbitmq     72 2010-05-04 20:49 mnesia
-rw-r--r--  1 rabbitmq rabbitmq     27 2010-07-12 17:49 pids
</pre>
<p>Any variation on these permissions and Erlang will refuse to start.  The permissions requirement is embedded into Erlang itself, making it more or less impossible to work around.  This creates the following problems:</p>
<p></p>
<ul style="list-style-type: disc">
<li>You must copy this file (or its contents) to all hosts in the cluster</li>
<li>All users of rabbitmqctl must run it as sudo</li>
<li>All monitoring tools must also run as root or have sudo capability</li>
<li>You must have the cookie file present on the host running rabbitmqctl</li>
</ul>
<p>Given how powerful rabbitmqctl is, you will likely still want to limit access to it, but this can be readily accomplished with standard Unix permissions.  By expanding who can use it and where, your system administrator will be thrilled to reduce need for sudo access and your customers will be happy with the additional tools you can deploy to monitor your cluster and its clients to ensure that all is well, 24/7.</p>
<p>Thankfully, RabbitMQ&#8217;s scripts accept a lot of environment variables which can be passed into the Erlang runtime, and Erlang kindly provides a way to bypass the cookie file through a command line literal.  The scripts are all located in the scripts directory inside your RabbitMQ installation.</p>
<pre class="brush: text">
bofh@rabbit_host:~$ ls -ald `erl -eval &#039;io:format(&quot;~s~n&quot;, [code:lib_dir()])&#039; -s init stop -noshell`/rabbitmq-server*/scripts
drwxr-xr-x 2 root root 520 2010-07-21 14:47 /usr/local/lib/erlang/lib/rabbitmq-server-1.7.0/scripts
drwxr-xr-x 2 root root 520 2010-07-21 16:15 /usr/local/lib/erlang/lib/rabbitmq-server-1.7.2/scripts
</pre>
<p>The three standard scripts, rabbitmq-server, rabbitmq-multi and rabbitmqctl all source an environment script, rabbitmq-env, which in turn will source the file /etc/rabbitmq/rabbitmq.conf if it exists.  This is the file that you can edit to take control of your RabbitMQ cluster.</p>
<pre class="brush: bash">
SERVER_START_ARGS=&quot;+K true +A300 +P512000 -setcookie NOMNOMNOMYUMYUM -kernel inet_default_listen_options [{nodelay,true},{sndbuf,32768},{recbuf,32768}]&quot;
MULTI_START_ARGS=&quot;-setcookie NOMNOMNOMYUMYUM&quot;
CTL_ERL_ARGS=&quot;-setcookie NOMNOMNOMYUMYUM&quot;
</pre>
<p>The value of each environment variable will be passed verbatim to the Erlang runtime.  The SERVER_START_ARGS are passed to each node started by rabbitmq-multi, and directly affect the performance of a RabbitMQ instance.  In this example, we have increased the number of native threads available to Erlang and allowed it to spin up numerous (Erlang) processes.  We have also instructed the kernel to increase its TCP buffer sizes and disable Nagle's algorithm.</p>
<p>You can now run rabbitmqctl without sudo on any host which has this same configuration deployed.  This solution still requires that you synchronize /etc/rabbitmq across your cluster, though there are many ways of solving that problem.</p>
<p>We have taken this a step further and enabled rabbitmqctl on any host in our network.  All of our core software is deployed from source to /usr/local over NFS.  We have deployed the rabbitmq.conf file there too, and have a small shell script wrapping rabbitmqctl.</p>
<pre class="brush: bash">
#!/bin/bash
ERL_PATH=`erl -eval &#039;io:format(&quot;~s~n&quot;, [code:lib_dir()])&#039; -s init stop -noshell`
LATEST_VERSION=`ls $ERL_PATH | grep rabbitmq | sort | tail -1`
RABBIT_PATH=&quot;$ERL_PATH/$LATEST_VERSION&quot;

set -f
[ -f /usr/local/etc/rabbitmq/rabbitmq.conf ] &amp;&amp; . /usr/local/etc/rabbitmq/rabbitmq.conf
export CTL_ERL_ARGS
HOME=/var/lib/rabbitmq $RABBIT_PATH/scripts/rabbitmqctl $@
</pre>
<p>We can now connect to and monitor any RabbitMQ node from any host on our network</p>
<pre class="brush: text">
bofh@gateway:~$ rabbitmqctl -n rabbit@rabbit_host1 status
Status of node rabbit@rabbit_host1 ...
[{running_applications,[{rabbit,&quot;RabbitMQ&quot;,&quot;1.7.2&quot;},
                                {mnesia,&quot;MNESIA  CXC 138 12&quot;,&quot;4.4.10&quot;},
                                {os_mon,&quot;CPO  CXC 138 46&quot;,&quot;2.2.2&quot;},
                                {sasl,&quot;SASL  CXC 138 11&quot;,&quot;2.1.6&quot;},
                                {stdlib,&quot;ERTS  CXC 138 10&quot;,&quot;1.16.2&quot;},
                                {kernel,&quot;ERTS  CXC 138 10&quot;,&quot;2.13.2&quot;}]},
 {nodes,[rabbit@rabbit_host1,rabbit@rabbit_host2]},
 {running_nodes,[rabbit@rabbit_host1,rabbit@rabbit_host2]}]
...done.
</pre>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F28%2Fgrabbing-the-rabbit-by-the-horns%2F&amp;title=Grabbing%20the%20Rabbit%20by%20the%20Horns" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F28%2Fgrabbing-the-rabbit-by-the-horns%2F&amp;title=Grabbing%20the%20Rabbit%20by%20the%20Horns&amp;bodytext=RabbitMQ%20is%20a%20very%20powerful%20tool%2C%20especially%20when%20deployed%20in%20a%20cluster.%20%20Among%20RabbitMQ%27s%20more%20useful%20features%20is%20rabbitmqctl%2C%20the%20command%20line%20tool%20which%20can%20be%20used%20to%20query%20a%20node%20and%20list%20its%20exchanges%2C%20queues%2C%20connections%2C%20number%20of%20consumers%2C%20" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F28%2Fgrabbing-the-rabbit-by-the-horns%2F&amp;title=Grabbing%20the%20Rabbit%20by%20the%20Horns&amp;notes=RabbitMQ%20is%20a%20very%20powerful%20tool%2C%20especially%20when%20deployed%20in%20a%20cluster.%20%20Among%20RabbitMQ%27s%20more%20useful%20features%20is%20rabbitmqctl%2C%20the%20command%20line%20tool%20which%20can%20be%20used%20to%20query%20a%20node%20and%20list%20its%20exchanges%2C%20queues%2C%20connections%2C%20number%20of%20consumers%2C%20" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F28%2Fgrabbing-the-rabbit-by-the-horns%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/07/28/grabbing-the-rabbit-by-the-horns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 3.0.0.rc changes</title>
		<link>http://blog.agoragames.com/2010/07/27/rails-3-0-0-rc-changes/</link>
		<comments>http://blog.agoragames.com/2010/07/27/rails-3-0-0-rc-changes/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 16:46:44 +0000</pubDate>
		<dc:creator>David Czarnecki</dc:creator>
				<category><![CDATA[Bending Rails]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails 3]]></category>
		<category><![CDATA[rails3.0.0.rc]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=638</guid>
		<description><![CDATA[Rails 3.0.0 now has a release candidate. These are the changes I made to a new application I am working on to clear up any deprecation warnings.

Gemfile
gem &#8216;rails&#8217;, &#8216;3.0.0.rc&#8217;
gem &#8216;haml&#8217;, &#8216;3.0.14&#8242;
Obviously you have to tell your application to use the 3.0.0.rc. Also, it seems as if haml 3.0.13, which we were previously using, had some [...]]]></description>
			<content:encoded><![CDATA[<p>Rails 3.0.0 now has a <a href="http://weblog.rubyonrails.org/2010/7/26/rails-3-0-release-candidate">release candidate</a>. These are the changes I made to a new application I am working on to clear up any deprecation warnings.</p>
<p><span id="more-638"></span></p>
<p><strong>Gemfile</strong></p>
<p>gem &#8216;rails&#8217;, &#8216;3.0.0.rc&#8217;<br />
gem &#8216;haml&#8217;, &#8216;3.0.14&#8242;</p>
<p>Obviously you have to tell your application to use the 3.0.0.rc. Also, it seems as if haml 3.0.13, which we were previously using, had some incompatible changes with Rails 3.0.0.rc</p>
<p><strong>Rakefile</strong></p>
<p>Change:</p>
<p>Rails::Application.load_tasks</p>
<p>to:</p>
<p>YourApplicationName::Application.load_tasks</p>
<p><strong>config/environments/test.rb</strong></p>
<p>Add:</p>
<p>config.active_support.deprecation = :stderr</p>
<p><strong>config/routes.rb</strong></p>
<p>Change:</p>
<p>YourApplicationName::Application.routes.draw do |map|</p>
<p>to:</p>
<p>YourApplicationName::Application.routes.draw do</p>
<p>Rails 3 routing in great detail: <a href="http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/">The Lowdown on Routes in Rails 3</a>.</p>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F27%2Frails-3-0-0-rc-changes%2F&amp;title=Rails%203.0.0.rc%20changes" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F27%2Frails-3-0-0-rc-changes%2F&amp;title=Rails%203.0.0.rc%20changes&amp;bodytext=Rails%203.0.0%20now%20has%20a%20release%20candidate.%20These%20are%20the%20changes%20I%20made%20to%20a%20new%20application%20I%20am%20working%20on%20to%20clear%20up%20any%20deprecation%20warnings.%0D%0A%0D%0A%0D%0A%0D%0AGemfile%0D%0A%0D%0Agem%20%27rails%27%2C%20%273.0.0.rc%27%0D%0Agem%20%27haml%27%2C%20%273.0.14%27%0D%0A%0D%0AObviously%20you%20have%20to%20tell%20your%20applic" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F27%2Frails-3-0-0-rc-changes%2F&amp;title=Rails%203.0.0.rc%20changes&amp;notes=Rails%203.0.0%20now%20has%20a%20release%20candidate.%20These%20are%20the%20changes%20I%20made%20to%20a%20new%20application%20I%20am%20working%20on%20to%20clear%20up%20any%20deprecation%20warnings.%0D%0A%0D%0A%0D%0A%0D%0AGemfile%0D%0A%0D%0Agem%20%27rails%27%2C%20%273.0.0.rc%27%0D%0Agem%20%27haml%27%2C%20%273.0.14%27%0D%0A%0D%0AObviously%20you%20have%20to%20tell%20your%20applic" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F07%2F27%2Frails-3-0-0-rc-changes%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/07/27/rails-3-0-0-rc-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lifting the Tail: Inside Agora Skunk Works</title>
		<link>http://blog.agoragames.com/2010/06/28/lifting-the-tail-inside-agora-skunk-works/</link>
		<comments>http://blog.agoragames.com/2010/06/28/lifting-the-tail-inside-agora-skunk-works/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 13:08:25 +0000</pubDate>
		<dc:creator>Aaron Westendorf</dc:creator>
				<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Infrastructure]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=623</guid>
		<description><![CDATA[We&#8217;ve been hard at work for over a year developing the next generation of game integration technology here at Agora, and over the next few months we&#8217;ll be releasing some of the code that we&#8217;ve developed, discussing some of the challenges we face and how we&#8217;re using all the new technology to build the best [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste">We&#8217;ve been hard at work for over a year developing the next generation of game integration technology here at Agora, and over the next few months we&#8217;ll be releasing some of the code that we&#8217;ve developed, discussing some of the challenges we face and how we&#8217;re using all the new technology to build the best gaming experience around.</div>
<p></p>
<div id="_mcePaste">To start, a brief explanation of the challenges we face.  As you might imagine, we deal with a lot of data.  The volume is only increasing, and with our friends at MLG, we expect significantly more of it.  Along with the volume of data, it also comes to us in many different forms and protocols; sometimes it&#8217;s pushed to us, and sometimes we have to go fetch it.  We have to respond to any number of business decisions made by developers and publishers, adapt to developers&#8217; needs in a manner which does not negatively impact their schedule, and be a consistent and reliable partner to all our clients.  We have to deliver comprehensive documentation to both game and website developers, and our business relationships are aided by a consistent offering.</div>
<p></p>
<div id="_mcePaste">In the past, each game&#8217;s services would be its own Rails application.  We built a suite of re-usable components, but for each title we would have to re-write a lot of boiler-plate code and set up an entirely new suite of servers, complete with application hosts, web and caching proxies, databases and so on.  As our data throughput grew, we found that we needed to add additional components to our stack, such as Sparrow, to turn synchronous workloads into asynchronous ones.  Each project required extensive monitoring and reporting, an interactive console for viewing production data and testing staging code.</div>
<p></p>
<div id="_mcePaste">We were very successful, but found the business costs too high and that we were missing several features that were important to our long term strategy of being the best in the industry at game integration.  Our experience with a virtualized hosting environment opened our eyes to the possibilities of turning our data processing and web services loose on a commoditized, shared platform.</div>
<p></p>
<div id="_mcePaste">With a general set of requirements in hand, we set forth, and what we came away with has been incubating, gestating and flowering into a powerful toolset that has met all our expectations, and then some.</div>
<p></p>
<div id="_mcePaste">Our first task was to choose the core set of technologies and the basic processing scheme that we would be using.  After an exhaustive search, lots of hacking and whiteboard scribblings, we settled on the following key features:</div>
<p></p>
<div id="_mcePaste">
<ul style="list-style-type:circle;">
<li>Python for all application code</li>
<li><a href="http://www.amqp.org">AMQP</a>, via <a href="http://www.rabbitmq.com">RabbitMQ</a>, for all inter-process communication</li>
<li>MySQL, Tokyo Tyrant and memcache for data storage services</li>
<li>Protocol translators to bridge external traffic to AMQP via a simple binary protocol</li>
<li>libevent for as many as IO operation as possible</li>
</ul>
</div>
<p></p>
<div id="_mcePaste"><img class="alignnone" title="lifting the tail" src="http://blog.agoragames.com/wp-content/uploads/2010/06/lifting_the_tail.png " alt="" width="357" height="193" /></div>
<p></p>
<div>We chose Python from the suitable dyanmic languages primarily for its memory management and speed.  We were shifting to a single-threaded multi-process environment where memory costs are high and performance paramount, and Python has an extensive pedigree in this area.  We did choose to sacrifice some memory by adhering to a single-threaded model in order to keep the application stack simple and use the kernel for all context switching.</div>
<p></p>
<div id="_mcePaste">AMQP&#8217;s routing scheme gives us powerful tools to shard and aggregate traffic across our cluster.  We chose RabbitMQ because of its Erlang heritage, its performance, reliability, clustering capabilities and commercial support.  By splitting up each game&#8217;s services into discrete packages which can each run numerous instances, we can readily divide traffic across a cluster of RabbitMQ hosts and attach listeners for monitoring, diagnostics and metrics.  The dotted-notation of AMQP&#8217;s topic exchanges allow for routing traffic between titles, environments, services and even specific commands.</div>
<p></p>
<div>To get the most out of the kernel and reduce latency, we use <a href="http://monkey.org/~provos/libevent/">libevent</a> for all of our AMQP traffic and in our protocol translators.  We extensively patched the <a href="http://barryp.org/software/py-amqplib/">py-amqplib</a> to work within this asynchronous environment.  This fork has been in production use for some time now but is slated for a ground-up re-write and release into the wild.</div>
<p></p>
<div id="_mcePaste">We considered many other database solutions, but at the time that we had to make our decision, felt that Tokyo Tyrant was the best NoSQL database to introduce into our stack because of its sparse table capabilities, high performance, low resource usage and simple setup.  We&#8217;re very excited with all the new development that is taking place in this field, and will be writing more about our experience with these tools over the coming years.</div>
<p></p>
<div id="_mcePaste">What we ended up with has met all of the goals that we set out to achieve.  We have successfully abstracted scaling, monitoring, protocol presentation and metric aggregation, allowing us to focus entirely on delivering functionality to our customers.  Now that our customers include MLG, this means that we&#8217;ll be rolling out some of the biggest and baddest applications in the gaming community, with confidence and reliability.</div>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F28%2Flifting-the-tail-inside-agora-skunk-works%2F&amp;title=Lifting%20the%20Tail%3A%20Inside%20Agora%20Skunk%20Works" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F28%2Flifting-the-tail-inside-agora-skunk-works%2F&amp;title=Lifting%20the%20Tail%3A%20Inside%20Agora%20Skunk%20Works&amp;bodytext=We%27ve%20been%20hard%20at%20work%20for%20over%20a%20year%20developing%20the%20next%20generation%20of%20game%20integration%20technology%20here%20at%20Agora%2C%20and%20over%20the%20next%20few%20months%20we%27ll%20be%20releasing%20some%20of%20the%20code%20that%20we%27ve%20developed%2C%20discussing%20some%20of%20the%20challenges%20we%20face%20and%20" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F28%2Flifting-the-tail-inside-agora-skunk-works%2F&amp;title=Lifting%20the%20Tail%3A%20Inside%20Agora%20Skunk%20Works&amp;notes=We%27ve%20been%20hard%20at%20work%20for%20over%20a%20year%20developing%20the%20next%20generation%20of%20game%20integration%20technology%20here%20at%20Agora%2C%20and%20over%20the%20next%20few%20months%20we%27ll%20be%20releasing%20some%20of%20the%20code%20that%20we%27ve%20developed%2C%20discussing%20some%20of%20the%20challenges%20we%20face%20and%20" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F28%2Flifting-the-tail-inside-agora-skunk-works%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/06/28/lifting-the-tail-inside-agora-skunk-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting Up a Rails 3 Development Environment</title>
		<link>http://blog.agoragames.com/2010/06/24/setting-up-a-rails-3-development-environment/</link>
		<comments>http://blog.agoragames.com/2010/06/24/setting-up-a-rails-3-development-environment/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 16:24:04 +0000</pubDate>
		<dc:creator>tquackenbush</dc:creator>
				<category><![CDATA[Bending Rails]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails3]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rvm]]></category>
		<category><![CDATA[setup]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=585</guid>
		<description><![CDATA[Getting started with Rails 3 development is a very straightforward process, granted you have the prerequisite version of Ruby installed on your system. Ruby Version Manager (RVM) is a utility that makes it very easy and painless to switch between Ruby versions while maintaining your system&#8217;s stock Ruby installation. RVM not only enables you to [...]]]></description>
			<content:encoded><![CDATA[<p><!-- code {   font-family: Courier New, Courier, mono; } pre {   font-family: Courier New, Courier, mono; } ul {   margin-bottom: 0; } ul li {    list-style: circle; } -->Getting started with Rails 3 development is a very straightforward process, granted you have the prerequisite version of Ruby installed on your system. <a href="http://rvm.beginrescueend.com">Ruby Version Manager</a> (RVM) is a utility that makes it very easy and painless to switch between Ruby versions while maintaining your system&#8217;s stock Ruby installation. RVM not only enables you to switch between Ruby versions, but also maintains distinct gem sets specific to each of those versions which is very helpful when testing out new Rails environments.</p>
<p>Before we jump into setup, first a bit about our pre-Rails3 environment:</p>
<ul>
<li>Mac OS X 10.5.8</li>
<li>ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0] (stock)</li>
<li>RubyGems 1.3.7</li>
<li>Various older versions of Rails (2.3.8, 2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.1.1, 2.1.0, 2.0.2, 1.2.6, 1.2.3)</li>
</ul>
<p>We will be installing the latest release of Rails which, as of this writing, is Rails 3 beta4.<br />
We will also complete setup using the latest version of Ruby 1.9.<br />
The minimal version of Ruby 1.9 required for this Rails release is 1.9.2.<br />
To complete setup with Ruby 1.8.7, consult the <a href="http://guides.rails.info/3_0_release_notes.html#rails-3-requires-at-least-ruby-187">Rails 3 release notes</a> for the minimal version requirements.</p>
<p>The basic installation steps are as follows:</p>
<ol>
<li>Install RVM (Ruby Version Manger)</li>
<li>Install Ruby 1.9.2</li>
<li>Install Rails3 beta4</li>
<li>Profit!</li>
</ol>
<p>To install, issue the following commands in a terminal window:</p>
<ol>
<li id="sidebar"><code>bash &lt; &lt;( curl http://rvm.beginrescueend.com/releases/rvm-install-head )</code>
<ul>
<li>This is the preferred RVM installation method as described in the <a href="http://rvm.beginrescueend.com/rvm/install/">RVM installation instructions</a>.</li>
</ul>
</li>
<li><code>rvm install 1.9.2-head</code></li>
<li><code>rvm 1.9.2-head</code></li>
<li><code>gem install rails --pre</code></li>
</ol>
<p>Installation of the rails gem should also install it&#8217;s respective dependencies:</p>
<pre>    [05:16:50][tquackenbush@TQuackenbush ~]$ gem list

    *** LOCAL GEMS ***
never
    abstract (1.0.0)
    actionmailer (3.0.0.beta4)
    actionpack (3.0.0.beta4)
    activemodel (3.0.0.beta4)
    activerecord (3.0.0.beta4)
    activeresource (3.0.0.beta4)
    activesupport (3.0.0.beta4)
    arel (0.4.0)
    builder (2.1.2)
    bundler (0.9.26)
    erubis (2.6.5)
    i18n (0.4.1)
    mail (2.2.5)
    mime-types (1.16)
    polyglot (0.3.1)
    rack (1.1.0)
    rack-mount (0.6.4)
    rack-test (0.5.4)
    rails (3.0.0.beta4)
    railties (3.0.0.beta4)
    rake (0.8.7)
    rdoc (2.5.8)
    thor (0.13.6)
    treetop (1.4.8)
    tzinfo (0.3.22)</pre>
<p>To test out your new installation, try creating a new bare bones Rails 3 application like so:</p>
<ol>
<li><code>rails new test_app</code></li>
<li><code>cd test_app</code></li>
<li><code>bundle install</code>
<ul>
<li>Bundler is the new default dependency manager in Rails 3, and will install any missing gems required by the project.</li>
<li>In my case, this was &#8217;sqlite3-ruby (1.3.0)&#8217;</li>
</ul>
</li>
<li><code>rails server</code></li>
</ol>
<p>As in Rails 2, this should launch a WEBrick server instance listening on localhost port 3000 with output similar to:</p>
<pre>    =&gt; Booting WEBrick
    =&gt; Rails 3.0.0.beta4 application starting in development on http://0.0.0.0:3000
    =&gt; Call with -d to detach
    =&gt; Ctrl-C to shutdown server
    [2010-06-23 16:54:06] INFO  WEBrick 1.3.1
    [2010-06-23 16:54:06] INFO  ruby 1.9.2 (2010-06-22) [i386-darwin9.8.0]
    [2010-06-23 16:54:06] INFO  WEBrick::HTTPServer#start: pid=6529 port=3000</pre>
<p>And that&#8217;s it! You&#8217;re all ready to go with Rails 3!</p>
<p><strong>Update: June 25th, 2010</strong> (David Czarnecki)</p>
<p>I ran into an issue on one system where rvm and Ruby 1.9.2 were correctly installed on the system, but Rails 3 would not install. The installation would go as follows.</p>
<blockquote>
<pre>machine-name:~ dczarnecki$ gem install rails --pre
WARNING:  RubyGems 1.2+ index not found for:

RubyGems will revert to legacy indexes degrading performance.</pre>
</blockquote>
<p>I blew away the ~/.gemrc file and Rails 3 installed successfully. YMMV.</p>
<p><strong>Update: June 29th, 2010</strong> (Joshua Childs)<br />
Ran into two issues with with dependencies while getting setup on my Ubuntu workstation.</p>
<p>First was while problem I ran into was while following the installation steps.</p>
<pre class="brush: bash">
# Command:
josh@jagar-tharn:~$ rvm install 1.9.2-head

# Response:
fail: bison is not available in your path. Please ensure it exists before compiling from head.

# Solution:
sudo apt-get install bison
</pre>
<p>And the second problem I ran into was while using bundle to setup my dependencies. My workstation did not have sqlite3 installed.</p>
<pre class="brush: bash">
# Command:
josh@jagar-tharn:~/projects/test_app$ bundle install

# Response:
...
Using rails (3.0.0.beta4) from bundler gems
Installing sqlite3-ruby (1.3.0) from rubygems repository at http://rubygems.org/ with native extensions /home/josh/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems/ext/builder.rb:46: warning: Insecure world writable dir /usr/local/libevent/ in PATH, mode 040777
/home/josh/.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions&#039;: ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

/home/josh/.rvm/rubies/ruby-1.9.2-head/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try &#039;port install sqlite3 +universal&#039; or &#039;yum install sqlite3-devel&#039;
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
	--with-opt-dir
	--without-opt-dir
	--with-opt-include
	--without-opt-include=${opt-dir}/include
	--with-opt-lib
	--without-opt-lib=${opt-dir}/lib
	--with-make-prog
	--without-make-prog
	--srcdir=.
	--curdir
	--ruby=/home/josh/.rvm/rubies/ruby-1.9.2-head/bin/ruby
	--with-sqlite3-dir
	--without-sqlite3-dir
	--with-sqlite3-include
	--without-sqlite3-include=${sqlite3-dir}/include
	--with-sqlite3-lib
	--without-sqlite3-lib=${sqlite3-dir}/lib
...

# Solution:
josh@jagar-tharn:~/projects/test_app$ sudo apt-get install sqlite3
josh@jagar-tharn:~/projects/test_app$ sudo apt-get install libsqlite3-dev
</pre>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F24%2Fsetting-up-a-rails-3-development-environment%2F&amp;title=Setting%20Up%20a%20Rails%203%20Development%20Environment" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F24%2Fsetting-up-a-rails-3-development-environment%2F&amp;title=Setting%20Up%20a%20Rails%203%20Development%20Environment&amp;bodytext=Getting%20started%20with%20Rails%203%20development%20is%20a%20very%20straightforward%20process%2C%20granted%20you%20have%20the%20prerequisite%20version%20of%20Ruby%20installed%20on%20your%20system.%20Ruby%20Version%20Manager%20%28RVM%29%20is%20a%20utility%20that%20makes%20it%20very%20easy%20and%20painless%20to%20switch%20between%20Rub" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F24%2Fsetting-up-a-rails-3-development-environment%2F&amp;title=Setting%20Up%20a%20Rails%203%20Development%20Environment&amp;notes=Getting%20started%20with%20Rails%203%20development%20is%20a%20very%20straightforward%20process%2C%20granted%20you%20have%20the%20prerequisite%20version%20of%20Ruby%20installed%20on%20your%20system.%20Ruby%20Version%20Manager%20%28RVM%29%20is%20a%20utility%20that%20makes%20it%20very%20easy%20and%20painless%20to%20switch%20between%20Rub" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F06%2F24%2Fsetting-up-a-rails-3-development-environment%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/06/24/setting-up-a-rails-3-development-environment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Rails dev environment</title>
		<link>http://blog.agoragames.com/2010/05/25/my-testing-environmen/</link>
		<comments>http://blog.agoragames.com/2010/05/25/my-testing-environmen/#comments</comments>
		<pubDate>Wed, 26 May 2010 01:21:08 +0000</pubDate>
		<dc:creator>Brian Corrigan</dc:creator>
				<category><![CDATA[Engineering]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=554</guid>
		<description><![CDATA[I love reading about the way people set up their development environments.  I recently started working on a new project at work and had to set everything up from scratch.  Here's my setup.]]></description>
			<content:encoded><![CDATA[<p>I love reading about the way people set up their development environments.  I recently started working on a new project at work and had to set everything up from scratch.  Here&#8217;s my setup.</p>
<p>First, install some gems.</p>
<pre class="brush: bash">
#On all systems
sudo gem install ZenTest
sudo gem install redgreen
sudo gem install autotest-rails
sudo gem install shoulda
sudo gem install factory_girl

# Only on my OSX machine
sudo gem install autotest-growl
sudo gem install autotest-fsevent

# Only on my Ubuntu machine
sudo gem install test_notifier
sudo apt-get install libnotify-bin
</pre>
<p>Next, I setup my ~/.autotest file:</p>
<pre class="brush: ruby">
#!/bin/ruby
require &#039;redgreen/autotest&#039;
require &#039;autotest/timestamp&#039;
require &quot;autotest/restart&quot;

#Only Ubuntu
require &quot;test_notifier/autotest&quot;

#Only OSX
require &quot;autotest/growl&quot;
require &#039;autotest/fsevent&#039;

# All machines
Autotest.add_hook :initialize do |autotest|
  %w{.git .svn .hg .DS_Store ._* vendor tmp log doc}.each do |exception|
    autotest.add_exception(exception)
  end
end
</pre>
<p>Also, I really like git instaweb.  I sent it to G, our brilliant (ex)intern and he likes it too. To start it I use:</p>
<pre class="brush: bash">
git instaweb -d webrick --start
</pre>
<p>You can automate this by adding the following to your ~/.gitconfig:</p>
<pre class="brush: bash">
[instaweb]
httpd=webrick
</pre>
<p>You can also add a port option (port=8000) if you want.</p>
<p>Also, to stop instaweb, from the git repo that you started instaweb from run:</p>
<pre class="brush: bash">
git instaweb stop
</pre>
<p>Finally, I tend to branch a lot and store them server-side.  I like tracking branches to automatically push/pull changes to a branch from a remote repository.  All this really does is add a few lines to your .gitconfig, but hey, who doesn&#8217;t like a shortcut.</p>
<pre class="brush: bash">
  git branch --track branch remote
</pre>
<p>Last but not least, the Cheat gem is awesome.  It&#8217;s like man, but distilled to the things you&#8217;ll actually use.  (It&#8217;s actually where I read about instaweb)  Use it!</p>
<pre class="brush: bash">
sudo gem install cheat
</pre>
<p>So in general, that&#8217;s the interesting bits of my environment.  How about yours?</p>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F25%2Fmy-testing-environmen%2F&amp;title=My%20Rails%20dev%20environment" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F25%2Fmy-testing-environmen%2F&amp;title=My%20Rails%20dev%20environment&amp;bodytext=I%20love%20reading%20about%20the%20way%20people%20set%20up%20their%20development%20environments.%20%20I%20recently%20started%20working%20on%20a%20new%20project%20at%20work%20and%20had%20to%20set%20everything%20up%20from%20scratch.%20%20Here%27s%20my%20setup." title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F25%2Fmy-testing-environmen%2F&amp;title=My%20Rails%20dev%20environment&amp;notes=I%20love%20reading%20about%20the%20way%20people%20set%20up%20their%20development%20environments.%20%20I%20recently%20started%20working%20on%20a%20new%20project%20at%20work%20and%20had%20to%20set%20everything%20up%20from%20scratch.%20%20Here%27s%20my%20setup." title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F25%2Fmy-testing-environmen%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/05/25/my-testing-environmen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Browsers and Status: 204</title>
		<link>http://blog.agoragames.com/2010/05/17/browsers-and-status-204/</link>
		<comments>http://blog.agoragames.com/2010/05/17/browsers-and-status-204/#comments</comments>
		<pubDate>Tue, 18 May 2010 01:00:26 +0000</pubDate>
		<dc:creator>Brian Corrigan</dc:creator>
				<category><![CDATA[Engineering]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=569</guid>
		<description><![CDATA[Trivia: The HTTP RFC asks browsers to NOT update the browser page when 204 status codes are received.
Holy crap is this visually confusing; even Firebug returns nothing!  That said, it&#8217;s a perfect example of why performing only in-browser testing fails miserably.  Functional tests.. use em!




	
	
	
	


]]></description>
			<content:encoded><![CDATA[<p><em>Trivia: The HTTP RFC asks browsers to NOT update the browser page when 204 status codes are received.</em></p>
<p>Holy crap is this visually confusing; even Firebug returns nothing!  That said, it&#8217;s a perfect example of why performing only in-browser testing fails miserably.  Functional tests.. use em!</p>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F17%2Fbrowsers-and-status-204%2F&amp;title=Browsers%20and%20Status%3A%20204" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F17%2Fbrowsers-and-status-204%2F&amp;title=Browsers%20and%20Status%3A%20204&amp;bodytext=Trivia%3A%20The%20HTTP%20RFC%20asks%20browsers%20to%20NOT%20update%20the%20browser%20page%20when%20204%20status%20codes%20are%20received.%0D%0A%0D%0AHoly%20crap%20is%20this%20visually%20confusing%3B%20even%20Firebug%20returns%20nothing%21%20%20That%20said%2C%20it%27s%20a%20perfect%20example%20of%20why%20performing%20only%20in-browser%20testing%20" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F17%2Fbrowsers-and-status-204%2F&amp;title=Browsers%20and%20Status%3A%20204&amp;notes=Trivia%3A%20The%20HTTP%20RFC%20asks%20browsers%20to%20NOT%20update%20the%20browser%20page%20when%20204%20status%20codes%20are%20received.%0D%0A%0D%0AHoly%20crap%20is%20this%20visually%20confusing%3B%20even%20Firebug%20returns%20nothing%21%20%20That%20said%2C%20it%27s%20a%20perfect%20example%20of%20why%20performing%20only%20in-browser%20testing%20" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F17%2Fbrowsers-and-status-204%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/05/17/browsers-and-status-204/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Reversible Encryption</title>
		<link>http://blog.agoragames.com/2010/05/13/rubyreversibleencryption/</link>
		<comments>http://blog.agoragames.com/2010/05/13/rubyreversibleencryption/#comments</comments>
		<pubDate>Fri, 14 May 2010 00:31:56 +0000</pubDate>
		<dc:creator>Brian Corrigan</dc:creator>
				<category><![CDATA[Bending Rails]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=557</guid>
		<description><![CDATA[It&#8217;s been awhile since I had to do anything with reversible encryption.  Here&#8217;s a working sample using AES.


#/usr/bin/ruby
require &#039;openssl&#039;
require &#34;base64&#34;
require &#039;uri&#039;

# First lets encrypt the string!
plaintext = &#039;Super secret message&#039;

# Create the cipher
cipher = OpenSSL::Cipher::Cipher.new(&#34;aes-256-cbc&#34;)
cipher.encrypt # Tell OpenSSL to operate in encrypt mode
puts &#34;Cipher wants a key that is #{cipher.key_len}&#34;
key = &#039;01234567890123456789012345678901&#039;
cipher.key = key

puts [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been awhile since I had to do anything with reversible encryption.  Here&#8217;s a working sample using AES.</p>
<p><!-- mofe --></p>
<pre class="brush: ruby">
#/usr/bin/ruby
require &#039;openssl&#039;
require &quot;base64&quot;
require &#039;uri&#039;

# First lets encrypt the string!
plaintext = &#039;Super secret message&#039;

# Create the cipher
cipher = OpenSSL::Cipher::Cipher.new(&quot;aes-256-cbc&quot;)
cipher.encrypt # Tell OpenSSL to operate in encrypt mode
puts &quot;Cipher wants a key that is #{cipher.key_len}&quot;
key = &#039;01234567890123456789012345678901&#039;
cipher.key = key

puts &quot;Cipher wants an initialization vector that is #{cipher.iv_len}&quot;
cipher.iv = iv = cipher.random_iv # Create and set a random initialization vector

# Encrypted
encrypted = cipher.update(plaintext) + cipher.final
encrypted = iv + encrypted # Send along the IV

# Lets pretty up the encrypted string
encrypted = Base64.encode64(encrypted)
#encrypted = URI.escape(encrypted, Regexp.new(&quot;[^#{URI::PATTERN::UNRESERVED}]&quot;))
encrypted = URI.escape(encrypted)

# Now lets unencrypt it, first start with a new cipher
cipher = OpenSSL::Cipher::Cipher.new(&quot;aes-256-cbc&quot;)
cipher.decrypt # Use SSL in decrypt mode
cipher.key = key
encrypted = URI.unescape(encrypted)
encrypted = Base64.decode64(encrypted)
cipher.iv = encrypted.slice!(0,16) # Remove the IV from the encrypted data
decrypted = cipher.update(encrypted) + cipher.final 

# Test
puts &#039;The original was &#039;+ plaintext
puts &#039;Encrypted that was &#039; + encrypted
puts &#039;Decrypted we have &#039; + decrypted
</pre>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F13%2Frubyreversibleencryption%2F&amp;title=Ruby%20Reversible%20Encryption" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F13%2Frubyreversibleencryption%2F&amp;title=Ruby%20Reversible%20Encryption&amp;bodytext=It%27s%20been%20awhile%20since%20I%20had%20to%20do%20anything%20with%20reversible%20encryption.%20%20Here%27s%20a%20working%20sample%20using%20AES.%0D%0A%0D%0A%0D%0A%0D%0A%5Bsource%20language%3D%27ruby%27%5D%0D%0A%23%2Fusr%2Fbin%2Fruby%0D%0Arequire%20%27openssl%27%0D%0Arequire%20%22base64%22%0D%0Arequire%20%27uri%27%0D%0A%0D%0A%23%20First%20lets%20encrypt%20the%20string%21%0D%0Aplain" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F13%2Frubyreversibleencryption%2F&amp;title=Ruby%20Reversible%20Encryption&amp;notes=It%27s%20been%20awhile%20since%20I%20had%20to%20do%20anything%20with%20reversible%20encryption.%20%20Here%27s%20a%20working%20sample%20using%20AES.%0D%0A%0D%0A%0D%0A%0D%0A%5Bsource%20language%3D%27ruby%27%5D%0D%0A%23%2Fusr%2Fbin%2Fruby%0D%0Arequire%20%27openssl%27%0D%0Arequire%20%22base64%22%0D%0Arequire%20%27uri%27%0D%0A%0D%0A%23%20First%20lets%20encrypt%20the%20string%21%0D%0Aplain" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F05%2F13%2Frubyreversibleencryption%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/05/13/rubyreversibleencryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Packaging For Pleasure</title>
		<link>http://blog.agoragames.com/2010/04/19/packaging-for-pleasure/</link>
		<comments>http://blog.agoragames.com/2010/04/19/packaging-for-pleasure/#comments</comments>
		<pubDate>Mon, 19 Apr 2010 20:15:11 +0000</pubDate>
		<dc:creator>David Czarnecki</dc:creator>
				<category><![CDATA[Bending Rails]]></category>
		<category><![CDATA[Engineering]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[packaging]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=540</guid>
		<description><![CDATA[Let me be more explicit and say I&#8217;m going to be talking about Rails application packaging. Sorry, I needed a good post title for the lulz and the page views.

There are a few rake tasks that I&#8217;ve been using more and more now that all of our applications are running in a shared, virtual enviroment. [...]]]></description>
			<content:encoded><![CDATA[<p>Let me be more explicit and say I&#8217;m going to be talking about Rails application packaging. Sorry, I needed a good post title for the lulz and the page views.</p>
<p><span id="more-540"></span></p>
<p>There are a few rake tasks that I&#8217;ve been using more and more now that all of our applications are running in a shared, virtual enviroment. They are:</p>
<p>* rake -T     # -T, &#8211;tasks [PATTERN]            Display the tasks (matching optional PATTERN) with descriptions, then exit.</p>
<p>Everyone should know and use this task at least once in their Rails-development life.</p>
<p>* rake rails:freeze:gems   # Lock this application to the current gems (by unpacking them into vendor/rails)<br />
* rake gems:unpack   # Unpacks all required gems into vendor/gems.<br />
* rake gems:unpack:dependencies   # Unpacks all required gems and their dependencies into vendor/gems.</p>
<p>So, once I&#8217;ve created my project with &#8220;rails [project name]&#8220;, then next thing I do is &#8220;rake rails:freeze:gems&#8221; to freeze the Rails gems. I&#8217;ll enumerate the application&#8217;s dependencies in the environment.rb file and then run &#8220;rake gems:unpack&#8221; to make sure those dependencies exist with the application. Example:</p>
<pre class="brush: ruby">

config.gem &#039;will_paginate&#039;, :version =&gt; &#039;2.3.11&#039;, :source =&gt; &#039;http://gemcutter.org&#039;
config.gem &#039;factory_girl&#039;, :version =&gt; &#039;1.2.4&#039;, :source =&gt; &#039;http://gemcutter.org&#039;
config.gem &#039;fakeweb&#039;, :version =&gt; &#039;1.2.8&#039;, :source =&gt; &#039;http://gemcutter.org&#039;
</pre>
<p>Why do I like this approach? In a shared environment, it means we don&#8217;t have to have our systems folks install any dependencies for our application to run making the application self-contained. This is mostly fine for gems that don&#8217;t have an explicit native component. Also, in being explicit about versions of the gems that an application is using, we do not run the risk of chasing a moving target. Again, in a shared environment, if someone updates a gem on the system, it&#8217;s probably not an issue until the one time it is and you&#8217;re being called at 3 AM that the application is down because of a gem incompatibility change.</p>
<p>That&#8217;s it. Any other packaging dos and don&#8217;t?</p>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F19%2Fpackaging-for-pleasure%2F&amp;title=Packaging%20For%20Pleasure" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F19%2Fpackaging-for-pleasure%2F&amp;title=Packaging%20For%20Pleasure&amp;bodytext=Let%20me%20be%20more%20explicit%20and%20say%20I%27m%20going%20to%20be%20talking%20about%20Rails%20application%20packaging.%20Sorry%2C%20I%20needed%20a%20good%20post%20title%20for%20the%20lulz%20and%20the%20page%20views.%0D%0A%0D%0A%0D%0A%0D%0AThere%20are%20a%20few%20rake%20tasks%20that%20I%27ve%20been%20using%20more%20and%20more%20now%20that%20all%20of%20our%20app" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F19%2Fpackaging-for-pleasure%2F&amp;title=Packaging%20For%20Pleasure&amp;notes=Let%20me%20be%20more%20explicit%20and%20say%20I%27m%20going%20to%20be%20talking%20about%20Rails%20application%20packaging.%20Sorry%2C%20I%20needed%20a%20good%20post%20title%20for%20the%20lulz%20and%20the%20page%20views.%0D%0A%0D%0A%0D%0A%0D%0AThere%20are%20a%20few%20rake%20tasks%20that%20I%27ve%20been%20using%20more%20and%20more%20now%20that%20all%20of%20our%20app" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F19%2Fpackaging-for-pleasure%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/04/19/packaging-for-pleasure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>As It Turns Out, Faking It Is OK</title>
		<link>http://blog.agoragames.com/2010/04/09/as-it-turns-out-faking-it-is-ok/</link>
		<comments>http://blog.agoragames.com/2010/04/09/as-it-turns-out-faking-it-is-ok/#comments</comments>
		<pubDate>Fri, 09 Apr 2010 14:32:57 +0000</pubDate>
		<dc:creator>David Czarnecki</dc:creator>
				<category><![CDATA[Bending Rails]]></category>
		<category><![CDATA[Engineering]]></category>

		<guid isPermaLink="false">http://blog.agoragames.com/?p=532</guid>
		<description><![CDATA[This post is totally SFW. That&#8217;s all your going to get in this teaser.

I just inherited an application and was adding some tests and noticed that one of the tests was randomly failing. As I dug in more, this particular controller test, in executing the controller&#8217;s index method, was actually calling out on the intertubes [...]]]></description>
			<content:encoded><![CDATA[<p>This post is totally SFW. That&#8217;s all your going to get in this teaser.</p>
<p><span id="more-532"></span><img class="alignnone size-full wp-image-534" title="when_harry_met_sally" src="http://blog.agoragames.com/wp-content/uploads/2010/04/themarketingblog_e_a001438922.JPG" alt="when_harry_met_sally" width="334" height="286" /></p>
<p>I just inherited an application and was adding some tests and noticed that one of the tests was randomly failing. As I dug in more, this particular controller test, in executing the controller&#8217;s index method, was actually calling out on the intertubes to request some data. For an integration test that&#8217;s probably OK, but my view is that unit and functional tests should be self-contained.</p>
<p>Enter <a href="http://github.com/chrisk/fakeweb">Fakeweb</a>.</p>
<p>&#8220;FakeWeb is a helper for faking web requests in Ruby. It works at a global level, without modifying code or writing extensive stubs.&#8221;</p>
<p>3 lines of code later and I have a self-contained functional test that works with real data.</p>
<pre class="brush: ruby">

def setup
FakeWeb.allow_net_connect = false
end

def teardown
FakeWeb.allow_net_connect = true
end

test &quot;should get index&quot; do
FakeWeb.register_uri(:get, &#039;http://my.real.url.on.the.internets.com&#039;, :body =&gt; File.join(File.dirname(__FILE__), &#039;../fakeweb&#039;, &#039;some-file.xml&#039;), :content_type =&gt; &quot;text/xml&quot;)

get :index
assert_response :success

...
</pre>
<p>All I needed to do was simply register the URI that was being referenced in my test, provide a valid (or invalid depending on the test) response, and my test will never try to access the real internet.</p>

<div class="sociable">

<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://reddit.com/submit?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F09%2Fas-it-turns-out-faking-it-is-ok%2F&amp;title=As%20It%20Turns%20Out%2C%20Faking%20It%20Is%20OK" title="Reddit"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/reddit.png" title="Reddit" alt="Reddit" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F09%2Fas-it-turns-out-faking-it-is-ok%2F&amp;title=As%20It%20Turns%20Out%2C%20Faking%20It%20Is%20OK&amp;bodytext=This%20post%20is%20totally%20SFW.%20That%27s%20all%20your%20going%20to%20get%20in%20this%20teaser.%0D%0A%0D%0A%0D%0A%0D%0AI%20just%20inherited%20an%20application%20and%20was%20adding%20some%20tests%20and%20noticed%20that%20one%20of%20the%20tests%20was%20randomly%20failing.%20As%20I%20dug%20in%20more%2C%20this%20particular%20controller%20test%2C%20in%20exec" title="Digg"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F09%2Fas-it-turns-out-faking-it-is-ok%2F&amp;title=As%20It%20Turns%20Out%2C%20Faking%20It%20Is%20OK&amp;notes=This%20post%20is%20totally%20SFW.%20That%27s%20all%20your%20going%20to%20get%20in%20this%20teaser.%0D%0A%0D%0A%0D%0A%0D%0AI%20just%20inherited%20an%20application%20and%20was%20adding%20some%20tests%20and%20noticed%20that%20one%20of%20the%20tests%20was%20randomly%20failing.%20As%20I%20dug%20in%20more%2C%20this%20particular%20controller%20test%2C%20in%20exec" title="del.icio.us"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fblog.agoragames.com%2F2010%2F04%2F09%2Fas-it-turns-out-faking-it-is-ok%2F" title="Technorati"><img src="http://blog.agoragames.com/wp-content/plugins/var/www/waxer-blog/shared/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.agoragames.com/2010/04/09/as-it-turns-out-faking-it-is-ok/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->