<?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; Jon Crosby</title>
	<atom:link href="http://www.engineyard.com/blog/author/joncrosby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.engineyard.com/blog</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 01:49:05 +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>Cross-Domain Data with Rack and Rails</title>
		<link>http://www.engineyard.com/blog/2009/cross-domain-data-with-rack-and-rails/</link>
		<comments>http://www.engineyard.com/blog/2009/cross-domain-data-with-rack-and-rails/#comments</comments>
		<pubDate>Thu, 28 May 2009 17:00:35 +0000</pubDate>
		<dc:creator>Jon Crosby</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Rack]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[RailsConf]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=1111</guid>
		<description><![CDATA[<p>An undeniable theme from RailsConf this year was the arrival of Rack in Rails as of version 2.3. The first topic that seemed to pique developer interest was Rails Metal. Most enthusiasm centered around the speed bump of using a lighter stack for high volume URIs. While this is a useful upgrade to Rails, the architectural shift provided by Rack brings new flexibility. In this post, I will demonstrate the unique value of mounting Rack middleware in your Rails stack.</p>
<p><strong>Cross-domain Data</strong></p>
<p>Web applications using AJAX to obtain third party data must deal with the browser's <a rel="nofollow" href="http://en.wikipedia.org/wiki/Same_origin_policy">same-origin</a> policy. Typical workarounds include either <a rel="nofollow" href="http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/">JSONP</a> or the use of a service proxy on the home domain. Both techniques bring trade-offs. JSONP removes the same-origin barrier but leaves the cross-domain security hole in place; a third party service can execute arbitrary JavaScript on the client site. Service proxies offer more safety at the cost of new infrastructure and code that must be maintained.</p>
<p>A Rails app serving API data can now provide a third option without opening security holes or requiring new infrastructure for client sites.</p>
<p><strong>AJACSS Sounds Like AJAX</strong></p>
<p>Asynchronous JavaScript and CSS, also known as CSSHttpRequest, is a method of URI-encoding data in 2KB chunks split over several CSS rules with a modified data URI scheme. Because CSS is not subject to the same-origin policy, no service proxy is required. Moreover, because this is CSS, the security concerns of JSONP no longer apply. Here's an example CSS snippet with an encoded "Hello Rails" message:</p>
<pre> #c0 { background: url(data:,Hello%20Rails); }</pre>
<p><strong>Shopping for Rack Middleware</strong></p>
<p>If you're in need of a piece of Rack middleware, there are two places to check before rolling your own -- the Rack <a rel="nofollow" href="http://wiki.github.com/rack/rack/list-of-middleware">wiki</a> and <a rel="nofollow" href="http://github.com/rack/rack-contrib">rack-contrib</a> on <a rel="nofollow" href="http://github.com">GitHub</a>. In the case of CSSHttpRequest, we can just grab a <a rel="nofollow" href="http://github.com/rack/rack-contrib/blob/8b6323c8eecc8279088987c52b27dda5d4cadf7b/lib/rack/contrib/csshttprequest.rb">pre-made piece of middleware</a> and drop it into our Rails app thanks to <a rel="nofollow" href="http://cee-dub.info/">Cameron Walters</a> from <a rel="nofollow" href="http://nb.io/">nb.io</a>.</p>
<p>In config/environment.rb, add the following code inside the Rails::Initializer block:</p>
<pre># First specify the required gems so that rake gems:install will install them
config.gem "rack-contrib", :lib =&gt; 'rack/contrib/csshttprequest'
config.gem "nbio-csshttprequest", :lib =&gt; "csshttprequest", :source =&gt; "http://gems.github.com/"

# Next, load Rack::CSSHTTPRequest in your middleware stack
config.middleware.use 'Rack::CSSHTTPRequest'</pre>
<p>That's it! Rack::CSSHTTPRequest will automatically encode the output for any request using the "_format=chr" convention used by Rails. Other web apps and services can use the data without exposing security holes or requiring new infrastructure.
<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/cross-domain-data-with-rack-and-rails/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Engine Yard Flex Announced, New Features Added to Solo</title>
		<link>http://www.engineyard.com/blog/2009/engine-yard-flex-announced-new-features-added-to-solo/</link>
		<comments>http://www.engineyard.com/blog/2009/engine-yard-flex-announced-new-features-added-to-solo/#comments</comments>
		<pubDate>Wed, 06 May 2009 03:22:35 +0000</pubDate>
		<dc:creator>Jon Crosby</dc:creator>
				<category><![CDATA[Engine Yard Cloud]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Solo]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[RailsConf]]></category>

		<guid isPermaLink="false">http://www.engineyard.com/blog/?p=445</guid>
		<description><![CDATA[<p>Engine Yard is a proud sponsor of <a href="http://en.oreilly.com/rails2009/">RailsConf 2009</a> in Las Vegas. We're having a great time speaking with our customers and the wider Rails community. This year, we wanted to share something extra special with everyone&mdash;a peek at the next offering in our suite of <a href="http://www.engineyard.com/products/cloud">cloud management</a> solutions: Engine Yard Flex.</p>
<p>h2. Keynote Flex Preview</p>
<p>During our keynote presentation, <a href="http://en.oreilly.com/rails2009/public/schedule/detail/9066">Agility in Deployment</a>, we previewed several exciting Flex features queued for release in late June of this year. Flex is a cloud computing platform built on Amazon EC2 for hosting real world Rails applications, running everything from Passenger to Rack, Merb, Sinatra, and more.</p>
<p>h2. Instant Self-Healing Clusters</p>
<p>If you're familiar with our existing Solo platform, Flex takes it to the next level, introducing one-click provisioning of dedicated, load-balanced, self-healing clusters. Adding or removing servers is as simple as clicking a button. If at any time a node in your cluster should become unresponsive, it will be decommissioned and a replacement will take over automatically.</p>
<p>While building Flex, we added some powerful tools to our cloud platform that we couldn't resist adding to Solo. Even better, they are all available today for all Solo users.</p>
<p>h2. Deploy from the Web, Deploy from Git</p>
<p>Nearly all of our customers use Capistrano for deployment and for good reason; it encapsulates several best practices in an automated fashion that take the guesswork out of deploying Rails applications. We have taken these conventions and wrapped them in a single "Deploy" button, available on every customer's Cloud Dashboard.</p>
<p>For those of you who prefer the command line, this new method of deployment is also available via Git. Just push to your repository using a tag that specifies your environment and any migrations that need to be run, and that's it. The <a href="http://www.engineyard.com/products/cloud">Engine Yard Cloud</a> takes care of the rest. Both web deployment and Git push support work alongside Capistrano, allowing you to choose the tool that best fits your team's workflow.</p>
<p>h2. Real Production Clones</p>
<p>Hosting real applications with real users means taking each deployment seriously. As Ruby developers, we test everything because we believe in the value it provides. This same mindset should be applied to deployment.</p>
<p>Using the Engine Yard cloud makes this a snap. With one click, you can clone any production environment to practice deployment and rollback prior to affecting your customer data. So called "staging" environments are often under-powered and lag behind production environments when upgrades take place. Cloud computing with Engine Yard allows you to make an exact copy of your production environment for just as long as you need it. When you're confident in your deployment, you can shut down the staging environment with a click of a button, paying only for the minutes used.</p>
<p>h2. Your Business in the Cloud</p>
<p>There is a fundamental shift underway for deployment. Forward thinking businesses can use this to their competitive advantage to increase quality and uptime as well as decreasing time to market. At Engine Yard, we want to enable our customers to take advantage of this shift and we welcome you to join us in the Cloud.</p>
<p>For more information, be sure to check out the <a href="http://www.engineyard.com/about/press/09-05-06-engine-yard-previews-flex">Flex Press Release</a>.
<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-flex-announced-new-features-added-to-solo/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>

