<?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>Cognition &#187; firefox</title>
	<atom:link href="http://www.cognition.ca/tag/firefox/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cognition.ca</link>
	<description>Balls-in-the-air Entrepreneurship and Juggling.</description>
	<lastBuildDate>Tue, 14 Jun 2011 10:04:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>How I Built a Free Grid Computer, In Less Than a Week</title>
		<link>http://www.cognition.ca/2008/04/how-to-build-a-free-grid-computer.html</link>
		<comments>http://www.cognition.ca/2008/04/how-to-build-a-free-grid-computer.html#comments</comments>
		<pubDate>Sat, 12 Apr 2008 00:07:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[entrepreneurs]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[bargain]]></category>
		<category><![CDATA[buylater]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[pricewatch]]></category>
		<category><![CDATA[shopping]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://www.cognition.ca/?p=60</guid>
		<description><![CDATA[By now you&#8217;ve all heard about BuyLater, my happy little firefox extension that (thanks to an unexpected LifeHacker.com article) is rapidly climbing towards 1000 users and world domination. Without getting TOO technical, I thought I would share with you how I saved BuyLater from becoming an infrastructure nightmare &#8211; one that would have either killed [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="float: right; border: 0; margin: 20px;" src="http://farm1.static.flickr.com/32/102686300_327fb05079_m.jpg" alt="" width="240" height="160" /></p>
<p>By now you&#8217;ve all heard about <a href="http://buylater.cognition.ca">BuyLater</a>, my happy little firefox extension that (thanks to <a href="http://lifehacker.com/373503/monitor-amazon-products-for-price-drops-and-availability-in-real+time">an unexpected LifeHacker.com article</a>) is rapidly climbing towards 1000 users and world domination. Without getting TOO technical, I thought I would share with you how I saved BuyLater from becoming an infrastructure nightmare &#8211; one that would have either killed the value of the application (real-time updates), or sucked tons of money and hardware into a technology backwash.</p>
<p>This will be a little controversial, I think &#8211; simply because the technique I used, (grid computing), is most often used for less&#8230; legitimate&#8230; purposes. So much so, that it is almost synonymous with &#8220;Bot Nets&#8221;.</p>
<p>But let&#8217;s go back to the beginning.</p>
<p><span id="more-60"></span>When I approached <a href="http://overstimulate.com">Jesse</a> about <a href="http://twitter.com/wiime">WiiMe</a>, and suggested that he ought to generalize it beyond a single product (Wii), and a single interface (Twitter), he told me it would be too hard. The key problem, he pointed out, was keeping a large number of items up-to-date. &#8220;Don&#8217;t you realize <a href="http://www.amazon.com/?tag=boin-20">Amazon</a> has a limit on their API?&#8221;</p>
<p>Well, I <strong>did</strong> realize that. But I also had a few ideas.</p>
<h2>Step 1 &#8211; Do more with Less</h2>
<p>Amazon limits API requests to 1 request per second, a totally reasonable limit for most purposes. However, they enforce that limit based on IP address, NOT based on API key. So getting a bunch of extra API keys and round-robining through them was not going to work. (That was a trick I had used on Google&#8217;s Search API, some years ago.)</p>
<p>However, most people don&#8217;t realize that you can poll for more than one item, per API call. In fact, you can pack 10 items into a single request. Doing this gave me a theoretical maximum of 600 items per minute. When I broke the 300 user mark (somewhere in the first two days), and the total number of items exceeded 600, I had to drop the refresh interval back to 2 minutes. Uh-oh &#8211; I could see where this was going.</p>
<p><img class="alignright" style="float: right; border: 0; margin: 20px;" src="http://farm1.static.flickr.com/100/310446979_dd7ac572f8_m.jpg" alt="" width="240" height="180" />Sure enough, over the course of the next week, I gradually reduced the update interval to 6 minutes &#8211; which meant that BuyLater became essentially useless for tracking Wiis and other scarce items, where the time in-stock is typically 5 minutes or less.</p>
<p>I needed a BUNCH more IP addresses, and quick.</p>
<h2>Step 2 &#8211; With a little help from my friends&#8230;</h2>
<p>Rather than start buying additional servers (which I couldn&#8217;t afford), or additional IP addresses (which I couldn&#8217;t get), I did what any sensible child of the digital age would do &#8211; I made it someone else&#8217;s problem. I simply added a small service to the BuyLater extension &#8211; that fetches a given URL every 60 seconds, and returns the resulting XML data to the BuyLater server. In essence, I distributed the task of polling amazon to the end-users.</p>
<p>Why 60 seconds? Simple math, really. I&#8217;ve always wanted to maintain a 60-second refresh interval for the BuyLater service; most users are following 2 unique items, and as a basic assumption, I assume people have their browser open 20% of the time. (Having users in the UK and, hopefully soon, Asia, helps to spread out the polling). Remember, each query to Amazon fetches 10 items &#8211; which means, hopefully, that the cluster will be able to maintain my target refresh rate&#8230; indefinitely.</p>
<p>Now, obviously I&#8217;ll still need to add some more servers at some point, since all this data is still going back to one place. But at least I&#8217;ll be adding them for the right reasons.</p>
<h2>Step 3 &#8211; ???????</h2>
<p><img class="alignright" style="float: right; border: 0; margin: 20px;" src="http://farm2.static.flickr.com/1204/1326013625_709c02100d_m.jpg" alt="" width="240" height="160" />There are two questions that people have asked me, so far:</p>
<ul>
<li>What do your users think about that?</li>
<li>What does Amazon think about that?</li>
</ul>
<p>To the first one, I have no idea. That&#8217;s really what this post is about &#8211; what DO you think about it? Is it alright for Larry to be fetching data from Amazon, that helps Sally get a deal? Should I have made the whole thing opt-in, or opt-out? From a technical standpoint, BuyLater users were already visiting both Amazon, and the BuyLater site (albeit not once every 60 seconds), and there&#8217;s no personal info in any of this data, so what&#8217;s the difference?</p>
<p>On to the second question &#8211; again, I have no idea. But since there were a couple of @amazon.com email addresses in yesterday&#8217;s batch of users, I imagine if they have a problem with it&#8230; I&#8217;ll hear about it pretty quick.</p>
<span class="akst_link"><a href="http://www.cognition.ca/?p=60&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_60"  class="akst_share_link">Share This</a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.cognition.ca/2008/04/how-to-build-a-free-grid-computer.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>BuyLater 0.7 Released, Support for Canada and UK Users</title>
		<link>http://www.cognition.ca/2008/04/buylater-07-released-support-for-canada-and-uk-users.html</link>
		<comments>http://www.cognition.ca/2008/04/buylater-07-released-support-for-canada-and-uk-users.html#comments</comments>
		<pubDate>Thu, 03 Apr 2008 17:28:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[entrepreneurs]]></category>
		<category><![CDATA[buylater]]></category>
		<category><![CDATA[extension]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[shopping]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://www.cognition.ca/?p=55</guid>
		<description><![CDATA[After the deluge of new users from last week&#8217;s Lifehacker.com article, followed by a full day on the front page of delicious, I ended up with an inbox full of bug reports. While there were a few pernicious actual &#8220;bugs&#8221; in there (sorry to everyone who ended up with the &#8216;can&#8217;t delete items&#8217; bug, that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://buylater.cognition.ca"><img class="alignright size-full wp-image-56" style="float: right; border: 0; margin: 20px;" title="BuyLaterButton" src="http://www.cognition.ca/wp-content/uploads/2008/04/picture-25.png" alt="Buy Later Button on Amazon.ca" width="225" height="217" /></a>After the <a href="http://www.cognition.ca/2008/03/life-after-lifehackercom-what-to-do-when-your-alpha-leaks.html">deluge of new users</a> from <a title="Life Hacker features BuyLater - " href="http://lifehacker.com/373503/monitor-amazon-products-for-price-drops-and-availability-in-real+time">last week&#8217;s Lifehacker.com article</a>, followed by a full day on the <a href="http://del.icio.us/url/dbcec6b2f46a8a442f344c5dbb3aa946">front page of delicious</a>, I ended up with an inbox full of bug reports. While there were a few pernicious actual &#8220;bugs&#8221; in there (sorry to everyone who ended up with the &#8216;can&#8217;t delete items&#8217; bug, that&#8217;s fixed too), most of them fell into two buckets:</p>
<ol>
<li><span id="more-55"></span>It doesn&#8217;t work in Amazon.ca, or Amazon.co.uk</li>
<li>Can I control what product condition (Used/New) or Vendor (Amazon/Others) it watches?</li>
</ol>
<p>While the second one is proving a little difficult, I&#8217;m happy to announce that <a href="http://buylater.cognition.ca">the new version of BuyLater</a> has full support for Canada and the UK! If you haven&#8217;t tried it out yet, you should. And if you&#8217;re an extension developer yourself, feel free to grab <a href="http://github.com/joshuamckenty/laterbuy/tree/master">the source code from github.com</a> and have a look.</p>
<p>A big thank you to everyone who sent in a bug report &#8211; if you keep &#8216;em comin, I&#8217;ll keep fixin them. Other planned enhancements for the next version include:</p>
<ol>
<li>Product condition and vendors (as mentioned above)</li>
<li>Fine-grained notification controls (including direct, non-twitter SMS and IM delivery)</li>
<li>Being able to delete your account (probably by providing notification when the plugin is uninstalled)</li>
<li>More countries</li>
<li>More shopping portals</li>
</ol>
<p>On that last note, what would you like to see next? EBay? More book sellers? Alienware? What?</p>
<span class="akst_link"><a href="http://www.cognition.ca/?p=55&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_55"  class="akst_share_link">Share This</a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.cognition.ca/2008/04/buylater-07-released-support-for-canada-and-uk-users.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

