<?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>chrisstreeter.com &#187; Technology</title>
	<atom:link href="http://www.chrisstreeter.com/archive/category/technology/feed" rel="self" type="application/rss+xml" />
	<link>http://www.chrisstreeter.com</link>
	<description>Chris Streeter&#039;s location on the Internet.</description>
	<lastBuildDate>Wed, 01 Sep 2010 05:36:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>DD-WRT and an Airport Express</title>
		<link>http://www.chrisstreeter.com/archive/2010/06/487/dd-wrt-and-an-airport-express</link>
		<comments>http://www.chrisstreeter.com/archive/2010/06/487/dd-wrt-and-an-airport-express#comments</comments>
		<pubDate>Tue, 22 Jun 2010 19:18:33 +0000</pubDate>
		<dc:creator>Streeter</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[airport express]]></category>
		<category><![CDATA[ddwrt]]></category>
		<category><![CDATA[linksys]]></category>
		<category><![CDATA[wifi]]></category>
		<category><![CDATA[wireless]]></category>
		<category><![CDATA[wpa]]></category>
		<category><![CDATA[wpa2]]></category>
		<category><![CDATA[wrt54gl]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/?p=487</guid>
		<description><![CDATA[I&#8217;ve got a several year old Linksys WRT54GL wireless router that I use for my home network. Ever since I&#8217;ve had the router, I&#8217;ve been running DD-WRT on it, which is great. The new firmware is super stable, has a great number of additional features I use constantly (DDNS, static DNS leases), but I have [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a several year old Linksys WRT54GL wireless router that I use for my home network. Ever since I&#8217;ve had the router, I&#8217;ve been running <a href="http://www.dd-wrt.com/">DD-WRT</a> on it, which is great. The new firmware is super stable, has a great number of additional features I use constantly (DDNS, static DNS leases), but I have had a lot of trouble recently trying to get my Airport Express to connect to the network. For security, I use WPA2 Personal encryption on my network. Now, I&#8217;m not tyring to set up a WDS network, which, <a href="http://www.dd-wrt.com/wiki/index.php/WDS#Apple_Airport_Express">from the documentation</a>, is a mixed bag to get working. So, after lots of fiddling, and lots of resetting of the Airport Express, I finally got it to work. Here is what I did.</p>
<p>I&#8217;m running DD-WRT v24-sp1 on my Linksys WRT54GL v1.1 with an Airport Express running the latest 6.3 firmware. On the WRT54GL, I set the wireless security mode to WPA2 Personal and the WPA Algorithm set to TKIP. On the Airport Express, I told it to join my existing network with wireless security of WPA/WPA2 Personal. Doing all this, and I can now stream music to my stereo.</p>
<p>I&#8217;m sure someone else will find this information useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2010/06/487/dd-wrt-and-an-airport-express/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GCalendar Reminders</title>
		<link>http://www.chrisstreeter.com/archive/2010/01/451/gcalendar-reminders</link>
		<comments>http://www.chrisstreeter.com/archive/2010/01/451/gcalendar-reminders#comments</comments>
		<pubDate>Sun, 17 Jan 2010 19:30:11 +0000</pubDate>
		<dc:creator>Streeter</dc:creator>
				<category><![CDATA[Site]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[google app engine]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[birthdays]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[google calendar]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/?p=451</guid>
		<description><![CDATA[Google recently added the ability to create a birthday calendar. However, Google didn&#8217;t give one the ability to send reminders for the events on that calendar. This is the same thing that Apple has done for years with their Address Book and iCal integration. And I hate missing someone&#8217;s birthday when I don&#8217;t happen to [...]]]></description>
			<content:encoded><![CDATA[<p>Google recently added the ability to create a <a href="http://googlesystem.blogspot.com/2009/07/birthday-calendar-for-google-contacts.html" target="_blank">birthday calendar</a>. However, Google didn&#8217;t give one the ability to send reminders for the events on that calendar. This is the same thing that Apple has done for years with their <a href="http://discussions.apple.com/thread.jspa?threadID=1613442" target="_blank">Address Book and iCal</a> integration. And I hate missing someone&#8217;s birthday when I don&#8217;t happen to look at my calendar that day.</p>
<p>I saw this as an opportunity for improvement. I also saw this an opportunity to learn about <a href="https://appengine.google.com/">Google App Engine</a>. So I wrote a python application that lets you schedule email reminders for the Contacts Birthday Calendar. In addition, you can select a specific hour in a specific time-zone to send the reminders at as well. The application use&#8217;s the Google App Engine user authentication and the Google Data <a href="http://code.google.com/apis/accounts/docs/AuthSub.html" target="_blank">AuthSub</a> permission request API to get upcoming events for display and email reminders.</p>
<p>This gave me some good experience with Google App Engine&#8217;s scheduled tasks and Task Queues, as well as a chance to hone up on my Python. Without further ado, I present <a title="GCalendar Reminders" href="http://gcalendar-reminders.appspot.com/" target="_blank">GCalendar Reminders</a>. Feel free to use it to send yourself emails using the security of Google App Engine.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2010/01/451/gcalendar-reminders/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Benchmarking Redis and PRedis</title>
		<link>http://www.chrisstreeter.com/archive/2010/01/434/benchmarking-redis-and-predis</link>
		<comments>http://www.chrisstreeter.com/archive/2010/01/434/benchmarking-redis-and-predis#comments</comments>
		<pubDate>Sat, 16 Jan 2010 06:51:37 +0000</pubDate>
		<dc:creator>Streeter</dc:creator>
				<category><![CDATA[Redis]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[benchmarking]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[predis]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/?p=434</guid>
		<description><![CDATA[At work, I recently was tasked with looking into some NoSQL solutions for upcoming projects. For various reasons, I focused on the open source Redis project. Redis looks to be adding new features quickly and seemed to be a great potential solution. I then started looking into PHP clients as our current environment is mostly [...]]]></description>
			<content:encoded><![CDATA[<p>At work, I recently was tasked with looking into some <a href="http://en.wikipedia.org/wiki/NoSQL" target="_blank">NoSQL</a> solutions for upcoming projects. For various reasons, I focused on the <a title="Redis" href="http://code.google.com/p/redis/" target="_blank">open source Redis</a> project. Redis looks to be adding new features quickly and seemed to be a great potential solution.</p>
<p>I then started looking into PHP clients as our current environment is mostly PHP. We require that the client support <a href="http://en.wikipedia.org/wiki/Consistent_hashing" target="_blank">consistent hashing</a>, and, from a quick search, a couple turned up. <a title="PRedis" href="http://github.com/nrk/predis/" target="_blank">PRedis</a> seemed to offer the most potential, and after some quick tests, also seemed to offer the greatest performance. So I set up a more elaborate benchmark of the the client and server package.</p>
<p>My test setup involved using 5 servers with between 2 and 5 enabled at a time on the clients (ie. I disabled up to 3 of the servers in the client configurations). For performance, I configured the servers to never write to disk, though periodically syncing to disk should not cause too much of a performance loss. In fact performance was most greatly affected by forcing an fsync after every write. I then had 9 other client boxes running the same code base, with all 9 enabled for each test.</p>
<p>Each client would start a master PHP process that forked 20, 30 or 40 child processes to simulate greater and greater load. Each forked PHP process then did 10,000 SETs on random keys with 4 byte payloads (early tests showed that payload size didn&#8217;t drastically affect the results). I was using the <a href="http://github.com/nrk/predis/tree/php5.2_backport" target="_blank">PHP 4.2.6 branch of the PRedis client</a>, and had optimized it a bit so that it did fewer counts of the consistent hash array. I made the optimizations based on some results after profiling the code. I then had the master PHP process on each box repeat the test 5 times to help to average the test results.</p>
<p>I used dsh to start the test simultaneously on all the clients, timing how long it took the dsh process to start and finish executing. This was the amount of time it took to execute (5 repeats) * (9 client boxes) * (20, 30 or 40 client processes / box) * (10,000 requests) = X total requests. I then graphed the results below.</p>
<div id="attachment_441" class="wp-caption aligncenter" style="width: 483px"><a href="http://www.chrisstreeter.com/wp-content/uploads/2010/01/redis.png"><img class="size-full wp-image-441 " title="Graphing Requests / Second With Redis and PRedis" src="http://www.chrisstreeter.com/wp-content/uploads/2010/01/redis.png" alt="Graphing Requests / Second With Redis and PRedis" width="473" height="267" /></a><p class="wp-caption-text">Graphing Requests / Second With Redis and PRedis</p></div>
<p>This ended up showing that with 9 clients, going up to 4 servers was the point of diminishing returns. Adding the fifth server (with that client box count) did not increase throughput, but rather, the throughput went down. The reason for this is most likely a combination of network interface contention on each client and higher overhead from consistent hashing. So with 9 clients, I found that the sweet spot, with my setup, was 4 servers. By adding more clients, along with more servers, the throughput would increase, instead of the decrease I was starting to see.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2010/01/434/benchmarking-redis-and-predis/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>GMail IMAP Backup With mbsync on Ubuntu</title>
		<link>http://www.chrisstreeter.com/archive/2009/04/305/gmail-imap-backup-with-mbsync-on-ubuntu</link>
		<comments>http://www.chrisstreeter.com/archive/2009/04/305/gmail-imap-backup-with-mbsync-on-ubuntu#comments</comments>
		<pubDate>Fri, 01 May 2009 07:56:06 +0000</pubDate>
		<dc:creator>Streeter</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[isync]]></category>
		<category><![CDATA[mbsync]]></category>
		<category><![CDATA[streeter]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/?p=305</guid>
		<description><![CDATA[Well, it sure has been a while since my last post on here. So I thought I&#8217;d kick it off with a discussion of how I went about getting my email backed up. First, a description of my situation. I run all my email through GMail. I enjoy the interface and the fact that it [...]]]></description>
			<content:encoded><![CDATA[<p>Well, it sure has been a while since my last post on here. So I thought I&#8217;d kick it off with a discussion of how I went about getting my email backed up.</p>
<p>First, a description of my situation. I run all my email through GMail. I enjoy the interface and the fact that it is a cloud service; I can access my email seamlessly on my phone, my home computer, my work computer, some other computer, etc. However, I don&#8217;t want to lose all that information. Google is great, but who is to say that something terrible won&#8217;t happen and some (or all) of my mail is lost? So I wanted to setup some sort of backup. And then once I got that setup, make it automated.</p>
<p>At home, I run an <a href="http://www.ubuntu.com/">Ubuntu</a> box, that I just upgraded to 9.04, <a href="http://www.ubuntu.com/news/ubuntu-9.04-desktop">Jaunty Jackalope</a>. This machine primarily serves as a media box, hosting video that <a href="http://pytivo.armooo.net/">streams to my Tivo</a> off the 1.5TB RAID 5 array. I also use it as a <a href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/">network mounted TimeMachine</a> box as well. Since I have extra storage on it, I figured I&#8217;d get something to sync my mail over IMAP periodically, and then I have a nice little backup.</p>
<p>After some searching, I came across <a href="http://el-tramo.be/blog/gmail-mbsync">two</a> <a href="http://blog.rectalogic.com/2007/11/automated-gmail-backup-via-imap.html">sites</a> that had instructions using the utility <a href="http://isync.sourceforge.net/mbsync.html">mbsync</a> (<a href="http://isync.sourceforge.net/">formerly isync</a>). I found that following the instructions worked pretty well, though I had to customize the patch provided to get it to work with the version provided by Ubuntu.  And then I thought I&#8217;d detail my steps here for others to see.<br />
<span id="more-305"></span></p>
<ol>
<li>First, enable IMAP in your GMail account.</li>
<li>Install the dependencies for mbsync:
<pre>sudo apt-get install libc6 libdb4.2 libssl0.9.8</pre>
</li>
<li>Get the source for mbsync on Ubuntu with:
<pre>sudo apt-get source isync</pre>
<p>This will download the source for mbsync and create a directory (in your current directory) named isync-1.0.4 (Yes, I know it is called isync. That is a legacy name).</li>
<li>Now the normal mbsync install works just fine. However, it doesn&#8217;t support recursive directories. I use GMail labels setup to provide a hierarchy using forward slashes. It turns out that the fix to get mbsync to support directories like this is really easy to do and someone went through the trouble to get it to work. However, it doesn&#8217;t quite work on the version of the code packaged with Ubuntu. So I had to modify the patch a bit. The patch I created can be found <a href="http://www.chrisstreeter.com/wp-content/uploads/2009/04/recursive_imap_ubuntu.patch">here</a>.  Download it and put it somewhere on your system. To apply the patch, change directories into the isync-1.0.4 directory that was just downloaded and run:
<pre>patch -p1 &lt; /path/to/patch/file/recursive_imap_ubuntu.patch</pre>
<p>Once you&#8217;ve patched the directory, configure (<code>./configure</code>), build (<code>make</code>) and install (<code>sudo make install</code>).</li>
<li>Now you should have an executable <code>mbsync</code> in your path. So it is time to start preparing to do the initial sync. Choose a place to store your backups. I chose <code>/export/backups/mail/</code></li>
<li>We want to connect to Google securely which means you&#8217;ll need the latest SSL certificates. To get those, use the openssl client on your machine. Run:
<pre>openssl s_client -connect imap.gmail.com:993 -showcerts</pre>
<p>which should show two blocks of</p>
<pre>-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----</pre>
<p>in the output. You&#8217;ll want to take each block (including the BEGIN/END CERTIFICATE lines), and put each of them into their own file. I put the first one in a file <code>gmail.crt</code> and the second one in the file <code>google.crt</code> (since the first signs imap.gmail.com which is signed by Google Internet Authority, the second certificate).</li>
<li>The second certificate, the one for the Google Internet Authority, is signed by Equifax. So we&#8217;ll need Equifax&#8217;s certificate also. An as it turns out, Ubuntu has a copy of Equifax&#8217;s certificate already sitting in the repositories. Just run
<pre>sudo apt-get install ca-certificates</pre>
<p>to get the latest CA certificates. After installing the CAs, Equifax&#8217;s CA sits at <code>/usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt</code>, which we&#8217;ll need in the configuration file in the next step.</li>
<li>Now we can write the configuration file we are going to use. Here is a copy of mine:
<pre>IMAPAccount gmail
Host imap.gmail.com
User <em>yourusername@gmail.com</em>
UseIMAPS yes
CertificateFile /export/backups/mail/gmail.crt
CertificateFile /export/backups/mail/google.crt
CertificateFile /usr/share/ca-certificates/mozilla/Equifax_Secure_CA.crt

IMAPStore gmail-remote
Account gmail

MaildirStore gmail-local
Path /export/backups/mail/gmail/
Inbox /export/backups/mail/gmail/Inbox

Channel gmail
Master :gmail-remote:
Slave :gmail-local:
# Exclude everything under the internal [Gmail] folder, except the interesting folders
Patterns * ![Gmail]* "[Gmail]/Sent Mail" "[Gmail]/Starred" "[Gmail]/All Mail"
Create Slave
Sync Pull
SyncState *</pre>
<p>Check out the Patterns line. That is where you would include or exclude various labels. All lables are stored at the root of the hierarchy, with the special directory [Gmail] having things like &#8216;Sent Mail&#8217;, &#8216;Spam&#8217;, &#8216;Starred&#8217;, etc in it. I wanted to exclude all the items in the [Gmail] directory except for the ones listed. The &#8216;*&#8217; at the beginning includes all other labels. You will also want to change the Path and Inbox lines to point to your mail location, as well as the first two CertificateFile lines. Also, be sure to enter your actual GMail login on the User line. Now save this file somewhere. Note: saving it as ~/.mbsyncrc will cause it to be automatically loaded when mbsync is run, meaning you don&#8217;t need to specify which config file with the -c option.</li>
<li>Now go ahead and test it out by listing the labels in your account with the command <code>mbsync -l -c /path/to/the/configfile.rc gmail</code>. Running it will look like this and ask you for your password:
<pre>[streeter@scout]:~$ mbsync -l -c ~/.mbsyncrc gmail
Reading configuration file /home/streeter/.mbsyncrc
Resolving imap.gmail.com... ok
Connecting to 209.85.199.109:993... ok
Connection is now encrypted
Logging in...
Password (<em>yourusername@gmail.com</em>@imap.gmail.com):
Channel gmail
lists/code
bills
archive/cron
archive/classes
archive/work
[Gmail]/Starred
[Gmail]/Sent Mail
[Gmail]/All Mail
INBOX
@followup
[streeter@scout]:~$</pre>
<p>If you see something like this, then it worked! Now just go ahead and start your first mail download with <code>mbsync -c /path/to/the/configfile.rc gmail</code> And then you get to wait while it finishes which can take a while depending on how much mail you have.</li>
</ol>
<p>You can go an extra step and save your password in the file. If you add the line <code>Pass <em>yourpasswordhere</em></code> right after the User line, you won&#8217;t be asked for your password and can then setup a cronjob to automatically keep mail locally on a schedule. However, your password for your Google Account then is stored in cleartext on your machine. So only do this is you absolutely know what you are doing and who can access the machine.</p>
<p>Hopefully this becomes useful for people.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2009/04/305/gmail-imap-backup-with-mbsync-on-ubuntu/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Cache Miss</title>
		<link>http://www.chrisstreeter.com/archive/2008/08/201/cache-miss</link>
		<comments>http://www.chrisstreeter.com/archive/2008/08/201/cache-miss#comments</comments>
		<pubDate>Sat, 09 Aug 2008 08:30:33 +0000</pubDate>
		<dc:creator>Streeter</dc:creator>
				<category><![CDATA[GPS]]></category>
		<category><![CDATA[Site]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[streeter]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/?p=201</guid>
		<description><![CDATA[I posted on the 5th about how the travel page now shows all my travels.  Well, I also mentioned that the page loads really slow.  I&#8217;m happy to say that I greatly improved the processing bottleneck that existed.  I implemented caching which has sped things up considerably.  Previously, the travel page took ~7 seconds.  The [...]]]></description>
			<content:encoded><![CDATA[<p>I <a title="Worldly Travels" href="http://www.chrisstreeter.com/archive/2008/08/195/worldly-travels">posted on the 5th</a> about how the <a title="Streeter's Travels" href="http://www.chrisstreeter.com/travel">travel page</a> now shows all my travels.  Well, I also mentioned that the page loads really slow.  I&#8217;m happy to say that I greatly improved the processing bottleneck that existed.  I implemented caching which has sped things up considerably.  Previously, the travel page took ~7 seconds.  The average time from start to finish of script execution on the page was 7.223 seconds, which is crazy long.  I even saw execution times over 10 seconds!  After turning on caching, I&#8217;m now seeing times from .572 to .7 seconds.  This is a 10x improvement, and I know I can do even better, especially since this was a quick first pass at improving the page rendering time.  Hopefully visitors to the travel pages will no longer notice that it is my side being slow, rather it&#8217;ll be the javascript and google maps servers that are slowing down the page load.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2008/08/201/cache-miss/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finals Season</title>
		<link>http://www.chrisstreeter.com/archive/2005/05/122/finals-season</link>
		<comments>http://www.chrisstreeter.com/archive/2005/05/122/finals-season#comments</comments>
		<pubDate>Sun, 15 May 2005 21:00:00 +0000</pubDate>
		<dc:creator>Streeter</dc:creator>
				<category><![CDATA[School]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[streeter]]></category>

		<guid isPermaLink="false">http://www.chrisstreeter.com/wordpress/?p=122</guid>
		<description><![CDATA[Well, my 3rd year as a Cal student is about to end. I&#8217;m in the middle of finals, 1 down, with three to go, and I&#8217;m getting antsy for summer. To study for the finals, I worked for about 45 minutes the other day trying to get an applescript to work correctly in Adium, my [...]]]></description>
			<content:encoded><![CDATA[<p>Well, my 3rd year as a Cal student is about to end.  I&#8217;m in the middle of finals, 1 down, with three to go, and I&#8217;m getting antsy for summer.</p>
<p>To study for the finals, I worked for about 45 minutes the other day trying to get an applescript to work correctly in Adium, my AIM client.  The goal was to be able to pass the applescript call, in Adium, arguments, and get a live countdown til some time.  However, I was having a real hard time figuring this out.  I eventually gave up, and hard coded the dates into the shell script.  Which isn&#8217;t as cool and versatile as I had originally planned.  In fact, it wasn&#8217;t any cooler than the one I had before, just that it worked better.  Now I can specify any date, not just one that is in the current month.  My current away message has been of the sorts: &#8220;4 days 11 hours 22 minutes left until summer&#8221;, the time my last final ends.  So, if anybody does read this, and is also talks to me on AIM, know this:  if I have my away message up, I&#8217;m probably there.  I sign off when I leave (usually).  And, if I&#8217;m idle, that also means I&#8217;m probably there.  With Adium, you can set your own custom idle, and you can still talk to people maintaining your idle and awayness.  Adium is really cool and I&#8217;d actually like to try to get into some of the development.  They&#8217;re pro mac, develop an app I frequently use and enjoy, and would give me valuable experience in Cocoa, and a large project.  But thats probably a while away.  Anyways, time to begin studying again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.chrisstreeter.com/archive/2005/05/122/finals-season/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
