<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
    <channel>
        <title>Structure 28</title>
        <link>http://www.structure28.com/blog/</link>
        <description>infrastructure with purpose</description>
        <language>en-US</language>
        <copyright>Copyright 2010</copyright>
        <lastBuildDate>Fri, 15 May 2009 13:58:17 -0800</lastBuildDate>
        <generator>http://www.sixapart.com/movabletype/</generator>
        <docs>http://www.rssboard.org/rss-specification</docs>
        
        <item>
            <title>On the danger of memcache as the one protocol to rule them all</title>
            <description><![CDATA[At <a href="http://www.othersonline.com/">OthersOnline</a> we make heavy use of memcached, <a href="http://memcachedb.org/">memcachedb</a> and <a href="http://memcachedb.org/memcacheq/">memcacheq</a>. While in general all of these work and work well, we're learning that many of the memcache client libraries (we're using <a href="http://github.com/dustin/java-memcached-client/tree/master">spy</a>) may have been developed with the assumption that the backend you are interacting with operates as a cache.<br /><br />Individual messages may or may not be treated as the precious, valuable nuggets of data that no doubt they are. Individual backends may be assumed down for lengthy periods of time regardless of actual state. While in general I like memcacheq and would love to try out kestrel, the fact that both rely on a memcache client library gives me pause.<br />]]></description>
            <link>http://www.structure28.com/blog/2009/05/on-the-danger-of-memcache-as-t.html</link>
            <guid>http://www.structure28.com/blog/2009/05/on-the-danger-of-memcache-as-t.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">developer</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">memcache</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">memcachedb</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">memcacheq</category>
            
            <pubDate>Fri, 15 May 2009 13:58:17 -0800</pubDate>
        </item>
        
        <item>
            <title>Is it really that hard to track the depth of a queue</title>
            <description><![CDATA[If you are going to write <a href="http://java.sun.com/products/jms/">a</a> <a href="http://memcachedb.org/memcacheq/">queue</a> <a href="http://java.sun.com/javase/6/docs/api/java/util/concurrent/ExecutorService.html">service</a>, for frack's sake please include a getQueueSize() method in the API. Make it fast and make it an estimate if you have to, just get 'er done.<br />]]></description>
            <link>http://www.structure28.com/blog/2009/05/is-it-really-that-hard-to-trac.html</link>
            <guid>http://www.structure28.com/blog/2009/05/is-it-really-that-hard-to-trac.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">developer</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">java</category>
            
            
            <pubDate>Fri, 08 May 2009 13:03:17 -0800</pubDate>
        </item>
        
        <item>
            <title>Short notes on using Xen with Debian lenny</title>
            <description><![CDATA[ <ul>

	<li>documentation <a href="http://www.howtoforge.com/virtualization-with-xen-on-debian-lenny-amd64">here</a> largely works</li>
	<li>install the udev package inside domU</li>
	<li>comment out the existing getty lines in /etc/inittab and add <i>1:2345:respawn:/sbin/getty 38400 hvc0</i></li>
</ul>]]></description>
            <link>http://www.structure28.com/blog/2009/02/short-notes-on-using-xen-with.html</link>
            <guid>http://www.structure28.com/blog/2009/02/short-notes-on-using-xen-with.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">xen</category>
            
            
            <pubDate>Tue, 17 Feb 2009 21:54:44 -0800</pubDate>
        </item>
        
        <item>
            <title>Installing Solaris Indiana as Xen domU (guest) on Ubuntu</title>
            <description><![CDATA[<h3>Why?</h3>
<p>If you have any sense, you've already virtualized your DC. And if you have a lack of cents, you've standardized on Xen based on a commodity Linux like Debian, Ubuntu, Centos/Red Hat or openSUSE/SLES. Solaris/ZFS still fits well in that environment as an iscsi or nfs server.</p>
<p>Plus, it's cool.</p>

<h3>Prerequisites</h3>
<p>I'm assuming you already have a working Xen 3 install on Linux, and that you have some familiarity with creating and running Xen guests. I'm using Ubuntu 7.10 and the xen-hypervisor-3.1 package. Here's <a href="http:///blog/2008/02/building-a-kick-ass-do-everything-low-power-home-server.html" title="Building a kick-ass, low power, do everything home server">details on the hardware</a>.</p>

<h3>Getting down to business</h3>
<ol>
  <li>Download the iso from <a href="http://www.opensolaris.com/get/index.html" title="OpenSolaris download">http://www.opensolaris.com/get/index.html</a></li>

  <li>Mount the iso in your dom0: <i>mount -o loop os200805.iso /mnt</i></li>

  <li>Copy the install kernel and ramdisk into your dom0 file system:
   <blockquote>cp /mnt/platform/i86xpv/kernel/amd64/unix /home/xen/kernels/sol-indiana/unix<br/>
cp /mnt/boot/x86.microroot /home/xen/kernels/sol-indiana/x86.microroot</blockquote>
  </li>

  <li>Create a xen conf file for the installation. It should look something like this, and dear god please change /dev/changeme to a meaningful block device on your system. Bonus points for using a different mac address.
   <blockquote>name = 'solaris-indiana'<br/>
memory = '1024'<br/>
disk =  [ 'file:/dev/changeme,0,w', 'file:/home/xen/iso/os200805.iso,6:cdrom,r' ]<br/>
kernel = '/home/xen/kernels/sol-indiana/unix'<br/>
ramdisk = '/home/xen/kernels/sol-indiana/x86.microroot'<br/>
extra = '/platform/i86xpv/kernel/amd64/unix - nowin -B install_media=cdrom'<br/>
vif  = [ 'mac=00:16:3e:0c:61:50,bridge=xenbr0' ]
   </blockquote>
  </li>

  <li>Start the domain:
   <blockquote>xm create -c sol-indiana-install.cfg</blockquote>
  </li>

  <li>Select keyboard layout, then your language</li>

  <li>Login as jack/jack</li>

  <li>Type <i>ifconfig -a</i> to find your ip address assigned by dhcp</li>

  <li>Login remotely with <i>ssh -X jack@[ip address]</i></li>

  <li>Start the install process: <i>su root -c gui-install</i> (when prompted the root password is 'opensolaris')</li>

  <li>Go through the install process, and at the end choose quit rather than reboot</li>

  <li>Use scp to copy boot_archive to dom0 disk:
   <blockquote>scp /a/platform/i86pc/amd64/boot_archive root@[dom u ip address]:/home/xen/kern
els/sol-indiana/boot_archive</blockquote>
  </li>

  <li>Shutdown the solaris instance: <i>su root -c 'halt'</i></li>

  <li>Create a new config file (sol-indiana.cfg):
   <blockquote>name = 'solaris-indiana'<br/>
memory = '1024'<br/>
disk =  [ 'file:/dev/changme,0,w' ]<br/>
kernel = '/home/xen/kernels/sol-indiana/unix'<br/>
ramdisk = '/home/xen/kernels/sol-indiana/boot_archive'<br/>
extra = '/platform/i86xpv/kernel/amd64/unix -B zfs-bootfs=rpool/27'<br/>
vif  = [ 'mac=00:16:3e:0c:61:50,bridge=xenbr0' ]</blockquote>
  </li>

  <li>Start it back up: <i>xm create -c sol-indiana.cfg</i></li>

</ol>

<p>
<div class="posttagsblock"><a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/solaris" rel="tag">solaris</a>, <a href="http://technorati.com/tag/xen" rel="tag">xen</a>, <a href="http://technorati.com/tag/zfs" rel="tag">zfs</a></div>]]></description>
            <link>http://www.structure28.com/blog/2008/07/installing-solaris-indiana-as.html</link>
            <guid>http://www.structure28.com/blog/2008/07/installing-solaris-indiana-as.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">solaris</category>
            
                <category domain="http://www.sixapart.com/ns/types#category">zfs</category>
            
            
            <pubDate>Mon, 28 Jul 2008 10:04:11 -0800</pubDate>
        </item>
        
        <item>
            <title>Saving Strategy from the Strategists</title>
            <description><![CDATA[<p>Umair Haque: <a href="http://discussionleader.hbsp.com/haque/2008/07/saving_strategy_from_the_strat.html" title="Saving Strategy from the Strategists">Saving Strategy from the Strategists</a>.</p>

<div class="posttagsblock"><a href="http://technorati.com/tag/business" rel="tag">business</a></div>]]></description>
            <link>http://www.structure28.com/blog/2008/07/saving-strategy-from-the-strat.html</link>
            <guid>http://www.structure28.com/blog/2008/07/saving-strategy-from-the-strat.html</guid>
            
            
            <pubDate>Wed, 16 Jul 2008 09:02:50 -0800</pubDate>
        </item>
        
        <item>
            <title>Best practices with EC2 and RightScale</title>
            <description><![CDATA[<p>I've been doing some client work lately on the <a href="http://www.rightscale.com/" title="RightScale">RightScale</a> platform and wanted to share my thoughts.</p>

<p>First, things that you should do:</p>
<ul>
  <li><strong>Accept the way that RightScale does thing</strong>s. So yeah, maybe you might prefer nginx or lighttpd or whatever the kids are using these days for a load balancer. Too bad. Don't waste your time reproducing the work that RightScale has already done.</li>

  <li><strong>Use dnsmadeeasy.com for dns</strong>. The first thing you'll need moving to the cloud is a dns provider with a simple api and flexibility to set low ttl values. The integration between RightScale and dnsmadeeasy works beautifully. Use it.</li>

  <li><strong>Use svn or git rather than attachments</strong>. The most important RightScript we have is one of the simplest... it installs the subversion package and does an svn checkout into /usr/local/&lt;abc&gt;. Later scripts and tools, etc. can rely on the presence of your code, tools and configuration in that directory.</li>

  <li><strong>Setup arrays for auto-scaling of your app servers</strong>. Arrays seem to fit best at the app tier - you probably don't want to automate new database instances, and you probably don't need to automate new load balancers.</li>

  <li><strong>Use <a href="http://ganglia.info/" title="Ganglia">ganglia</a> or similar for usage metrics</strong>. You'll need good data to make good decisions. Add some custom metrics to your monitoring system and you'll have more data than you know what to do with.</li>
</ul>

<img src="/static/2008/07/09/gallant-lolcat.jpg" width="300" height="255" style="vertical-align:middle"/>

<p>Things you should <strong>not</strong> do:</p>

<ul>
  <li><strong>Do</strong> <em><strong>everything</strong></em> <strong>the RightScale way</strong>. Nobody in their right mind is going to use the RightScale tomcat image with the Centos default install of tomcat 5. It sucks and it will be totally different from the tomcat install that you used for development. If you can do something better than RightScale without spending too much time on it, go ahead.</li>

  <li><strong>Count on auto scaling to save your butt</strong>. You should know that ec2 instances can take as long as 15 minutes to start up. Add in time for RightScale initialization, your code initialization, etc... and by the time you have a few more servers up and running the internets will probably be on to a competing <a href="http://en.wikipedia.org/wiki/Lolcat" title="Wikipedia entry on lolcats">lolcat</a> site.</li>

  <li><strong>Rely on a 100% success rate with S3</strong>. S3 fails. That's life. And when s3 fails, RightScale can fail, causing your images to come up "stranded in booting." Yet another reason not to count on auto scaling.</li>

  <li><strong>Heavily use RightScale attachments</strong>. Your custom RightScripts can have arbitrary files associated with them. For example, you might have a script that would install ganglia and configure /etc/gmond.conf, and you might be tempted to use an attachment for /etc/gmond.conf. Attachments might be appropriate once in a while but in general they suck for version control, patching and code reuse. Our advice: use S3 for large files, svn/git for text and RightScale attachments only rarely.</li>
</ul>

<img src="/static/2008/07/09/goofus-lolcat.jpg" width="300" height="299" style="vertical-align:middle"/>

<br clear="all"/>

<p>Bottom line, is it worth the cost? It depends. Don't expect RightScale to displace the need for a good sys admin, but it just might save you some time every month. At $500/mo. the relevant question is whose time will it displace and how valuable is their time.</p>
<div class="posttagsblock"><a href="http://technorati.com/tag/ec2" rel="tag">ec2</a>, <a href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a href="http://technorati.com/tag/scaling" rel="tag">scaling</a></div>]]></description>
            <link>http://www.structure28.com/blog/2008/07/best-practices-with-ec2-and-ri.html</link>
            <guid>http://www.structure28.com/blog/2008/07/best-practices-with-ec2-and-ri.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">linux</category>
            
            
            <pubDate>Wed, 09 Jul 2008 12:08:53 -0800</pubDate>
        </item>
        
        <item>
            <title>SOA with Apache Synapse</title>
            <description><![CDATA[<a href="http://www.slideshare.net/pizak/fast-soa-with-apache-synapse/">Fast SOA with Apache Synapse</a>. Nice. Meaning to peek into synapse when I have a chance.<br />
<br />
Good luck getting anywhere in the market without tools tho... and we all know how much oss developers love to build nice gui tools.

<div class="posttagsblock"><a href="http://technorati.com/tag/development" rel="tag">development</a>, <a href="http://technorati.com/tag/java" rel="tag">java</a></div>]]></description>
            <link>http://www.structure28.com/blog/2008/06/soa-with-apache-synapse.html</link>
            <guid>http://www.structure28.com/blog/2008/06/soa-with-apache-synapse.html</guid>
            
                <category domain="http://www.sixapart.com/ns/types#category">java</category>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">development</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">java</category>
            
            <pubDate>Wed, 25 Jun 2008 17:49:08 -0800</pubDate>
        </item>
        
        <item>
            <title>You have got to change the game</title>
            <description><![CDATA[ <p>Mossberg: <a href="http://online.wsj.com/public/article/SB121322194642065867-yJIpz9v8z2snSwKN00hu9V4Oqdo_20090612.html?mod=rss_personal_technology">Samsung's Instinct Doesn't Ring True As an iPhone Clone</a></p>
<p>Taking on the market leader directly rarely works. In this case, a review of the Samsung Instinct turns into a promo piece for iPhone 2.0. Sure, the Instinct may be a perfectly fine phone, but it tries to be an iPhone, and at that it is bound to fail.</p>]]></description>
            <link>http://www.structure28.com/blog/2008/06/you-have-got-to-change-the-gam.html</link>
            <guid>http://www.structure28.com/blog/2008/06/you-have-got-to-change-the-gam.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">apple</category>
            
            <pubDate>Mon, 16 Jun 2008 07:15:16 -0800</pubDate>
        </item>
        
        <item>
            <title>AES encryption with Python</title>
            <description><![CDATA[<p>First download, build and install the <a href="http://www.amk.ca/python/code/crypto">Python Cryptography Toolkit</a>. Next:
</p>
<p>
<textarea style="width: 450px; height: 150px;">&gt;&gt;&gt; from Crypto.Cipher import AES
&gt;&gt;&gt; passphrase = 'somephrase'
&gt;&gt;&gt; aes = AES.new(passphrase, AES.MODE_CFB)
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in ?
ValueError: AES key must be either 16, 24, or 32 bytes long
&gt;&gt;&gt; passphrase = '1234567890123456'
&gt;&gt;&gt; aes = AES.new(passphrase, AES.MODE_CFB)
&gt;&gt;&gt; plaintext = 'Hello Bob. Please save me!'
&gt;&gt;&gt; ciphertext = aes.encrypt(plaintext)
&gt;&gt;&gt; print ciphertext
\uffff\uffff\ufffflx\uffff\uffff\uffff\uffff^\uffff\uffff@\uffff\uffffR\uffff\uffffi\uffff

&gt;&gt;&gt; aes = AES.new(passphrase, AES.MODE_CFB)
&gt;&gt;&gt; print aes.decrypt(ciphertext)
Hello Bob. Please save me!
</textarea>
</p>]]></description>
            <link>http://www.structure28.com/blog/2008/04/aes-encryption-with-python.html</link>
            <guid>http://www.structure28.com/blog/2008/04/aes-encryption-with-python.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">development</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">python</category>
            
            <pubDate>Mon, 14 Apr 2008 15:05:11 -0800</pubDate>
        </item>
        
        <item>
            <title>Tell me why I would use AppEngine</title>
            <description><![CDATA[<p>So, let me see... on the negative side:
</p><ul>
<li>have to use google-specific ORM code</li>
<li>no joins or other "advanced" SQL features</li>
<li>django admin interface does not work</li>
<li>very limited set of libraries available</li>
</ul>

<p>But hey, <i>on the positive side</i>:
</p><ul>
<li>Dude it runs on google!</li>
</ul>

<p>Seriously, are there really that many developers who can't figure out how to manage, deploy and scale their apps - who, by the way also have such <i>huge</i> scaling needs that they need to run on BigTable - that this fills any need at all? Because I don't see it.</p>]]></description>
            <link>http://www.structure28.com/blog/2008/04/tell-me-why-i-would-use-appengine.html</link>
            <guid>http://www.structure28.com/blog/2008/04/tell-me-why-i-would-use-appengine.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">development</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">django</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">google</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">python</category>
            
            <pubDate>Thu, 10 Apr 2008 21:11:26 -0800</pubDate>
        </item>
        
        <item>
            <title>Apple to bring &apos;green&apos; to notebooks</title>
            <description><![CDATA[<p><a href="http://www.appleinsider.com/articles/08/04/07/apple_notebook_lines_to_see_major_design_changes_sources_say.html">Apple notebook lines to see major design changes</a>
</p><blockquote>
Of the two, the 13-inch consumer MacBooks will undergo the most significant metamorphosis, shedding their plastic enclosures for ones constructed from more eco-friendly materials such as aircraft-grade aluminum and stainless steel, people familiar with the matter say.
</blockquote>

<p><i>Wow</i>. Apple is just amazingly far ahead of every other pc manufacturer. They come to market with 'green' laptops right when 'green' is meaningful to consumers. Dell and HP can't get their heads out of their asses long enough to figure out that consumers don't want crapware pre-installed.</p>]]></description>
            <link>http://www.structure28.com/blog/2008/04/apple-to-bring-green-to-notebooks.html</link>
            <guid>http://www.structure28.com/blog/2008/04/apple-to-bring-green-to-notebooks.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">apple</category>
            
            <pubDate>Mon, 07 Apr 2008 21:30:40 -0800</pubDate>
        </item>
        
        <item>
            <title>Clickpass, disqus and openid - wtf?</title>
            <description><![CDATA[<p>So I'm investigating <a href="http://disqus.com/">disqus</a> and <a href="http://www.intensedebate.com/">Intense Debate</a>... Okay cool, disqus supports openid... I'll just sign in with my openid through <a href="http://www.clickpass.com/">Clickpass</a>... WTF? Why does disqus want a <b>username and password</b>? I thought that was the whole friggin point of openid - to avoid another friggin username and password.</p>]]></description>
            <link>http://www.structure28.com/blog/2008/04/clickpass-disqus-and-openid-wtf.html</link>
            <guid>http://www.structure28.com/blog/2008/04/clickpass-disqus-and-openid-wtf.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">disqus</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">openid</category>
            
            <pubDate>Mon, 07 Apr 2008 10:43:07 -0800</pubDate>
        </item>
        
        <item>
            <title>Adobe Air for Linux</title>
            <description><![CDATA[<p>Dear <a href="http://labs.adobe.com/downloads/air_linux.html">Adobe Air for Linux</a> peeps: thank you for blessing our platform with your software. In the future, please do not <a href="http://en.wikipedia.org/wiki/Pwn">pwn</a> the file association for <i>every single zip file on my system</i>. Thanks.</p>]]></description>
            <link>http://www.structure28.com/blog/2008/04/adobe-air-for-linux.html</link>
            <guid>http://www.structure28.com/blog/2008/04/adobe-air-for-linux.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">adobe_air</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">linux</category>
            
            <pubDate>Wed, 02 Apr 2008 09:26:40 -0800</pubDate>
        </item>
        
        <item>
            <title>Free of jail but I need a halfway house</title>
            <description><![CDATA[<p>Okay, so I finally sacked up a pair and used <a href="http://modmyifone.com/wiki/index.php/ILibertyX">iLibertyX</a> to jailbreak my ipod touch. WTF is next? Installer.app doesn't have crap in it. All I want is a terminal and an ssh client... why does that seem so hard?</p>
<p><i>Update:</i> I see... "Community Sources" is your friend. Of course I'm a total n00b and the first thing I did was to run 'passwd', which totally borked the system. Fixed that... have to say I'm dissappointed by the (low) quality of the apps available.</p>]]></description>
            <link>http://www.structure28.com/blog/2008/03/free-of-jail-but-i-need-a-halfway-house.html</link>
            <guid>http://www.structure28.com/blog/2008/03/free-of-jail-but-i-need-a-halfway-house.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">apple</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">iphone</category>
            
            <pubDate>Mon, 31 Mar 2008 19:24:28 -0800</pubDate>
        </item>
        
        <item>
            <title>Finally, a decent iax2 soft phone for OS X</title>
            <description><![CDATA[<p>If you, like me, have searched far and wide for an OS X soft phone for asterisk that does not suck as*, crashing or freezing on startup, look no further. <a href="http://www.zoiper.com/">ZoIPer</a> rulez! Unlike <a href="http://iaxclient.sourceforge.net/iaxcomm/">iaxComm</a> it <i>actually starts</i>, which I consider critical, unlike <a href="http://www.jackenhack.com/jackeniax">JackenIAX</a> it does not crash every two minutes and unlike <a href="http://www.voix.it/">Voix</a> it does not freeze constantly.</p>]]></description>
            <link>http://www.structure28.com/blog/2008/03/finally-a-decent-iax2-soft-phone-for-os-x.html</link>
            <guid>http://www.structure28.com/blog/2008/03/finally-a-decent-iax2-soft-phone-for-os-x.html</guid>
            
            
                <category domain="http://www.sixapart.com/ns/types#tag">apple</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">asterisk</category>
            
                <category domain="http://www.sixapart.com/ns/types#tag">voip</category>
            
            <pubDate>Mon, 10 Mar 2008 19:13:08 -0800</pubDate>
        </item>
        
    </channel>
</rss>
