<?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>Rhett's Nullhole</title>
	<atom:link href="http://nullhole.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://nullhole.com</link>
	<description>Where I put my stuff</description>
	<lastBuildDate>Thu, 01 Jul 2010 00:19:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Crisis</title>
		<link>http://nullhole.com/2010/07/01/crisis/</link>
		<comments>http://nullhole.com/2010/07/01/crisis/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 00:18:56 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=79</guid>
		<description><![CDATA[We have a crisis of leadership in America because our overwhelming power and wealth, earned under earlier generations of leaders, made us complacent, and for too long we have been training leaders who only know how to keep the routine going. Who can answer questions, but don’t know how to ask them. Who can fulfill [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>We have a crisis of leadership in America because our overwhelming power and wealth, earned under earlier generations of leaders, made us complacent, and for too long we have been training leaders who only know how to keep the routine going. Who can answer questions, but don’t know how to ask them. Who can fulfill goals, but don’t know how to set them. Who think about <em>how</em> to get things done, but not whether they’re worth doing in the first place. What we have now are the greatest technocrats the world has ever seen, people who have been trained to be incredibly good at one specific thing, but who have no interest in anything beyond their area of exper tise. What we <em>don’t</em> have are leaders.</p></blockquote>
<p><a href="http://www.theamericanscholar.org/solitude-and-leadership/">This</a> is one of the finest things I&#8217;ve read in weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2010/07/01/crisis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>But I WANT to reply!!</title>
		<link>http://nullhole.com/2010/02/16/but-i-want-to-reply/</link>
		<comments>http://nullhole.com/2010/02/16/but-i-want-to-reply/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 03:14:51 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=63</guid>
		<description><![CDATA[The prevalence of the noreply email address is the worst thing to happen to customer service since robo-call
A while back, I signed up for redbubble.com to buy a t-shirt or something. Right away I got this really nice (automated) email that actually seemed personal because it was actually &#8220;from&#8221; someone. It felt like I was [...]]]></description>
			<content:encoded><![CDATA[<p>The prevalence of the noreply email address is the worst thing to happen to customer service since <a title="robo phone" href="http://www.hulu.com/watch/42616/saturday-night-live-robo-phone">robo-call</a></p>
<p>A while back, I signed up for <a href="http://redbubble.com">redbubble.com</a> to buy a t-shirt or something. Right away I got this really nice (automated) email that actually seemed personal because it was actually &#8220;from&#8221; someone. It felt like I was communicating with a person rather than a faceless company. Why thank-you Jason Michaels for welcoming me to this community. But then I realized the &#8216;from&#8217; address is &#8216;noreply&#8217; and I felt duped.</p>
<p>I suppose this happens because of the way companies are organized internally:</p>
<ul>
<li>Marketing is measured by how many people they can engage in the company. So they like to send out emails.</li>
<li>Customer service is measured by how many people DON&#8217;T engage with them. Any additional customer contact is an expense.</li>
</ul>
<p>So the compromise is to send out emails, but do everything you can to keep them one-sided. I wonder how these companies are coping with their twitter/blogs/<a href="http://getsatisfaction.com/">getsatisfaction</a> ?</p>
<p>On a related note, MySpace <a href="http://techcrunch.com/2010/02/12/tom-has-finally-reached-his-myspace-friend-limit/">no longer has a human face</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2010/02/16/but-i-want-to-reply/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anatomy of a regression test</title>
		<link>http://nullhole.com/2009/08/02/anatomy-of-a-regression-test/</link>
		<comments>http://nullhole.com/2009/08/02/anatomy-of-a-regression-test/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 22:01:59 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=70</guid>
		<description><![CDATA[I ran into an issue with the socket module of the python standard library. This always comes as a surprise to me when I find a problem with something as mature as python. But it happens.
My own issue involved having a python based daemon running that does HTTP requests (using httplib) to another service. This [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into an issue with the socket module of the python standard library. This always comes as a surprise to me when I find a problem with something as mature as python. But it happens.</p>
<p>My own issue involved having a python based daemon running that does HTTP requests (using httplib) to another service. This daemon is restarted gracefully by sending SIGTERM, which it catches with a signal handler, finishes up what it was doing and exits. The problem arises if it receives a signal while in a system call, for example while receiving the response from an HTTP request. To correct behavior is to attempt the system call again, however the actual system call is abstracted away, so the caller, or even httplib can&#8217;t re-try.</p>
<p>The crux of the issue is the function readline() provided by a fileobject socket wrapper in socket.py</p>
<pre>
                self._rbuf = StringIO()  # reset _rbuf.  we consume it via buf.
                data = None
                recv = self._sock.recv
                while data != "\n":
                    data = recv(1)
                    if not data:
                        break
                    buffers.append(data)
                return "".join(buffers)
</pre>
<p>I&#8217;m not the first to find this, as this <a href="http://bugs.python.org/issue1628205">issue</a> even has a patch. But, due to the &#8220;test needed&#8221; status, it&#8217;s been siting there getting no attention for quite a while. Well I want it fixed, so let&#8217;s try to write a regression test!</p>
<p>The first step was to apply this patch to an appropriate development branch:</p>
<pre>
  svn co http://svn.python.org/projects/python/branches/release26-maint python26
  cd python26/Lib
  patch -p0 < ~/socket.py.diff
</pre>
<p>Now it turned out, this didn't apply cleanly, as the patch was from an earlier version. But it was easy enough to fix.</p>
<p>Secondly, I need to a test case to Lib/test/test_socket.py<br />
There is already a test case for normal behavior of fileobject, however causing a real socket to generate a EINTR isn't exactly easy. But I just need to test the error handling, this is unit test. Perfect case for using a mock object. Now there arn't any handy mock object libraries in the standard python distribution, so i'll just keep it simple:</p>
<pre>
        class MockSocket(object):
            def __init__(self):
                # Build a generator that returns functions that we'll call and return for each
                # call to recv()
                def raise_error():
                    raise socket.error(errno.EINTR)
                self._step = iter([
                    lambda : "This is the first line\nAnd the sec",
                    raise_error,
                    lambda : "ond line is here\n",
                    lambda : None,
                ])

            def recv(self, size):
                return self._step.next()()
</pre>
<p>Now when I create my test case, I'll just pass this mock socket in and call readline on it.</p>
<pre>
class FileObjectInterruptedTestCase(unittest.TestCase):
    """Test that the file object correctly handles being interrupted by a signal."""
    def setUp(self):
      ... create my mock socket ...

    def test(self):
        fo = socket._fileobject(self._mock_sock)
        self.assertEquals(fo.readline(), "This is the first line\n")
        self.assertEquals(fo.readline(), "And the second line is here\n")
</pre>
<p>Now to find out if this test case will allow this fix to be included......</p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/08/02/anatomy-of-a-regression-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Please take my money!</title>
		<link>http://nullhole.com/2009/06/11/please-take-my-money/</link>
		<comments>http://nullhole.com/2009/06/11/please-take-my-money/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 18:29:32 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=68</guid>
		<description><![CDATA[As both my girlfriend and mother will tell you, I don&#8217;t enjoy talking on the phone.
So I was particularly excited to have these two events transpire today:
The iPhone Upgrade
ATT finally got their act together and enabled their premier site to allow online upgrades to the 3GS. Fantastic, thank you AT&#38;T, you were only a couple [...]]]></description>
			<content:encoded><![CDATA[<p>As both my girlfriend and mother will tell you, I don&#8217;t enjoy talking on the phone.</p>
<p>So I was particularly excited to have these two events transpire today:</p>
<p><strong>The iPhone Upgrade</strong></p>
<p>ATT finally got their act together and enabled their premier site to allow online upgrades to the 3GS. Fantastic, thank you AT&amp;T, you were only a couple of days late. Anyway, I placed the order, goes great, no problems. But then 2 minutes later I get an email:</p>
<blockquote><p>Thank you for your recent purchase on the AT&amp;T Premier Online Store. We&#8217;re pleased that you chose AT&amp;T as your wireless service provider.</p>
<p>Unfortunately, we cannot validate your credit card number. Please call us at your earliest convenience with a different credit or debit card number so we can complete your order: 1-866-499-8008, Monday through Friday, 8 a.m. to 9 p.m. Eastern Time.</p></blockquote>
<p>Oh great, 3 cheers for online ordering. Well I still want my phone so 2 minutes later I&#8217;m on hold listening to the same 8 bars of crappy jazz music playing over and over, interspersed with messages about how much they appreciate my business. Finally, after a full 10 minutes of hold I get to talk to a real person. Of course I have to tell them my phone number, again, I&#8217;ll never understand what the automated system does with the phone number I gave them earlier. She starts looking for orders and can&#8217;t find me.</p>
<p>&#8220;Sorry, it says you&#8217;re still elegible for an upgrade, so the order must have come through yet. Can you call back again in about an hour?&#8221;</p>
<p>Somehow I feel better sending this email reply the no doubt automated email address:</p>
<blockquote><p>I just called, but they couldn&#8217;t find the order.<br />
This is really poor customer service. I order stuff online all the<br />
time, why don&#8217;t other companies have this hard of time. I&#8217;m trying to give you money!!</p></blockquote>
<p><strong>The Amp Assembly</strong></p>
<p>My <a href="http://nullhole.com/2009/05/02/all-hail-the-superior-craftsmanship-of-jbl/">JBL Amp Assembly</a> blew up a few weeks ago. Thankfully, I can buy a replacement part for only $120. So I called up the parts department today, part number in hand, excited to watch Jurrasic Park again and rattle the windows.</p>
<p>&#8220;Let me place that order for you&#8230;&#8230;.Oh, sorry sir, my computer just crashed&#8221;</p>
<p>&#8220;Hmm ok, that sucks.</p>
<p>60 seconds later</p>
<p>&#8220;Sorry sir, I don&#8217;t think this coming back anytime soon. Can I call you back ?&#8221;</p>
<p>Why is this commerce stuff so hard!?!</p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/06/11/please-take-my-money/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>All Hail the Superior Craftsmanship of JBL!</title>
		<link>http://nullhole.com/2009/05/02/all-hail-the-superior-craftsmanship-of-jbl/</link>
		<comments>http://nullhole.com/2009/05/02/all-hail-the-superior-craftsmanship-of-jbl/#comments</comments>
		<pubDate>Sat, 02 May 2009 21:26:47 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[jbl]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=66</guid>
		<description><![CDATA[
It&#8217;s very impressive how quickly after the 1 year warranty on the electronics of my JBL Venue SUB12 decided to melt down. Not sure when it happened exactly, but one day I thought to myself, &#8220;self, there isn&#8217;t much bass going on here anymore, is the subwoofer still on ?&#8221;
RIP Subwoofer, Sept 2007-Sometime in the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://nullhole.com/wp-content/uploads/2009/05/burnt_jbl_sub12.jpg"><img class="aligncenter size-medium wp-image-65" title="Burnt out JBL Venue SUB12" src="http://nullhole.com/wp-content/uploads/2009/05/burnt_jbl_sub12.jpg" alt="" width="300" height="225" /></a></p>
<p>It&#8217;s very impressive how quickly after the 1 year warranty on the electronics of my JBL Venue SUB12 decided to melt down. Not sure when it happened exactly, but one day I thought to myself, &#8220;self, there isn&#8217;t much bass going on here anymore, is the subwoofer still on ?&#8221;</p>
<p><em>RIP Subwoofer, Sept 2007-Sometime in the spring of 2009</em></p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/05/02/all-hail-the-superior-craftsmanship-of-jbl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Disneyland Consumerism FAIL</title>
		<link>http://nullhole.com/2009/03/08/disneyland-consumerism-fail/</link>
		<comments>http://nullhole.com/2009/03/08/disneyland-consumerism-fail/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:46:37 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[travel]]></category>
		<category><![CDATA[disneyland]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=61</guid>
		<description><![CDATA[I was in Disneyland reliving some childhood memories last week. There on a friday, pretty nice weather (especially compared to the endless rain here in SF) and the crowd wasn&#8217;t too bad. 
The memory that will stick with me the best on this trip though is the hour or so Britt and I spent trying to [...]]]></description>
			<content:encoded><![CDATA[<p>I was in Disneyland reliving some childhood memories last week. There on a friday, pretty nice weather (especially compared to the endless rain here in SF) and the crowd wasn&#8217;t too bad. </p>
<p>The memory that will stick with me the best on this trip though is the hour or so Britt and I spent trying to track down a decent sweatshirt. I always assumed that Disneyland was designed for you to spend a whole lot of money once you got into the park. They have this nifty Fastpass system where you can get a pass to come back to a ride, so instead of waiting in line you can go shop.</p>
<p>HOWEVER, it was really difficult to spend money here. Nothing was quite right. Honestly, with so many shops open, all over the park, outside every ride, there was a real shortage of <em>choice</em>. Even though all the shops have a sort of theme, usually related to where in the park they are, 80% of the merchandise was the same in every one of them. </p>
<p>I found two kinda cool unique t-shirts:</p>
<p><a href="http://picasaweb.google.com/rhettg/Disneyland2009#5309587797167878258"><img src="http://lh4.ggpht.com/__A6e1OSiQU0/Sa9x-FnwsHI/AAAAAAAAAS0/I6W03MGRkx0/s200/DSC01359.JPG" alt="DSC01359.JPG" />                         </a><a href="http://picasaweb.google.com/rhettg/Disneyland2009#5309587813931647170"><img src="http://lh3.ggpht.com/__A6e1OSiQU0/Sa9x_EEjgMI/AAAAAAAAAS8/bbEajWJ7bKM/s200/DSC01362.JPG" alt="DSC01362.JPG" /></a></p>
<p>I really dig these retro graphics. However, I&#8217;m not going to wear them on a t-shirt. I want a print or poster with these images. But of course, even looking through the Disney Art Galleries, they don&#8217;t have these ones available.</p>
<p>Disney has a ridiculous amount of IP to draw upon to create merchandise. The rides and unique parts of the parks alone should provide for no shortage of cool ideas for unique gifts you could get only at Disneyland. Somebody is REALLY dropping the ball here. </p>
<p>I do have to applaud Disney for there forward thinking embracing of online retailing. They have licensed lots of their Disney characters and images to <a href="http://www.zazzle.com/disney">Zazzle</a> so you can create your own custom merchandise. But seriously, it should be EASY to spend A LOT of money at Disneyland. But it isn&#8217;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/03/08/disneyland-consumerism-fail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kindle Experience</title>
		<link>http://nullhole.com/2009/03/08/kindle-experience/</link>
		<comments>http://nullhole.com/2009/03/08/kindle-experience/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:29:19 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[reading]]></category>
		<category><![CDATA[books]]></category>
		<category><![CDATA[kindle]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=59</guid>
		<description><![CDATA[I just finished reading my first novel on the new Kindle.
I&#8217;ll admit, I was a little skeptical when I first looked at it, but since I hadn&#8217;t indulged in early adopter syndrome in a while I thought I would just go for it. So far, I&#8217;m pretty impressed. I chose to read, for free, Cory [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished reading my first novel on the new <a href="http://www.amazon.com/gp/product/B00154JDAI?ie=UTF8&amp;tag=rhettsnullhol-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=B00154JDAI">Kindle</a>.</p>
<p>I&#8217;ll admit, I was a little skeptical when I first looked at it, but since I hadn&#8217;t indulged in early adopter syndrome in a while I thought I would just go for it. So far, I&#8217;m pretty impressed. I chose to read, for free, <a href="http://craphound.com/">Cory Doctorow&#8217;s</a> book <a href="http://craphound.com/down/">Down and Out in the Magic Kingdom</a> at the suggestion of a <a href="http://www.plaice.org/">friend of mine</a>. Couldn&#8217;t have been a more perfect choice. One could argue that <a href="http://www.amazon.com/gp/product/0553380966?ie=UTF8&amp;tag=rhettsnullhol-20&amp;link_code=as3&amp;camp=211189&amp;creative=373489&amp;creativeASIN=0553380966">Diamond Age</a> would be more appropriate, but as I had already read that seemed like cheating. </p>
<p>So, two things:</p>
<ol>
<li>Reading on the Kindle is great. I&#8217;ve pretty much been carrying it around with me everywhere I go. It&#8217;s not as easy to slip into a pocket as a small paperback, but it&#8217;s way more convenient for readers such as myself that have trouble dedicating to one book at time. Surprisingly, after a few hours of reading, the distractions that I thought I wouldn&#8217;t get over, including the page turning (weird blinking, kinda slow refresh) actually disappeared in preference to the new found form factor convenience. I like to read in strange positions, and not having to turn physical pages and hold them open really works well.</li>
<li>Down and Out in the Magic Kingdom is an awesome book. I&#8217;m not even a sci-fi fan except for the occasional <a href="http://www.nealstephenson.com/">Neil Stephenson</a>, so I was blown away how much I loved this book. Also, the fact that I downloaded it for free direct from the author is not bad either.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/03/08/kindle-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Future of Advertising</title>
		<link>http://nullhole.com/2009/03/04/future-of-advertising/</link>
		<comments>http://nullhole.com/2009/03/04/future-of-advertising/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 18:53:40 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[interwebs]]></category>
		<category><![CDATA[internet]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=54</guid>
		<description><![CDATA[Brilliant.
]]></description>
			<content:encoded><![CDATA[<p>Brilliant.<br /><a href="http://twitpic.com/1faqu"><img border="0" class="aligncenter" title="Future of Advertising" src="http://s3.amazonaws.com/twitpic/photos/full/2393382.jpg?AWSAccessKeyId=0ZRYP5X5F6FSMBCCSE82&amp;Expires=1236192493&amp;Signature=ysnyVf4PP%2FdG%2B7kaNCepIWKr9Y4%3D" alt="" width="400" height="320" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/03/04/future-of-advertising/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First impressions of couchdb</title>
		<link>http://nullhole.com/2009/02/17/first-impressions-of-couchdb/</link>
		<comments>http://nullhole.com/2009/02/17/first-impressions-of-couchdb/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 09:17:22 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[couchdb]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=51</guid>
		<description><![CDATA[For the last few weeks i&#8217;ve been playing with couchdb. I have not had much time but primarily I wanted to see how it performed for a common task I deal with at work. This is not your common &#8220;write a blog&#8221; or generic web implementation of something. In fact, I really wasn&#8217;t sure if [...]]]></description>
			<content:encoded><![CDATA[<p>For the last few weeks i&#8217;ve been playing with <a href="http://couchdb.apache.org/">couchdb</a>. I have not had much time but primarily I wanted to see how it performed for a common task I deal with at work. This is not your common &#8220;write a blog&#8221; or generic web implementation of something. In fact, I really wasn&#8217;t sure if couchdb was appropriate tool for this job at all. However, it seemed like a really easy tool to use, and perhaps even a poor-man&#8217;s hadoop for playing with map-reduce ideas.</p>
<p><strong>The Problem</strong></p>
<p>Imagine, if you will, daily log files of about 1.2 gigs (about 2.4 million lines). These log files are repr() python structures (and very easily translate into json). The information in them isn&#8217;t very important, but let&#8217;s say for example they detail clicks on a website.</p>
<p>We slice and dice this information in several ways for different reporting purposes. All said and done, I think we process these logs 3 times every night. They take about an 30-45 minutes a piece. The general methodology is to run through the logs totaling up certain values, mapping page types to number of events, etc. Once the counts are generated, we insert them all into MySQL. For some of these we end up wanting other rollup sizes as well&#8230; daily is are highest granularity, but often we roll into weekly and monthly versions as well. In practice, inserting in to the database is often the slowest part and tends to adversely affect other processes also using the database. Let me re-iterate that: Inserting daily and monthly rollup data into the MySQL is annoyingly resource intensive. I&#8217;m not even trying to put the raw data in to report on the fly.</p>
<p>Not an ideal situation, but it&#8217;s working for now.</p>
<p><strong>Couchdb Solution<br />
</strong></p>
<p>My theory was that couchdb could provide all these reporting functions in a much more flexible way than these custom reporting scripts / relational db could do. The hope is that I could just load the raw data into Couchdb, write my views and I&#8217;d be good to go. The big question mark was if couchdb was fast enough to make this feasible</p>
<p><strong>The Setup</strong></p>
<p>After some discussion with some helpful people in the couchdb user mailing list, I arrived at the following setup and performance tweaks:</p>
<ul>
<li>couchdb 9.0a&lt;whatever trunk is&gt; (allegedly MUCH faster than official released versions)</li>
<li>Latest version of Erlang (5.6.5, apparently 5.1, which seems to be the default ubuntu install, is REALLY SLOW)</li>
<li>Effective use of _bulk_docs (sorta awkward way to do uploads in batches. I chose a batch size of 1500 lines)</li>
<li>Generated my own sequential doc ids (auto-generated ids are quite slow as they are not sequential, and we are living in a b-tree world)</li>
</ul>
<p>I&#8217;m using a quad core opteron 2ghz machine, 8 gigs for ram. Storage is an XFS raid volume, but i&#8217;m trying to get more details on this, I *think* it&#8217;s some external scsi raid array.</p>
<p>There was some question as to how parallel processing would affect speeds. There are few possible setups:</p>
<ul>
<li>Single data loader</li>
<li>Multiple data loaders, same db</li>
<li>Multiple data loads, different dbs, different machines (merge with replication ?)</li>
</ul>
<p>I tried the first two, but the 3rd is a bit more complex. I&#8217;d like to try it, but then again I&#8217;m really looking for a solution that is &#8220;good enough&#8221;.</p>
<p><strong>The Result</strong></p>
<p>Single threaded</p>
<p>Base line (running through the logs without inserting into couchdb) was 4:36</p>
<p>it took 33 min, 26 seconds to load 2.4 million rows. On disk, this took 959 megs (which is smaller than the log file the data came from). So that&#8217;s about 1200 rows per second.</p>
<p>Dual Loaders</p>
<p>Base line was 3:23.</p>
<p>Inserting into couchdb, I got it to 19 min, 16 seconds, or about 2000 rows per second.</p>
<p>Note that <em>compaction </em>(the process of reclaiming deleted space, making the datastructure as efficient on disk as possible) resulted in no space savings. It did take about 6 minutes to run though.</p>
<p><strong>Conclusion</strong></p>
<p>Though loading data into couchdb is just the just the start, I feel reasonably comfortable with my results. If having the data in couchdb is as flexible as I&#8217;m hoping, it should be fairly easy to convert these multi-step reporting projects into something a little more manageable (and scalable).</p>
<p>As for using couchdb in general, I&#8217;ve been pretty impressed. The whole thing is refreshingly simple. The JSON/REST interface is super easy to build tools around. Installation wasn&#8217;t really that hard, even with needing to install most everything from source for performance reasons.</p>
<p>The community has been quite supportive and knowledgeable&#8230;. albeit small. This couchdb project isn&#8217;t taking the world by storm quite yet, but it&#8217;s making a lot of progress.</p>
<p>Updates on actually using this data to come&#8230;&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/02/17/first-impressions-of-couchdb/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Quality Follows Popularity</title>
		<link>http://nullhole.com/2009/02/13/quality-follows-popularity/</link>
		<comments>http://nullhole.com/2009/02/13/quality-follows-popularity/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 18:59:56 +0000</pubDate>
		<dc:creator>rhettg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dilbert]]></category>
		<category><![CDATA[philosophy]]></category>
		<category><![CDATA[scott_adams]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://nullhole.com/?p=48</guid>
		<description><![CDATA[I&#8217;ve been a dedicated reader of Scott Adams&#8217; (of Dilbert) blog for quite a while now. Today he put up a post trying to sort out ,mostly from a entertainment/pop culture perspective, how it takes being popular to have to time to make something quality.
So here is the key learning. If you are planning to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a dedicated reader of Scott Adams&#8217; (of Dilbert) blog for quite a while now. Today he put up a post trying to sort out ,mostly from a entertainment/pop culture perspective, how <a href="http://dilbert.com/blog/entry/quality_follows_popularity/">it takes being popular to have to time to make something quality</a>.</p>
<blockquote><p>So here is the key learning. If you are planning to create some business or other form of entertainment, you will need quality at some point to succeed. But what is more important than quality in the beginning is some intangible element that makes your project inherently interesting before anyone has even sampled it. That initial audience will give you the luxury of time to create quality.</p></blockquote>
<p>I&#8217;ve heard this principle described in different ways in the software world: &#8220;Ship early and often.&#8221; But it&#8217;s interesting to hear this so well generalized.</p>
<p>On a related note, while reading this blog post at work, my CEO stood up and announced he just received a signed Dilbert cartoon from Scott Adams. More evidence, as Scott Adams says, that <a href="http://www.dilbert.com/blog/entry/testing_the_illusion_hypothesis/">life could be an illusion</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nullhole.com/2009/02/13/quality-follows-popularity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
