<?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; amazon</title>
	<atom:link href="http://www.cognition.ca/tag/amazon/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>Get a Tweet with the latest DVD releases using MovieScout</title>
		<link>http://www.cognition.ca/2008/04/get-a-tweet-with-the-latest-dvd-releases-using-moviescout.html</link>
		<comments>http://www.cognition.ca/2008/04/get-a-tweet-with-the-latest-dvd-releases-using-moviescout.html#comments</comments>
		<pubDate>Wed, 16 Apr 2008 07:17:05 +0000</pubDate>
		<dc:creator>toddicus</dc:creator>
				<category><![CDATA[entrepreneurs]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[dvd releases]]></category>
		<category><![CDATA[movies]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[tinyapp]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.cognition.ca/?p=61</guid>
		<description><![CDATA[(Guest Post by Todd Khozein:) I am proud to say that I have written my first, yes my first, web app ever in the form of a tool to proliferate the growing and widespread impulsive want-it-NOW shopper&#8217;s need to be the first to know in the form of a Twitter Bot that will, indeed, tell [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cognition.ca/wp-content/uploads/2008/04/photo-861.jpg"><img class="alignright" style="float: right; border: 0; margin: 20px;" title="photo-861" src="http://www.cognition.ca/wp-content/uploads/2008/04/photo-861-300x233.jpg" alt="" width="261" height="202" /></a></p>
<p><em>(Guest Post by Todd Khozein:)</em></p>
<p>I am proud to say that I have written <a href="http://moviescout.cognition.ca">my first, yes my first, web app ever</a> in the form of a tool to proliferate the growing and widespread impulsive want-it-NOW shopper&#8217;s need to be the first to know in the form of a Twitter Bot that will, indeed, tell you what the latest DVD releases are with a link to buy it NOW!  Thanks to Joshua for holding my tender little virgin hacker&#8217;s hand through the intricacies of building something that actually works in a world where run-on sentences are acceptable, nay encouraged.</p>
<p>I think I have officially taken a significant step towards geekdom and feel that I should commemorate this occasion of the alpha release by inviting you, the reader, to make this app wildly successful and dedicating the remainder of your waking hours tonight and possibly tomorrow in telling all of your people how sexy this app really is.</p>
<span class="akst_link"><a href="http://www.cognition.ca/?p=61&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_61"  class="akst_share_link">Share This</a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.cognition.ca/2008/04/get-a-tweet-with-the-latest-dvd-releases-using-moviescout.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>Life after LifeHacker.com &#8211; What to do when your Alpha leaks</title>
		<link>http://www.cognition.ca/2008/03/life-after-lifehackercom-what-to-do-when-your-alpha-leaks.html</link>
		<comments>http://www.cognition.ca/2008/03/life-after-lifehackercom-what-to-do-when-your-alpha-leaks.html#comments</comments>
		<pubDate>Sat, 29 Mar 2008 10:05:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[entrepreneurs]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[buylater]]></category>
		<category><![CDATA[firefox extension]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[lifehacker]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[web2.0]]></category>

		<guid isPermaLink="false">http://www.cognition.ca/2008/03/life-after-lifehackercom-what-to-do-when-your-alpha-leaks.html</guid>
		<description><![CDATA[Wow. It&#8217;s not every day that, suddenly and without warning, thousands upon thousands of strangers descend upon your happy little world, and start playing with it. But such is the power of LifeHacker.com. They decided to run a story on my happy little bot this morning. I didn&#8217;t know about it, came back from lunch [...]]]></description>
			<content:encoded><![CDATA[<p>Wow. It&#8217;s not every day that, suddenly and without warning, thousands upon thousands of strangers descend upon your happy little world, and start playing with it. But such is the power of <a href="http://LifeHacker.com">LifeHacker.com</a>.</p>
<p>They decided to run a story on <a href="http://buylater.cognition.ca">my happy little bot</a> this morning. I didn&#8217;t know about it, came back from lunch &#8211; and I had 100 users. (For the last week, that number has been stubbornly stuck at 8).</p>
<p>I poked a little further, and realized that only 20 of those 100 users had <a href="http://twitter.com">twitter</a> accounts. Hmm &#8211; I guess I better get email notifications working, eh?</p>
<p><span id="more-54"></span>In the five to six minutes that it took me to whip up an email solution, I added another 15 users. Wow. It suddenly occurred to me that I didn&#8217;t know where this traffic was coming from &#8211; I hadn&#8217;t gotten around to adding google analytics code yet.</p>
<p>tail -f /var/log/httpd/buylater-access.log&#8230;</p>
<p>Ah. Lifehacker.</p>
<p>Here&#8217;s what happened to my user counts (new users per hour, and per day):</p>
<blockquote>
<pre>1      12      2008-03-28
20     13     2008-03-28
45     14     2008-03-28
57     15     2008-03-28
35     16     2008-03-28
20     17     2008-03-28
20     18     2008-03-28
22     19     2008-03-28
12     20     2008-03-28
12     21     2008-03-28
12     22     2008-03-28
15     23     2008-03-28
8       0     2008-03-29
7       1     2008-03-29
1       2     2008-03-29
2       3     2008-03-29
3       4     2008-03-29</pre>
</blockquote>
<p>I have to admit the 57-new-user peak was pretty exciting &#8211; nothing like a new user <em>every minute </em>to blow your socks off.</p>
<p>I quickly started having problems, of course &#8211; as the user count climbed, so too did the item count &#8211; which meant I was hammering Amazon&#8217;s API almost continuously. They didn&#8217;t like that, and started bouncing some of my replies. Luckily, I found <a href="http://developer.amazonwebservices.com/connect/thread.jspa;jsessionid=AD7A025F35250C9689E70FEABC679D55?messageID=38292&amp;#38292">this article</a> that explained how to query up to 10 items per API request, which means I&#8217;ve been able to maintain an update interval of less than 3 minutes. (I&#8217;ll tune that for the most popular / rapidly changing items soon.)</p>
<p>For about an hour, a bug in my email function (the one I whipped up in the first 5 minutes) caused everyone to receive blank emails (sorry about that one). Oh, and I stopped echoing ALL the item updates to the <a href="http://twitter.com/buylater">twitter stream </a>after the first 20 minutes or so.</p>
<p>I tried to jump into the comments on <a href="http://lifehacker.com/373503/monitor-amazon-products-for-price-drops-and-availability-in-real+time">lifehacker</a>, the <a href="http://consumerist.com/373594/">consumerist.com</a>, and a couple of other blog posts, but since I didn&#8217;t have a preapproved account, my comments don&#8217;t appear to have shown up. Ah well.</p>
<p>After the first bug report got filed by way of Jesse Andrews (who was kind enough to route it back to me), I threw a form up on the front page of the website to collect this priceless feedback. My favorite so far &#8211; apparently the beautiful web2.0 autogenerated logo I was using is &#8220;worse than nothing.&#8221; I wonder what they would think of my Web 2.0 Merit Badge (which I made for the Twitter Color Wars.)</p>
<p><img src="http://farm3.static.flickr.com/2255/2366831519_302e7ea300_o.png" alt="" width="232" height="175" /></p>
<p>So there isn&#8217;t really any summary statement just yet &#8211; tomorrow I&#8217;ll be able to start combing through the feedback, see how many of the users &#8220;stuck&#8221;, and go from there.</p>
<span class="akst_link"><a href="http://www.cognition.ca/?p=54&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_54"  class="akst_share_link">Share This</a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.cognition.ca/2008/03/life-after-lifehackercom-what-to-do-when-your-alpha-leaks.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I Wrote A MashUp, Just for You</title>
		<link>http://www.cognition.ca/2008/03/i-wrote-a-mashup-just-for-you.html</link>
		<comments>http://www.cognition.ca/2008/03/i-wrote-a-mashup-just-for-you.html#comments</comments>
		<pubDate>Sat, 22 Mar 2008 08:15:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[entrepreneurs]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[buylater]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[pricewatch]]></category>
		<category><![CDATA[shopping]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web2.0]]></category>
		<category><![CDATA[wii]]></category>

		<guid isPermaLink="false">http://www.cognition.ca/2008/03/i-wrote-a-mashup-just-for-you.html</guid>
		<description><![CDATA[If you&#8217;re one of those people who stood in &#8220;The Line&#8221;, then this isn&#8217;t for you. If you get a strange, visceral pleasure in wasting hours, even days, of your life, waiting for your local WalMart to get more Beanie Babies in stock &#8211; then you should stop reading right now. If you like to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://buylater.cognition.ca/"><img src="http://buylater.cognition.ca/logo.png" border="0" alt="" hspace="20" vspace="20" width="346" height="197" align="right" /></a>If you&#8217;re one of those people who stood in &#8220;The Line&#8221;, then this isn&#8217;t for you.</p>
<p>If you get a strange, visceral pleasure in wasting hours, even days, of your life, <em>waiting</em> for your local WalMart to get more Beanie Babies in stock &#8211; then you should stop reading right now.</p>
<p>If you like to revisit your local grocery store <em>every night</em>, just to see if they&#8217;ve dropped the price on those great donuts in aisle 4&#8230; then hit the Back Button, and read something else.</p>
<p>But &#8211; if you have a life, and you still want to try and buy something online &#8211; I might have something that can help.</p>
<p>It&#8217;s called <a href="http://buylater.cognition.ca/">BuyLater</a>, and that&#8217;s exactly what it&#8217;s for &#8211; buying Amazon products, later on.</p>
<p>Later can be: When it&#8217;s back &#8220;In Stock&#8221; (can someone say <strong>Wii</strong>?), or simply when it&#8217;s a little cheaper (or even on sale).</p>
<p>Unlike many of my ideas (which are unique, innovative, and incomprehensible), this one actually isn&#8217;t mine. My buddy <a href="http://overstimulate.com">Jesse Andrews</a> did it first, with a Wii-only bot called <a title="WiiMe" href="http://twitter.com/wiime">WiiMe</a>. I just took the idea, and strreeettched it a little.</p>
<span class="akst_link"><a href="http://www.cognition.ca/?p=52&amp;akst_action=share-this"  title="E-mail this, post to del.icio.us, etc." id="akst_link_52"  class="akst_share_link">Share This</a>
</span>]]></content:encoded>
			<wfw:commentRss>http://www.cognition.ca/2008/03/i-wrote-a-mashup-just-for-you.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

