<?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>le blog &#187; Facebook</title>
	<atom:link href="http://www.normyee.net/blog/category/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.normyee.net/blog</link>
	<description></description>
	<lastBuildDate>Wed, 09 Dec 2009 23:23:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Watching an app grow outside the U.S.</title>
		<link>http://www.normyee.net/blog/2007/09/29/watching-an-app-grow-outside-the-us/</link>
		<comments>http://www.normyee.net/blog/2007/09/29/watching-an-app-grow-outside-the-us/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 21:47:27 +0000</pubDate>
		<dc:creator>norm</dc:creator>
				<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.normyee.net/blog/2007/09/29/watching-an-app-grow-outside-the-us/</guid>
		<description><![CDATA[It&#8217;s interesting watching the growth of Describe Me. When a user first adds the app, he or she is automatically tagged by one of the developers as &#8220;cool,&#8221; in order to illustrate how the app works. Recently I became the person tagging new users, and therefore get a ton of friend requests, pokes, or just]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s interesting watching the growth of <a href="http://apps.facebook.com/describeme_/" target="_blank">Describe Me</a>. When a user first adds the app, he or she is automatically tagged by one of the developers as &#8220;cool,&#8221; in order to illustrate how the app works.</p>
<p>Recently I became the person tagging new users, and therefore get a ton of friend requests, pokes, or just &#8220;who the hell are you&#8221; emails from random people. At first it was just mainly people in the U.S., but I started to get requests and pokes from South Africa, Sweden, Hong Kong, Indonesia, Egypt, United Arab Emirates, Singapore, Malaysia,  and London to name a few of the more common locations (or rather, what they&#8217;ve indicated as their &#8220;network&#8221;).</p>
<p>Pretty neat to see it grow beyond the U.S. since it was not something we considered when the app was being built. Thankfully the db is running in UTF-8 to handle the various character sets &#8212; I&#8217;ve got at least one tag in Chinese which I can&#8217;t read but at least it renders correctly heh.</p>
<p>Oh, and as of this post, <a href="http://apps.facebook.com/describeme_/" target="_blank">Describe Me</a> has 80,249 users. Can&#8217;t wait until 100k! We&#8217;re gonna need to throw a celebration or something. <img src='http://www.normyee.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.normyee.net/blog/2007/09/29/watching-an-app-grow-outside-the-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP&#8217;s curl_multi to the rescue</title>
		<link>http://www.normyee.net/blog/2007/09/11/curl_multi-to-the-rescue/</link>
		<comments>http://www.normyee.net/blog/2007/09/11/curl_multi-to-the-rescue/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 23:48:18 +0000</pubDate>
		<dc:creator>norm</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.normyee.net/blog/2007/09/11/curl_multi-to-the-rescue/</guid>
		<description><![CDATA[One of my Facebook apps hits Amazon&#8217;s Ecommerce Service (ECS) for item information via REST queries. I needed to process 19 separate queries searching for a title (basically searching 1 of 19 &#8220;browse nodes&#8221;), and return that data onto the Facebook canvas. Simple enough, I could just do a foreach loop to make each REST]]></description>
			<content:encoded><![CDATA[<p>One of my <a href="http://apps.facebook.com/gamersnetwork/" target="_blank">Facebook apps</a> hits <a href="http://www.amazon.com/E-Commerce-Service-AWS-home-page/b/ref=sc_fe_l_2/104-9762278-8592743?ie=UTF8&amp;node=12738641&amp;no=342430011&amp;me=A36L942TSJ2AJA" target="_blank">Amazon&#8217;s Ecommerce Service (ECS)</a> for item information via <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer" target="_blank">REST</a> queries. I needed to process 19 separate queries searching for a title (basically searching 1 of 19 &#8220;browse nodes&#8221;), and return that data onto the Facebook canvas.</p>
<p>Simple enough, I could just do a foreach loop to make each REST request. Only problem was, say, each loop took 500 milliseconds total. That&#8217;s not hard when you consider all the steps: DNS, performing the REST query, waiting for the response, receiving the response, and then parsing the XML (in this case, using the <a href="http://us.php.net/simplexml" target="_blank">SimpleXML extension</a>). At 19 requests that&#8217;s 9.5 seconds which is way too slow, not to mention Facebook times out the request as well and returns a lovely error page.</p>
<p>For the test REST query I was benchmarking, it was averaging 9.65 seconds for the entire PHP script to complete (performing all 19 REST queries and then formatting the output). Simply switching from <a href="http://us.php.net/file_get_contents" target="_blank">file_get_contents()</a> to PHP&#8217;s <a href="http://us.php.net/curl" target="_blank">cURL functions</a> dropped the average to 7.32 seconds, a roughly 24% improvement. That was a great improvement, but still too slow and Facebook was still timing out the pages.</p>
<p>The root of the problem was that the 19 REST queries were <strong>sequential</strong> and as a result too slow. I needed to make those requests <strong>concurrently</strong>. Fortunately, PHP supported multi curl (basically making multiple cURL requests concurrently) via curl_multi_* functions.</p>
<p>BAM.  Using curl_multi dropped the page generation time down to 1.6 seconds &#8212; much more reasonable and a 83.4% improvement. w00t.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.normyee.net/blog/2007/09/11/curl_multi-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2 Facebook apps</title>
		<link>http://www.normyee.net/blog/2007/08/29/2-facebook-apps/</link>
		<comments>http://www.normyee.net/blog/2007/08/29/2-facebook-apps/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 05:01:39 +0000</pubDate>
		<dc:creator>norm</dc:creator>
				<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://www.normyee.net/blog/2007/08/29/2-facebook-apps/</guid>
		<description><![CDATA[Like a lot of developers, I jumped on the Facebook platform bandwagon as well. I&#8217;ve help author two Facebook apps: Gamers Gamers basically allows you to create a game library, add gamer tags, rate/review games, and display it all on your profile. Describe Me Describe Me allows you to tag people, thus building a tag]]></description>
			<content:encoded><![CDATA[<p>Like a lot of developers, I jumped on the Facebook platform bandwagon as well. I&#8217;ve help author two Facebook apps:</p>
<ul>
<li><a href="http://apps.facebook.com/gamersnetwork/" target="_blank">Gamers</a>
<ul>
<li>Gamers basically allows you to create a game library, add gamer tags, rate/review games, and display it all on your profile.</li>
</ul>
</li>
<li><a href="http://apps.facebook.com/describeme_/" target="_blank">Describe Me</a>
<ul>
<li>Describe Me allows you to tag people, thus building a tag cloud. Think <a href="http://del.icio.us/" target="_blank">del.icio.us</a>, but for tagging people instead of web pages.</li>
</ul>
</li>
</ul>
<p>If you&#8217;re on Facebook, add those apps and check them out!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.normyee.net/blog/2007/08/29/2-facebook-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
