<?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>My Thoughts &#187; scalable</title>
	<atom:link href="http://martijnpannevis.nl/blog/tag/scalable/feed/" rel="self" type="application/rss+xml" />
	<link>http://martijnpannevis.nl/blog</link>
	<description>It compiles; Let's ship it!</description>
	<lastBuildDate>Mon, 13 Dec 2010 13:18:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>One Frame Of Fame Architecture</title>
		<link>http://martijnpannevis.nl/blog/2010/01/08/one-frame-of-fame-architecture/</link>
		<comments>http://martijnpannevis.nl/blog/2010/01/08/one-frame-of-fame-architecture/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 23:29:20 +0000</pubDate>
		<dc:creator>Martijn</dc:creator>
				<category><![CDATA[Main]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[crowdflower]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[mturk]]></category>
		<category><![CDATA[ofof]]></category>
		<category><![CDATA[oneframeoffame]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[scalable]]></category>
		<category><![CDATA[sqs]]></category>

		<guid isPermaLink="false">http://martijnpannevis.nl/blog/?p=304</guid>
		<description><![CDATA[
The last few months I have been quite busy working on the recently launched OneFrameOfFame.com. In this blogpost I&#8217;ll explain the architecture that runs the site.
The site OneFrameOfFame.com might look simple, from the front. It&#8217;s basically 2 different pages, and even those are really similar. However, the backend is quite complex: Each frame is handled by [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-305" title="ofof-flow5" src="http://martijnpannevis.nl/blog/wp-content/uploads/2009/12/ofof-flow5-450x351.png" alt="ofof-flow5" width="450" height="351" /></p>
<p>The last few months I have been quite busy working on the recently launched <a href="http://oneframeoffame.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/oneframeoffame.com');">OneFrameOfFame.com</a>. In this blogpost I&#8217;ll explain the architecture that runs the site.</p>
<p>The site <a href="http://oneframeoffame.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/oneframeoffame.com');">OneFrameOfFame.com</a> might look simple, from the front. It&#8217;s basically 2 different pages, and even those are really similar. However, the backend is quite complex: Each frame is handled by at least 10 different machines, likely on 3 continents, of different services, before it ends up in the clip.</p>
<p>When a user starts his webcam to contribute a frame, a request is sent to our server. That takes the next queued frame number at <a href="http://aws.amazon.com/sqs/" onclick="javascript:pageTracker._trackPageview('/outbound/article/aws.amazon.com');" target="_blank">Amazon&#8217;s Simple Queue services</a> (SQS), and sends it to the user. When he completes the frame, the resulting image is sent back. It&#8217;s then scaled to 3 different resolutions, and stored at <a href="http://aws.amazon.com/s3/" onclick="javascript:pageTracker._trackPageview('/outbound/article/aws.amazon.com');">Amazon&#8217;s S3</a>, and removed from the SQS queue. The image is added to the recent frames at our homepage. It&#8217;s also sent to <a href="https://crowdflower.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/crowdflower.com');">Crowdflower</a>, who creates a new job at <a href="http://aws.amazon.com/mturk/" onclick="javascript:pageTracker._trackPageview('/outbound/article/aws.amazon.com');">Amazon Mechanical Turk</a>. At least 3 different workers rate the image, check for nudity, and tell us how well the user did in mimicking the original frame.</p>
<p>Once enough workers have rated the image, a signal is sent back to our server (via a webhook). Every hour our server collects all judgements. Then the the render server checks if there are new, moderated images. If that&#8217;s the case it pulls them from S3 (and ads them to a local cache, so they will only be downloaded to the render server once). It then generates a new clip, which it sends to <a href="http://blip.tv" onclick="javascript:pageTracker._trackPageview('/outbound/article/blip.tv');" target="_blank">Blip.TV</a>, which is embedded on our frontpage. Blip was the only video service we found, where it&#8217;s possible to replace a video via the API.</p>
<p>The main webpage is hosted at <a href="http://www.mediatemple.net" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.mediatemple.net');" target="_blank">Mediatemple</a>, which (is supposed to) run on grid hosting, enabling a lot of traffic without breaking down.</p>
<p>Without all these scaling services (especially the ones provided by Amazon), this whole project probably wouldn&#8217;t have been feasible with our limited budget. So go shoot your <a href="http://oneframeoffame.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/oneframeoffame.com');">One Frame Of Fame!</a></p>
<p><strong>Update:</strong><br />
I&#8217;ve considered using <a href="http://aws.amazon.com/cloudfront/" onclick="javascript:pageTracker._trackPageview('/outbound/article/aws.amazon.com');">Cloudfront</a> to distribute the images. Since they&#8217;r already stored in S3, using it would only be adding a setting (and a DNS entry). However, since the frames shown are highly dynamic (by default we only show the last 10 frames), caching isn&#8217;t that useful, as the requested images will change often.<br />
Also, because we have a lot of files, on average not being requested too often, the origin fetches would be significant (both in terms of costs, and in speed). So we stayed with S3, which is fast enough (we use S3 Europe, since most of our target audience is in Europe).</p>
]]></content:encoded>
			<wfw:commentRss>http://martijnpannevis.nl/blog/2010/01/08/one-frame-of-fame-architecture/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

