<?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>Brightbox Blog</title>
	<atom:link href="http://blog.brightbox.co.uk/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.brightbox.co.uk</link>
	<description></description>
	<lastBuildDate>Mon, 01 Feb 2010 15:17:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Full Text Indexing in Ruby with Xapian Fu</title>
		<link>http://blog.brightbox.co.uk/posts/full-text-indexing-in-ruby-with-xapian-fu</link>
		<comments>http://blog.brightbox.co.uk/posts/full-text-indexing-in-ruby-with-xapian-fu#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:17:18 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[ferret]]></category>
		<category><![CDATA[indexing]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[xapian]]></category>
		<category><![CDATA[xapian fu]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=947</guid>
		<description><![CDATA[I&#8217;ve just properly announced my Ruby full text indexing library, Xapian Fu, on my personal blog.  It&#8217;s a Ruby interface to Xapian, an open source search engine Library.  Xapian Fu basically gives you a Hash interface to Xapian &#8211; so you get a persistent Hash with full text indexing built in.
For example:
  require 'xapian-fu'
  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just properly announced my Ruby full text indexing library, Xapian Fu, <a href="http://johnleach.co.uk/words/archives/2010/01/31/445/xapian-fu-full-text-indexing-in-ruby">on my personal blog</a>.  It&#8217;s a Ruby interface to <a href="http://en.wikipedia.org/wiki/Xapian">Xapian</a>, an open source search engine Library.  Xapian Fu basically gives you a Hash interface to Xapian &#8211; so you get a persistent Hash with full text indexing built in.</p>
<p>For example:</p>
<pre>  require 'xapian-fu'
  include XapianFu
  db = XapianDb.new(:dir =&gt; 'example.db', :create =&gt; true,
                    :store =&gt; [:title, :year])
  db &lt;&lt; { :title =&gt; 'Brokeback Mountain', :year =&gt; 2005 }
  db &lt;&lt; { :title =&gt; 'Cold Mountain', :year =&gt; 2004 }
  db &lt;&lt; { :title =&gt; 'Yes Man', :year =&gt; 2008 }
  db.flush
  db.search("mountain").each do |match|
    puts match.values[:title]
  end</pre>
<p>The <a href="http://johnleach.co.uk/words/archives/2010/01/31/445/xapian-fu-full-text-indexing-in-ruby">full announcement is here</a>, <a href="http://github.com/johnl/xapian-fu">github project</a> here and <a href="http://rdoc.info/projects/johnl/xapian-fu">rdoc here</a>.  Hope you find it useful!</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/full-text-indexing-in-ruby-with-xapian-fu/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL slow query improvements</title>
		<link>http://blog.brightbox.co.uk/posts/mysql-slow-query-improvements</link>
		<comments>http://blog.brightbox.co.uk/posts/mysql-slow-query-improvements#comments</comments>
		<pubDate>Thu, 28 Jan 2010 16:46:43 +0000</pubDate>
		<dc:creator>Caius Durling</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql slow queries]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=933</guid>
		<description><![CDATA[We&#8217;ve just pushed some updates to the MySQL slow query warning interface in the Brightbox control panel, which includes two main improvements.
Firstly, where the same (or very similar) query occurs more than once, they are aggregated together rather than being recorded as individual slow queries. The user interface displays the count so you can see [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve just pushed some updates to the MySQL slow query warning interface in the Brightbox control panel, which includes two main improvements.</p>
<p>Firstly, where the same (or very similar) query occurs more than once, they are aggregated together rather than being recorded as individual slow queries. The user interface displays the count so you can see exactly how many times this slow query occurred in the last 7 days.</p>
<p>Secondly, the full SQL query is now displayed, so customers now have more information with which to optimise their applications.</p>
<p><img class="alignnone size-full wp-image-943" title="slow_query_highlighting" src="http://blog.brightbox.co.uk/wp-content/uploads/2010/01/slow_query_highlighting1.png" alt="" width="656" height="255" /></p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/mysql-slow-query-improvements/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brightbox Gem v2.3.6 released</title>
		<link>http://blog.brightbox.co.uk/posts/brightbox-gem-v2-3-6-released</link>
		<comments>http://blog.brightbox.co.uk/posts/brightbox-gem-v2-3-6-released#comments</comments>
		<pubDate>Wed, 27 Jan 2010 08:41:21 +0000</pubDate>
		<dc:creator>Caius Durling</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[brightbox]]></category>
		<category><![CDATA[capistrano]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[recipes]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=921</guid>
		<description><![CDATA[Today I’m pleased to announce a new revision of the Brightbox Deployment Gem, version 2.3.6. This release fixes some of the issues reported to us by our users, along with a few extra features.
The documentation on the wiki has been updated with the new fixes and features. If you have any tips or find any [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright right size-full wp-image-70" title="Brightbox gem" src="http://blog.brightbox.co.uk/wp-content/uploads/2008/05/brightbox_gem.png" alt="" width="221" height="105" /></p>
<p>Today I’m pleased to announce a new revision of the Brightbox Deployment Gem, version 2.3.6. This release fixes some of the issues reported to us by our users, along with a few extra features.</p>
<p>The documentation <a href="http://wiki.brightbox.co.uk/docs:thebrightboxgemv2">on the wiki</a> has been updated with the new fixes and features. If you have any tips or find any errors just let us know.</p>
<p><span style="color: #888888;">NEW FEATURES</span></p>
<h3 id="apt_package_dependencies">Apt Package Dependencies</h3>
<p>Just as you can currently define gems your application relies on and have them automatically installed onto your servers, you can now do the same with apt packages. Define them in your <code>deploy.rb</code> and they’ll be installed <em>before</em> installing your required rubygems, which means you can use it to install apt packages that gems depend on. As an example, the nokogiri gem depends on a couple of apt packages.</p>
<pre><code>depend :remote, :apt, "libxml2-dev"
depend :remote, :apt, "libxslt1-dev"
depend :remote, :gem, "nokogiri", "&gt;= 0"
</code></pre>
<h3 id="intermediate_ssl_certificates">Intermediate SSL Certificates</h3>
<p>Support for Intermediate SSL Certificates in Apache has been added, meaning you no longer need to manually edit the Apache config files directly. Just add one line to your <code>deploy.rb</code> and the gem now takes care of updating the Apache config for you. An example SSL configuration:</p>
<pre><code>set :ssl_certificate, "my_cert.pem"
set :ssl_key, "my_cert.key"
set :ssl_intermediate, "intermediate.crt"
</code></pre>
<p>See the wiki page for <a href="http://wiki.brightbox.co.uk/docs:gemv2:ssl#intermediate_certificate">Adding SSL Support to Apache</a> for more information.</p>
<h3 id="deploylocalrb">Deploy.local.rb</h3>
<p>A common issue we’ve seen with is setting the deploy password. If you put it in <code>deploy.rb</code>, then it inevitably ends up in your source control repository, which is a bad idea. A workaround we’ve suggested in the past is to have a <code>deploy.local.rb</code> file, which isn’t tracked by source control, and load that from within your <code>deploy.rb</code> file. This allows you to have the password (or any other sensitive settings) defined, but kept outside your source control.</p>
<p>As part of this release, the gem now has official support for a <code>deploy.local.rb</code> file. If it exists, the gem will load it in for you.</p>
<p>For more information see the <a href="http://wiki.brightbox.co.uk/docs:gemv2:advancedgemsettings#deploy.local.rb">Advanced Gem Settings</a> page on the wiki.</p>
<h3 id="disable_regenerating_webserver_config">Disable (re)generating webserver config</h3>
<p>If you’ve made manual changes to your webserver (apache or nginx) configuration, then you don’t want an accidental <code>deploy:setup</code> to overwrite your configs. Up until now you just had to avoid running the command, but now there’s a setting to disable it for you.</p>
<pre><code>set :generate_webserver_config, false
</code></pre>
<p><span style="color: #888888;">FIXES AND ENHANCEMENTS</span></p>
<ul>
<li><a href="http://wiki.brightbox.co.uk/docs:gemv2:staticcache">Max Age</a> setting now accepts a number as well as a string</li>
<li>deploy:initial reloads Apache so the new config is loaded</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/brightbox-gem-v2-3-6-released/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New: announcing the Brightbox SLA</title>
		<link>http://blog.brightbox.co.uk/posts/new-announcing-the-brightbox-sla</link>
		<comments>http://blog.brightbox.co.uk/posts/new-announcing-the-brightbox-sla#comments</comments>
		<pubDate>Tue, 26 Jan 2010 16:01:20 +0000</pubDate>
		<dc:creator>Jeremy Jarvis</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[availability]]></category>
		<category><![CDATA[guarantee]]></category>
		<category><![CDATA[service level agreement]]></category>
		<category><![CDATA[sla]]></category>
		<category><![CDATA[uptime]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=911</guid>
		<description><![CDATA[Over the last few months, we&#8217;ve been seeing increasing number of requests about our SLA (Service Level Agreement) &#8211; do we have one? if not then why not? and so on.
We&#8217;ve been reasonably resistant to publishing an SLA until now, not because of doubts over our infrastructure or ability to deliver, but because of the [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few months, we&#8217;ve been seeing increasing number of requests about our SLA (Service Level Agreement) &#8211; do we have one? if not then why not? and so on.</p>
<p>We&#8217;ve been reasonably resistant to publishing an SLA until now, not because of doubts over our infrastructure or ability to deliver, but because of the minimal value we felt it would add for customers in the event of actual downtime. We&#8217;re a pragmatic bunch at Brightbox and like to avoid adding things just for the sake of it or &#8220;because everyone else does&#8221; :)</p>
<p>However, and it&#8217;s a pretty big &#8220;however&#8221;, we understand that for many people an SLA or &#8220;uptime guarantee&#8221; is a useful gauge of whether a provider is actually willing to &#8220;put their money where their mouth is&#8221; and make a financial commitment to meeting a specific minimum target.</p>
<p>So, I&#8217;m pleased to announce that from 1 Jan 2010 (backdated) Brightbox offers a 99.95% SLA on virtual machine and load balancing products (see <a href="http://www.brightbox.co.uk/terms#sla">Terms and Conditions</a> for details). We&#8217;ll likely expand the SLA soon to also cover our MySQL products and other products currently in the pipeline, but we&#8217;ll need a different method of assessing &#8220;availability&#8221; for these products.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/new-announcing-the-brightbox-sla/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preview: Multiple users and accounts</title>
		<link>http://blog.brightbox.co.uk/posts/preview-multiple-users-and-accounts</link>
		<comments>http://blog.brightbox.co.uk/posts/preview-multiple-users-and-accounts#comments</comments>
		<pubDate>Fri, 15 Jan 2010 15:52:27 +0000</pubDate>
		<dc:creator>Jeremy Jarvis</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[accounts]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=896</guid>
		<description><![CDATA[Right now, each Brightbox customer has a single username/password to access their Brightbox account. For many smaller customers, this works fine and they can easily operate the various aspects of their account themselves e.g manage virtual machines, billing and support tickets. However, there are also a number of scenarios where this doesn&#8217;t work too well [...]]]></description>
			<content:encoded><![CDATA[<p>Right now, each Brightbox customer has a single username/password to access their Brightbox account. For many smaller customers, this works fine and they can easily operate the various aspects of their account themselves e.g manage virtual machines, billing and support tickets. However, there are also a number of scenarios where this doesn&#8217;t work too well &#8211; especially when there are multiple people managing one or more accounts.</p>
<p><img class="content_image" title="Multiple accounts" src="http://jeremyjarvis.co.uk/grabs/5201c295c0a3d7460566ed0c.png" alt="" width="492" height="236" /></p>
<p>We&#8217;ve been developing a more robust solution for users and accounts for some time and hope to launch this new system in the next few weeks. In this post, I&#8217;d like to give a sneak preview on the forthcoming changes&#8230;</p>
<ul>
<li>Each person will have a Brightbox user account</li>
<li><span style="font-weight: normal; font-size: 13px;">We&#8217;ll be introducing a number of &#8220;roles&#8221; (tbc)</span></li>
<li>Each account will always have an &#8220;owner&#8221; contact, this person is ultimately responsible for the account</li>
<li>Existing Brightbox account holders will be migrated to a new owner contact</li>
<li>The account owner will be able to invite additional users to their account</li>
<li>The control panel will enable users with access to multiple accounts to easily move between the accounts to which they have access</li>
</ul>
<p>Over the next couple of weeks, all customers will receive an email explaining the changes and the migration process.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/preview-multiple-users-and-accounts/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Passenger 2.2.9 packages for Ubuntu 8.04 Hardy</title>
		<link>http://blog.brightbox.co.uk/posts/passenger-2-2-9-packages-for-ubuntu-8-04-hardy</link>
		<comments>http://blog.brightbox.co.uk/posts/passenger-2-2-9-packages-for-ubuntu-8-04-hardy#comments</comments>
		<pubDate>Fri, 08 Jan 2010 12:24:16 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[mod_rack]]></category>
		<category><![CDATA[mod_rails]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[phusion]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=893</guid>
		<description><![CDATA[The Phusion team released Passenger 2.2.9 today, which adds support for Rails 3, the GEM bundler, and fixes a couple of bugs.  As usual Brightbox are providing Ubuntu Hardy packages for i386 and AMD64 architectures, available now from the Brightbox apt repository.
This package won&#8217;t actually support Rails 3 just yet though as we&#8217;ve yet to package [...]]]></description>
			<content:encoded><![CDATA[<p>The Phusion team released <a href="http://blog.phusion.nl/2010/01/08/phusion-passenger-2-2-9-released/">Passenger 2.2.9</a> today, which adds support for Rails 3, the GEM bundler, and fixes a couple of bugs.  As usual <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">Brightbox are providing Ubuntu Hardy packages</a> for i386 and AMD64 architectures, available now from the <a href="http://wiki.brightbox.co.uk/docs:brightboxaptrepository">Brightbox apt repository</a>.</p>
<p>This package won&#8217;t actually support Rails 3 just yet though as we&#8217;ve yet to package and test the librack 1.1.0, which Rails 3 depends on.  We&#8217;re working on it now and once we&#8217;re happy with it we&#8217;ll add new packages to our repository as usual.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/passenger-2-2-9-packages-for-ubuntu-8-04-hardy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brightbox sponsors NWRUG, 21st January, Manchester</title>
		<link>http://blog.brightbox.co.uk/posts/brightbox-sponsors-nwrug-21st-january-manchester</link>
		<comments>http://blog.brightbox.co.uk/posts/brightbox-sponsors-nwrug-21st-january-manchester#comments</comments>
		<pubDate>Thu, 07 Jan 2010 18:29:01 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[manchester]]></category>
		<category><![CDATA[nwrug]]></category>
		<category><![CDATA[pizza]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sponsorship]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[user group]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=890</guid>
		<description><![CDATA[I&#8217;m speaking at this month&#8217;s North West Ruby Group meeting about some of the tools available that can be used to solve common Ruby and Rails deployment and development problems. &#8220;UNIX: Rediscovering the wheel&#8221;.
Brightbox is also sponsoring the meeting so there will be free pizza afterwards (free as in pizza, not as in speech).
More details [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m speaking at this month&#8217;s <a href="http://nwrug.org/events/january10/">North West Ruby Group meeting</a> about some of the tools available that can be used to solve common Ruby and Rails deployment and development problems. &#8220;UNIX: Rediscovering the wheel&#8221;.</p>
<p>Brightbox is also sponsoring the meeting so there will be free pizza afterwards (free as in pizza, not as in speech).</p>
<p>More details on the <a href="http://nwrug.org/events/january10/">NWRUG blog page</a>.</p>
<p>Hope to see you there!</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/brightbox-sponsors-nwrug-21st-january-manchester/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shared MySQL improvements</title>
		<link>http://blog.brightbox.co.uk/posts/shared-mysql-improvements</link>
		<comments>http://blog.brightbox.co.uk/posts/shared-mysql-improvements#comments</comments>
		<pubDate>Wed, 23 Dec 2009 07:49:11 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[improvements]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[shared]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=875</guid>
		<description><![CDATA[Over the last few weeks we&#8217;ve been working on scaling our shared MySQL facilities. Until recently, we&#8217;ve been able to run a single (albeit hefty) shared MySQL cluster but due to growing demand we&#8217;ve needed to scale this up considerably. The main cluster has had some performance problems recently and, while some tuning and vertical [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last few weeks we&#8217;ve been working on scaling our shared MySQL facilities. Until recently, we&#8217;ve been able to run a single (albeit hefty) shared MySQL cluster but due to growing demand we&#8217;ve needed to scale this up considerably. The main cluster has had some performance problems recently and, while some tuning and vertical scaling bought us some time (we more than doubled the resources of the main cluster), the real focus has been on horizontal scaling.</p>
<p>We&#8217;ve built a bunch of new master-master replicated pairs and our backend systems now distribute customers between them on sign-up.  We&#8217;ve also been contacting some customers and moving them to new clusters, to relieve the pressure on the main cluster (customers with heavy requirements are still recommended managed dedicated clusters &#8211; these will be available to purchase simply as additional products soon).  We&#8217;re using puppet to automate a lot of the setup of the new clusters and can deploy a new one, with monitoring and backups, very quickly.</p>
<p>This work has almost quadrupled the shared MySQL resources within the space of a couple of weeks, and provides a simple platform to continue scaling indefinitely. The decentralisation also makes some aspects of administration easier, such as arranging downtime for maintenance.</p>
<p>The visible differences are small: rather than everyone connecting to one address, sqlreadwrite.brightbox.net, each account needs to use the address provided in the control panel.  The old sqlreadwrite.brightbox.net has become db01.mysql.vm.brightbox.net (the old name will of course continue to work indefinitely), and the new clusters are at db02.mysql.vm.brightbox.net, db03.mysql.vm.brightbox.net etc. Our wiki documentation has been updated to reflect this &#8211; customers on the old cluster don&#8217;t have to make any changes, it only really affects new customers and customers we&#8217;ve contacted to arrange a move.</p>
<p>We&#8217;ve also been working on improving the slow query logger to provide more useful results. Instead of reporting every slow query ever logged, it produces an intelligent summary of the week&#8217;s queries. This means when you see a slow query in the control panel, it means it&#8217;s shown up repeatedly and very likely needs attention, as opposed to queries that just happened to take longer than usual due to load on the cluster. We&#8217;ll be rolling this work out just after Christmas.</p>
<p>This work represents a big investment in our shared MySQL platform, which we know is invaluable to a lot of our customers, and allows us to keep growing without sacrificing performance.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/shared-mysql-improvements/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache x-sendfile module for Ubuntu Hardy</title>
		<link>http://blog.brightbox.co.uk/posts/apache-x-sendfile-module-for-ubuntu-hardy</link>
		<comments>http://blog.brightbox.co.uk/posts/apache-x-sendfile-module-for-ubuntu-hardy#comments</comments>
		<pubDate>Tue, 22 Dec 2009 17:37:21 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[file serving]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[package]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sendfile]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[x-sendfile]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=882</guid>
		<description><![CDATA[We&#8217;ve just added Caspar Clemens Mierau&#8217;s package for the Apache x-sendfile module to our Ubuntu Hardy package repositories, so now it&#8217;s trivially easy for Brightbox customers to start using it. We&#8217;ve also built an AMD64 version too.  Just install the package, enable it and reload Apache:
sudo apt-get update
sudo apt-get install libapache2-mod-xsendfile
sudo a2enmod xsendfile
sudo invoke-rc.d apache reload]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve just added <a href="https://launchpad.net/~damokles">Caspar Clemens Mierau</a>&#8217;s package for the Apache <a href="http://tn123.ath.cx/mod_xsendfile/">x-sendfile module</a> to our <a href="http://wiki.brightbox.co.uk/docs:brightboxaptrepository">Ubuntu Hardy package repositories</a>, so now it&#8217;s trivially easy for Brightbox customers to <a href="http://www.therailsway.com/2009/2/22/file-downloads-done-right">start using it</a>. We&#8217;ve also built an AMD64 version too.  Just install the package, enable it and reload Apache:</p>
<pre><code>sudo apt-get update
sudo apt-get install libapache2-mod-xsendfile
sudo a2enmod xsendfile
sudo invoke-rc.d apache reload</code></pre>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/apache-x-sendfile-module-for-ubuntu-hardy/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New: Performance graphs (beta)</title>
		<link>http://blog.brightbox.co.uk/posts/new-performance-graphs-beta</link>
		<comments>http://blog.brightbox.co.uk/posts/new-performance-graphs-beta#comments</comments>
		<pubDate>Tue, 08 Dec 2009 16:29:00 +0000</pubDate>
		<dc:creator>Jeremy Jarvis</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[control panel]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[stats]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=857</guid>
		<description><![CDATA[We quietly rolled out a new feature into the Brightbox control panel a couple of weeks ago, adding performance graphs for each of your Brightbox virtual machines. To view graphs for a virtual machine, click the &#8220;full details&#8221; link from the overview screen. You can currently choose to view CPU, disk i/o, public and private [...]]]></description>
			<content:encoded><![CDATA[<p>We quietly rolled out a new feature into the Brightbox control panel a couple of weeks ago, adding performance graphs for each of your Brightbox virtual machines. To view graphs for a virtual machine, click the &#8220;full details&#8221; link from the overview screen. You can currently choose to view CPU, disk i/o, public and private network usage for the last hour, day, week and month.</p>
<p><img class="alignnone size-full wp-image-858" title="d2b219612ed32a458cc0e587" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/12/d2b219612ed32a458cc0e587.png" alt="d2b219612ed32a458cc0e587" width="550" height="271" /></p>
<p>The graphing service is currently in beta, so you might find some occasional gaps in data for the time being, but over time this should prove a very useful feature.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/new-performance-graphs-beta/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paul joins Team Brightbox!</title>
		<link>http://blog.brightbox.co.uk/posts/paul-joins-team-brightbox</link>
		<comments>http://blog.brightbox.co.uk/posts/paul-joins-team-brightbox#comments</comments>
		<pubDate>Mon, 07 Dec 2009 14:18:45 +0000</pubDate>
		<dc:creator>Louisa Parry</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Paul Thornthwaite]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[staff]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=846</guid>
		<description><![CDATA[We welcomed our latest addition to the Brightbox team a fortnight ago &#8211; Paul Thornthwaite.
Experienced programmer Paul was a beta tester for Brightbox back in our very early days and has now come on board as our new senior developer.  He&#8217;ll be joining Baz and Caius working on our customer-facing control panel and our [...]]]></description>
			<content:encoded><![CDATA[<p><img class="left content_image size-full wp-image-850" title="paul" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/12/paul.jpg" alt="paul" width="180" height="220" />We welcomed our latest addition to the Brightbox team a fortnight ago &#8211; Paul Thornthwaite.</p>
<p>Experienced programmer Paul was a beta tester for Brightbox back in our very early days and has now come on board as our new senior developer.  He&#8217;ll be joining Baz and Caius working on our customer-facing control panel and our behind-the-scenes systems, and he&#8217;ll also take a lead in project managing all the development side of things.</p>
<p>Welcome to the team, Paul!</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/paul-joins-team-brightbox/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>See you at Conferencia Rails 2009</title>
		<link>http://blog.brightbox.co.uk/posts/see-you-at-conferencia-rails-2009</link>
		<comments>http://blog.brightbox.co.uk/posts/see-you-at-conferencia-rails-2009#comments</comments>
		<pubDate>Tue, 24 Nov 2009 14:58:13 +0000</pubDate>
		<dc:creator>Louisa Parry</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[conferencia rails]]></category>
		<category><![CDATA[madrid]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=842</guid>
		<description><![CDATA[Brightbox founders Jeremy and John will be attending Conferencia Rails in Madrid later this week.
Brightbox is sponsoring the event and John will be speaking on Thursday about the wonders of UNIX &#8211; how its often forgotten tools can help with Ruby on Rails development and deployment.
They&#8217;ll also have some of our highly coveted tshirts and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-843" title="conferencia-rails-2009" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/11/conferencia-rails-2009.png" alt="conferencia-rails-2009" width="272" height="72" />Brightbox founders Jeremy and John will be attending <a href="http://www.conferenciarails.org/">Conferencia Rails</a> in Madrid later this week.</p>
<p>Brightbox is sponsoring the event and John will be speaking on Thursday about the wonders of UNIX &#8211; how its often forgotten <a href="http://app.conferenciarails.org/talks/58-unix-rediscovering-the-wheel">tools can help with Ruby on Rails development and deployment</a>.</p>
<p>They&#8217;ll also have some of our highly coveted tshirts and stickers to give away so if you&#8217;re going, make sure you track them down and say hello.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/see-you-at-conferencia-rails-2009/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Passenger 2.2.7 packages for Ubuntu</title>
		<link>http://blog.brightbox.co.uk/posts/passenger-2-2-7-packages-for-ubuntu</link>
		<comments>http://blog.brightbox.co.uk/posts/passenger-2-2-7-packages-for-ubuntu#comments</comments>
		<pubDate>Tue, 24 Nov 2009 08:18:05 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cow]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[phusion]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=839</guid>
		<description><![CDATA[Passenger 2.2.6 (quickly followed by 2.2.7) was released last week and we now have i386 and AMD64 Ubuntu Hardy packages available in our repository.
As usual, details on installing the packages from our repository are available on our wiki.
If you&#8217;re using Passenger and it&#8217;s making you happy, please do consider supporting its development by donating money [...]]]></description>
			<content:encoded><![CDATA[<p>Passenger 2.2.6 (quickly followed by 2.2.7) was <a href="http://blog.phusion.nl/2009/11/18/phusion-passenger-2-2-6-released/">released last week</a> and we now have i386 and AMD64 Ubuntu Hardy packages available in our repository.</p>
<p>As usual, details on installing the packages from our repository are <a href="http://wiki.brightbox.co.uk/docs:phusion-passenger">available on our wiki</a>.</p>
<p>If you&#8217;re using Passenger and it&#8217;s making you happy, please do consider supporting its development by <a href="http://www.modrails.com/enterprise.html">donating money in the form of an &#8220;Enterprise License&#8221;</a> direct from Phusion, the company behind it.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/passenger-2-2-7-packages-for-ubuntu/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Clearing out Rails Sessions</title>
		<link>http://blog.brightbox.co.uk/posts/clearing-out-rails-sessions</link>
		<comments>http://blog.brightbox.co.uk/posts/clearing-out-rails-sessions#comments</comments>
		<pubDate>Thu, 19 Nov 2009 09:30:41 +0000</pubDate>
		<dc:creator>Caius Durling</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=823</guid>
		<description><![CDATA[As I&#8217;m sure you&#8217;re aware, Rails can be told to use ActiveRecord (and hence the MySQL database) to store session data. (New Rails apps use the cookie store by default&#8212;See the rails sessions guide for more info on both.)
However, this session data is never deleted, which means your session table continues to grow and grow [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;m sure you&#8217;re aware, Rails can be told to use ActiveRecord (and hence the MySQL database) to store session data. <em>(New Rails apps use the cookie store by default&#8212;See <a href="http://guides.rubyonrails.org/security.html#session-storage">the rails sessions guide</a> for more info on both.)</em></p>
<p>However, this session data is never deleted, which means your session table continues to grow and grow forevermore. Your old sessions are left stored in the database, and although the table is indexed to help with finding sessions, it will eventually fill the disk up.</p>
<p>At this point you might be thinking the solution is obvious, just empty the sessions table after so long and let it fill up again. Rails even provides a rake task that does this for us, <code>rake db:sessions:clear</code>. The problem with taking this approach is that any active sessions get lost as well, which could be people with items in their baskets, currently logged in users, etc.</p>
<p>There is another solution, which is to only delete sessions that we consider to no longer be active. The <code>updated_at</code> column in the sessions table has an index on it, and thus looks designed for this type of query to be run. On the Brightbox <a href="https://control.brightbox.co.uk/" title="Brightbox - Rails hosting">control panel</a>, we&#8217;ve decided this is session data that hasn&#8217;t been updated for over 24 hours. (A side effect of this is customers that haven&#8217;t visited the control panel in the last 24 hours are logged out. We&#8217;ve decided this is ok, but <abbrev title="Your Mileage May Vary">YMMV</abbrev> of course.)</p>
<p>We use the following rake task that clears out sessions 24 hours or older, which is <a href="http://wiki.brightbox.co.uk/docs:cron" title="Scheduling tasks with Cron">run via cron</a> at 3am every morning. You can change the threshold by editing <code>"1 DAY"</code> in the query, see the MySQL <a href="http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-add">DATE_ADD()</a> docs for valid values.</p>
<pre><code>desc "Clear expired sessions"
task :clear_expired_sessions =&gt; :environment do
    sql = 'DELETE FROM sessions WHERE updated_at &lt; DATE_SUB(NOW(), INTERVAL 1 DAY);'
    ActiveRecord::Base.connection.execute(sql)
end
</code></pre>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/clearing-out-rails-sessions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Expiring an entire page cache tree atomically</title>
		<link>http://blog.brightbox.co.uk/posts/expiring-an-entire-page-cache-tree-atomically</link>
		<comments>http://blog.brightbox.co.uk/posts/expiring-an-entire-page-cache-tree-atomically#comments</comments>
		<pubDate>Mon, 16 Nov 2009 16:35:13 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[atomic]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[expire]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[page cache]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=815</guid>
		<description><![CDATA[As you&#8217;ll all know, Rails has page caching baked right in &#8211; the first time an action is hit, it writes a html file of the result to the filesystem. Subsequent hits are served direct from the html file at high speed by the web server without ever involving your Rails app.
Expiring the cache is [...]]]></description>
			<content:encoded><![CDATA[<p>As you&#8217;ll all know, <a href="http://guides.rubyonrails.org/caching_with_rails.html#page-caching">Rails has page caching baked right in</a> &#8211; the first time an action is hit, it writes a html file of the result to the filesystem. Subsequent hits are served direct from the html file at high speed by the web server without ever involving your Rails app.</p>
<p>Expiring the cache is just a case of deleting the html file. But what if you want to expire an entire tree of cache files? Say you change something in a header or footer, so every single page needs expiring at once.</p>
<p>The usual way to do this is to just <a href="http://ruby-doc.org/core/classes/FileUtils.html#M004337">delete</a> the entire page cache tree, with <code>FileUtils.rm_rf</code>.  This works pretty well, but with a big tree you&#8217;ll get strange behaviour under high load due to concurrent access.  Whilst your <code>rm_rf</code> process is deleting the tree, file by file, your webserver will still be looking in there for page cache files and Rails will still be trying to write them.<br />
<span id="more-815"></span></p>
<p>This is easily solvable.  On a POSIX compliant filesystem, like EXT3, the rename operation is atomic &#8211; it either happens or it doesn&#8217;t, there is no in-between state where it is half renamed or anything.  So, before running the <code>rm_rf</code>, you <a href="http://ruby-doc.org/core/classes/FileUtils.html#M004330">rename</a> your highest-level cache directory to something temporary.  This means the cache expiry is instantaneous, even if you have 100 meg of page cache, and you won&#8217;t get Rails writing new page cache files into it whilst you delete it.</p>
<p>It&#8217;s a good idea to use a robust temporary filename format so two processes don&#8217;t end up renaming a cache directory to the same thing at the same time, especially if your page cache is on a shared filesystem.</p>
<p>An example snippet of code follows. It assumes you want to expire pages from the controller named <code>entries</code>.</p>
<pre><code>require 'socket'
tmp_cache_dir = [Socket.gethostname, Process.pid, Time.now.to_i, rand(0xffff)].to_s
page_cache_tree = File.join(ApplicationController.page_cache_directory, 'entries')
FileUtils.mv(page_cache_tree, page_cache_tree + tmp_cache_dir)
FileUtils.rm_rf(page_cache_tree + '-' + tmp_cache_dir)</code></pre>
<p>This renames <code>RAILS_ROOT/public/entries</code> to something like <code>RAILS_ROOT/public/entries-hostname22351125837834752773</code> (which should be sufficiently unique across a number of nodes in a cluster as to avoid collisions) and then deletes it.</p>
<p>If you want to expire the entire page cache, you&#8217;ll need to change the default from <code>RAILS_ROOT/public</code> as you can&#8217;t rename and delete that (it has images and javascripts etc. too!).  Change it to something like <code>RAILS_ROOT/public/page_cache</code>. You&#8217;ll need to update your web server config to consider this new path too.</p>
<p>Remember that rename is only atomic within the same filesystem, so if you symlink your page cache directory from your RAILS_ROOT onto a shared filesystem, then you need to do all your renames and deletes within this.</p>
<p>Also, this has the side effect of working around a bug with our shared filesystem, <a href="http://gluster.com">GlusterFS</a>, which got upset with <a href="http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112">multiple concurrent directory tree deletes</a> (this is now fixed though).</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/expiring-an-entire-page-cache-tree-atomically/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ruby Enterprise 1.8.7-2009.10 Packages for Ubuntu Hardy</title>
		<link>http://blog.brightbox.co.uk/posts/ruby-enterprise-1-8-7-2009-10-packages-for-ubuntu-hardy</link>
		<comments>http://blog.brightbox.co.uk/posts/ruby-enterprise-1-8-7-2009-10-packages-for-ubuntu-hardy#comments</comments>
		<pubDate>Mon, 09 Nov 2009 16:48:49 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[1.8.7]]></category>
		<category><![CDATA[beta]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=808</guid>
		<description><![CDATA[We&#8217;ve built 32bit and 64bit Ubuntu Hardy packages for Ruby Enterprise 1.8.7-2009.10.  These packages are still in beta, and this is quite a major change from the default Hardy Ruby interpreter,which is 1.8.6, so we recommend you test thoroughly before putting it into production.  We&#8217;ve been using them for a couple of days with no [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve built 32bit and 64bit Ubuntu Hardy packages for <a href="http://blog.phusion.nl/2009/10/26/ruby-enterprise-edition-1-8-7-2009-10-released/">Ruby Enterprise</a> 1.8.7-2009.10.  These packages are still in beta, and this is quite a major change from the default Hardy Ruby interpreter,which is 1.8.6, so we recommend you test thoroughly before putting it into production.  We&#8217;ve been using them for a couple of days with no problems though.</p>
<p>As with our other Ruby EE packages, they upgrade (i.e replace) the standard 1.8 Ruby installation. This means all your gems stay the same, and everything on your system immediately starts using them (Phusion&#8217;s own Ubuntu packages do not work like this).  We&#8217;ve tested it with the usual Railsy native gems, RMagick, Mongrel, fasthread etc. and have had no problems.</p>
<p>If you&#8217;re on a Brightbox, just edit <code>/etc/apt/sources.list.d/brightbox-rubyee.list</code> and change the <code>rubyee</code> component to <code>rubyee-testing</code>:</p>
<pre><code>
deb http://apt.brightbox.net/ hardy rubyee-testing
</code></pre>
<p>Then update and upgrade:</p>
<pre><code>
sudo apt-get update
sudo apt-get install libruby1.8
</code></pre>
<p>If you&#8217;re not on a Brightbox, see the <a href="http://wiki.brightbox.co.uk/docs:ruby-enterprise">instructions on our wiki first</a>.  The wiki also documents how to revert back to the old packages.</p>
<p>As said above, we now have 64bit packages available too (which was recently made easier by some Debian package dependency updates, also included in our repository).</p>
<p>Please let us know how they worked out for you <a href="http://forum.brightbox.co.uk/forums/passenger/topics/ruby-enterprise-1-8-7-2009-10-packages-for-ubuntu-hardy">on our forum</a>. Thanks!</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/ruby-enterprise-1-8-7-2009-10-packages-for-ubuntu-hardy/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Queues and Callbacks</title>
		<link>http://blog.brightbox.co.uk/posts/queues-and-callbacks</link>
		<comments>http://blog.brightbox.co.uk/posts/queues-and-callbacks#comments</comments>
		<pubDate>Tue, 03 Nov 2009 09:00:49 +0000</pubDate>
		<dc:creator>Rahoul Baruah</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[AMQP]]></category>
		<category><![CDATA[bigwig]]></category>
		<category><![CDATA[bunny]]></category>
		<category><![CDATA[RabbitMQ]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[warren]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=755</guid>
		<description><![CDATA[A major part of our work behind the scenes is about improving our internal processes and, whenever possible, automating tasks.  To this end we have a number of systems that need to communicate with each other.
The Control Panel that you may be familiar with uses Delayed Job.  This is a Rails-specific gem that [...]]]></description>
			<content:encoded><![CDATA[<p>A major part of our work behind the scenes is about improving our internal processes and, whenever possible, automating tasks.  To this end we have a number of systems that need to communicate with each other.</p>
<p>The Control Panel that you may be familiar with uses <a href="http://github.com/tobi/delayed_job">Delayed Job</a>.  This is a Rails-specific gem that uses the database as a queue, with a nicely packaged worker process that handles messages as they arrive.  Because the Control Panel only ever talks to Rails from Rails, this worked extremely well.</p>
<p>However, our other systems were not homogenous &#8211; there are a number of different interfaces that needed to be instructed at various times and across various machines, and Delayed Job didn&#8217;t really fit the bill.  In particular, there were some tasks that could only happen on certain servers &#8211; while Delayed Job let us have multiple worker processes on different boxes, it essentially managed a single queue, so it could not differentiate between messages for one worker and messages for another.<br />
<span id="more-755"></span></p>
<h2>AMQP to the rescue</h2>
<p>Because of this, we looked elsewhere for our central work queue.  We decided to use the <a href="http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol">AMQP</a> protocol,  with <a href="http://www.rabbitmq.com/">RabbitMQ</a> as our implementation.  AMQP is a protocol for taking incoming messages, placing them on one of many queues and routing them to a destination reliably; RabbitMQ is a server, built in Erlang, that is pretty lightweight and has some nice clustering features built-in.</p>
<h2>Into the Warren</h2>
<p>When it came to getting our Rails applications to talk to RabbitMQ, we had a couple of choices.</p>
<p>There is an <a href="http://github.com/tmm1/amqp/">AMQP gem</a> which looked great.  Unfortunately, as it uses EventMachine internally, it caused a few problems with our Passenger-based deployments &#8211; EventMachine opens a background thread which can cause issues to the web-server controlled Passenger processes.</p>
<p><img class="content_image left size-medium wp-image-765" title="Rabbit on the run" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/09/rabbit-225x300.jpg" alt="Rabbit on the run" width="225" height="300" /></p>
<p>There was also a gem called <a href="http://github.com/celldee/bunny/">bunny</a>.  This works synchronously, thus avoiding the EventMachine issues &#8211; you connect and bunny either says &#8220;here&#8217;s the next message&#8221; or &#8220;the queue is empty&#8221; and then you disconnect.</p>
<p>It looked like bunny was perfect for our Passenger-based apps, with the AMQP gem being used in the non-Passenger side of things (actually in the end, we went with bunny on both sides, but for other reasons).  But there was still a couple of things that we wanted to do with the messages.</p>
<p>Firstly, we are Rubyists and AMQP (the protocol) is language agnostic.  In particular, we wanted to put a hash of data onto the queue and have a hash of data presented to us at the other end.  Secondly, security is important to us &#8211; especially when it comes to tasks like rebooting or reconfiguring a server &#8211; so we wanted to ensure that the contents of the message were not tampered with in transit.</p>
<p>For these reasons, we built <a href="http://github.com/brightbox/warren">Warren</a>.  This adds filters over the AQMP layer.  In our case, we had one filter that automatically marshalls the data to and from YAML as it is put onto and taken off the queue and a second HMAC filter that, with one line of configuration, ensures that the data was not altered on its journey.</p>
<p>Warren itself has an adapter layer, so it can quite happily use either the AMQP gem or bunny to actually talk to the queue.  Adding new adapters, or filters, is as simple as creating a new subclass &#8211; Warren detects it and adds it to its stack.</p>
<h2>Bigwig</h2>
<p>With Warren it is pretty simple to put a message on to the queue:</p>
<pre><code>
Warren::Queue.publish(@queue_name, @hash_of_data)
</code></pre>
<p>It is just as easy to pull the messages off the other end:</p>
<pre><code>
Warren::Queue.subscribe(@queue_name) do | hash_of_data |
  do_something_with hash_of_data
end
</code></pre>
<p>But how do we implement this mysterious <tt>do_something_with(hash_of_data)</tt> call?</p>
<p>For our purposes, the endpoint needs to do different things depending upon which machine we are on and which queue we are listening to.  The key one is our &#8220;builder&#8221; system which handles reboots, migrations and deployments, but there are several others, which while not yet live, will be coming onstream soon.</p>
<p>So effectively, we needed a set of daemon processes that listen to given queues and handle the messages that they receive.  This splits into two components &#8211; the daemon framework and the workers themselves &#8211; which lead to <a href="http://github.com/brightbox/bigwig">Bigwig</a> (keeping the rabbit theme going, Bigwig was a character in <a href="http://en.wikipedia.org/wiki/List_of_characters_in_Watership_Down">Watership Down</a>).</p>
<p>Bigwig expects a configuration file, telling it how to connect to the AMQP server and a folder full of plugins.  Each plugin is a simple Ruby class that performs a given action.  Bigwig takes the incoming messages, looks for a parameter within the Hash called &#8220;method&#8221; and then uses that to find a plugin.  The plugin is then invoked and can perform whatever tasks it needs to, using any data from the incoming message.</p>
<p>For monitoring purposes, Bigwig automatically deals with any incoming messages with a method of &#8220;ping&#8221; &#8211; these simply write a message to the log file.  We can then send ping messages to the queue at set intervals and monitor that the log file is updated when expected &#8211; if we don&#8217;t see the update then we trigger an alert, in case the queue, or Bigwig, is down.</p>
<p>If the queue itself goes down, for whatever reason, then Bigwig uses an intelligent reconnect pattern.  At first, it retries often, to minimise the downtime, but if the queue stays down, it reconnects less frequently, giving the queue a chance to restart before being swamped with connections.  Of course, if the queue fails, then the ping messages won&#8217;t make it through and our monitor should alert us.</p>
<h2>Calling back</h2>
<p>Our primary internal application creates a Task object, with a unique identifier when dispatching tasks across the queue.  This ID is then passed onto the queue and each Bigwig plugin is told of it when it is invoked.  The application itself makes the Tasks available over ActiveResource.</p>
<p><img src="http://blog.brightbox.co.uk/wp-content/uploads/2009/09/3410902-400x300.jpg" alt="3410902" title="3410902" width="400" height="300" class="content_image right alignright size-medium wp-image-773" />This means that the Bigwig plugins themselves don&#8217;t actually need data passing over the queue.  Instead, when they are invoked, they call back into the primary application, using the Task ID as the key to their ActiveResource call.  They can then extract the data they need from the Task object and use that to do whatever they need to do.  When completed, they call the <tt>complete!</tt> method on the ActiveResource object and our application knows that the job has been done (alternatively, they can call <tt>error!</tt> and our app knows that something went wrong).  All of these appear in an event feed on the application&#8217;s homepage &#8211; so we know at a glance what activity is happening across our systems and, more importantly, what has failed.</p>
<p>We could have implemented this using AMQP again &#8211; a &#8216;responses&#8217; queue that our primary application listens to, with each worker putting a message back when it was done.  But we chose to use ActiveResource, partly because it is so simple (Rails makes it super-easy to expose your objects as XML and ActiveResource makes it equally easy for other Ruby programs to call back to them), and partly for philosophical reasons.  When the primary application places a message onto the queue, it doesn&#8217;t necessarily know how it will be handled.  AMQP dispatches it and a listener deals with it &#8211; in our case the listener is <em>likely</em> to be a Bigwig instance, but doesn&#8217;t <em>have</em> to be.  But when the callback is made, it is <em>always</em> made into our application, which is already geared up for completing tasks or marking them as having an error.  As we know that it is a Rails app at the other end, we chose to follow the path of least-resistance and use the &#8220;Rails way&#8221;.</p>
<p>However, we did have one issue with ActiveResource.  Most of our plugins actually shell out to invoke Ruby scripts, with the plugin unpacking the information from the Task and generating command line arguments.  This is a slight security risk, just because it is feasible that someone could inject a malicious command into the command line parameters (although as this is all internal it should never be an issue and Ruby&#8217;s system command does escape any supplied parameters).  So we are switching the scripts to accept environment variables, thus bypassing the shell and eliminating a whole category of potential attacks.  Secondly, using ActiveResource in a non-Rails application caused some weird errors &#8211; but only when you tried to POST back to the ActiveResource object.  It turns out that ActiveSupport was causing some shifting to occur in the background and that was knocking out some of our own code.  The solution was simple &#8211; we had to ensure that the <tt>require 'activeresource'</tt> statement was the first thing in each script.</p>
<p>So that&#8217;s a quick peek into the workings of some of our internal systems.  We put a lot of thought into how these different components should work together, as their reliability is fundamental to our success as a business.  And while they are not infallible (nothing ever is) I think you will agree that they show that using Ruby and AMQP as the &#8220;glue&#8221; to tie different systems together is not only feasible, it&#8217;s actually quite easy.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/queues-and-callbacks/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>The Brightbox Toolkit</title>
		<link>http://blog.brightbox.co.uk/posts/the-brightbox-toolkit</link>
		<comments>http://blog.brightbox.co.uk/posts/the-brightbox-toolkit#comments</comments>
		<pubDate>Wed, 21 Oct 2009 08:40:15 +0000</pubDate>
		<dc:creator>Caius Durling</dc:creator>
				<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=793</guid>
		<description><![CDATA[It&#8217;s been quite interesting to read the recent &#8220;Tools of the Trade&#8221; meme where people are blogging what they use to do their job. I found it so interesting in fact, that I decided to find out what tools we all use at Brightbox. Here&#8217;s our list.
Caius
Hardware

15&#8221; Macbook Pro (Unibody) with 4GB ram, 7200rpm 320GB [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been quite interesting to read the recent &#8220;Tools of the Trade&#8221; <a href="http://rubyflow.com/items/2865">meme</a> where people are blogging what they use to do their job. I found it so interesting in fact, that I decided to find out what tools we all use at Brightbox. Here&#8217;s our list.</p>
<h3>Caius</h3>
<p><b>Hardware</b></p>
<ul>
<li>15&#8221; Macbook Pro (Unibody) with 4GB ram, 7200rpm 320GB HD</li>
<li><a href="http://www.memoryc.com/storage/solidstatedisk/48gbfilematesolidgoexpresscardultra.html">48GB <span class="caps">SSD</span> Expresscard</a></li>
<li>24&#8221; Samsung External Monitor</li>
</ul>
<p><b>Software</b></p>
<ul>
<li><a href="http://macromates.com">TextMate</a> &#8211; My third arm.</li>
<li><a href="http://iterm.sourceforge.net/">iTerm</a> &#8211; Gives me back <code>cmd-&lt;num&gt;</code> for switching tabs</li>
<li><a href="http://adium.im/">Adium</a> / <a href="http://www.atebits.com/tweetie-mac/">Tweetie</a> / <a href="http://limechat.net/mac/">Limechat</a> for communication</li>
<li>Safari &#8211; Eats ram, but I still prefer it to any other mac browsers</li>
<li><a href="http://ditchnet.org/httpclient/"><span class="caps">HTTP</span> Client</a> &#8211; Graphical <code>curl</code>, <em>great</em> for debugging <span class="caps">XML</span> calls</li>
<li><a href="http://daringfireball.net/projects/markdown/">Markdown</a> &#8211; I write everything in it.</li>
</ul>
<p><span id="more-793"></span></p>
<h3>George</h3>
<p><b>Hardware</b></p>
<ul>
<li>Thinkpad <span class="caps">R500</span>, Core 2 Duo <span class="caps">P8600 2</span>.4GHz, 4GB <span class="caps">RAM</span>, 250G 5400rpm disk, Windows Vista Home Premium license.<br />
Running Ubuntu Karmic; was intended to be Jaunty, but there was just too much broken stuff in it for this (quite new) Thinkpad. A great fat heavy breezeblock of a thing, but superb keyboard and display mean it can be used all day and it&#8217;s far and away the most powerful computer I&#8217;ve ever had.</li>
<li>Acer Aspire One for emergencies. &#8211; Running Ubuntu Netbook Remix. <a href="http://blog.brightbox.co.uk/posts/ubuntu-netbook-remix-on-an-acer-aspire-one-a110">(I&#8217;ve blogged about it before)</a>. Cute, useful &#8211; lovely little machine.</li>
<li>Draytek Vigor 2820n and emergency backup <span class="caps">ZTE 627</span>. &#8211; Not that big a step up from the Prism <span class="caps">VTX5000</span>.</li>
<li>Old no-name P4 box and 23&#8221; <span class="caps">LCD</span>.<br />
It&#8217;s shit but it&#8217;s mine. All the other computers are Brightbox&#8217;s. Personal email, house fileserver, source of graphs and music, controller of the central heating, footrest.</li>
</ul>
<p><b>Software</b></p>
<ul>
<li>Lots and lots of xterms &#8211; still the best way to use computers. </li>
<li><span class="caps">GNU</span> screen.</li>
<li>Windows XP inside <span class="caps">KVM</span> &#8211; for those &#8220;need IE&#8221; moments, chiefly involving Dell <span class="caps">DRAC</span> cards or suppliers&#8217; support websites.</li>
<li>Mozilla Thunderbird &#8211; For work email.</li>
<li>Alpine &#8211; For personal email.</li>
<li>Pidgin IM &#8211; I&#8217;m indifferent to it, but it works.</li>
<li><a href="http://en.wikipedia.org/wiki/Joe%27s_Own_Editor">joe</a> &#8211; Because I learned WordStar at age 11 on my first PC, from my dad, who knew it and may well have used it before I was born.</li>
<li>Google Chrome &#8211; Intuitive, fast, stable, and pretty. If the Google monopoly will make everything this good then bring it on.</li>
<li>Google Calendar.</li>
</ul>
<h3>Jeremy</h3>
<p><b>Hardware</b></p>
<ul>
<li>15&#8221; Macbook Pro (Unibody) with 4GB <span class="caps">RAM</span> &#8211; the best machine I&#8217;ve ever owned by far both in terms of reliability and design</li>
<li>20&#8221; Dell 2005FPW external monitor at the office</li>
</ul>
<p><b>Software</b></p>
<ul>
<li>TextEdit &#8211; I find myself writing lots of notes in plain txt files</li>
<li><a href="http://www.barebones.com/products/Yojimbo/">Yojimbo</a> &#8211; collate all sorts of notes, PDFs etc</li>
<li>Fireworks <span class="caps">CS3</span><br />
I often use the Mac &#8220;common library&#8221; objects to quickly mockup forms which works nice. Probably the last Adobe software I&#8217;ll ever buy, they have a horrid licensing policy and the software is generally bug ridden. I probably could have built a small city with the money I&#8217;ve wasted on Adobe licences over the years</li>
<li>Safari &#8211; not exactly lightening fast, but I&#8217;m used to it (I use DeliciousSafari plugin as <span class="caps">CMD</span>+D which is nice)</li>
<li>Adium &#8211; nuff said</li>
<li>Terminal &#8211; with Ciarán&#8217;s <a href="http://ciaranwal.sh/2007/12/10/tab-switching-in-terminal">terminal tab switching bundle</a></li>
</ul>
<h3>John Leach</h3>
<p><b>Hardware</b></p>
<ul>
<li>ThinkPad <span class="caps">R61</span></li>
<li>Some kind of EeePC for on-call on-the-go</li>
<li>Bialetti stove-top coffee maker</li>
<li>Xbox 360</li>
</ul>
<p><b>Software</b></p>
<ul>
<li>Debian, Ubuntu.</li>
<li>Ruby!</li>
<li><span class="caps">SSH</span>, bash, Capistrano, Puppet.</li>
<li>Wireshark protocol analyzer &#8211; How do people troubleshoot <strong>anything</strong> without it?</li>
<li>Strace, gdb &#8211; Useful for detecting how much crack a developer has been smoking.</li>
<li>Emacs for development.</li>
<li>Vim for config file editing.</li>
<li>Tomboy for note keeping. I keep a <span class="caps">LOT</span> of notes.</li>
<li>Redmine &#8211; It&#8217;s what projects crave.</li>
<li>Guitar Hero</li>
</ul>
<h3>Louisa</h3>
<p><b>Hardware</b></p>
<ul>
<li>Dell <span class="caps">XPS M1330</span> &#8211; came pre-installed with Ubuntu and it JustWorks™<br />
Using Hardy &#8211; I prefer stability to the bleeding edge (ie, change scares me).</li>
</ul>
<p><b>Software</b></p>
<ul>
<li>I mostly live in Firefox even though I suspect I should be using Google Chrome (see aforementioned comment re: scaredyness)</li>
<li>I do a lot of admin stuff in OpenOffice but find I&#8217;m more productive actually writing stuff in gedit because then I don&#8217;t get obsessed with formatting and fonts</li>
<li>I use a combination of <a href="http://projects.gnome.org/tomboy/">TomBoy</a> and a text file called scratchpad.txt for notes/drafts of stuff in progress</li>
<li>I use Pidgin for IM/IRC</li>
<li>I use <a href="http://www.gimp.org/"><span class="caps">GIMP</span></a> and <a href="http://www.inkscape.org/">Inkscape</a> a lot for photo-editing &#38; design stuff (although not really that much for Brightbox because Jeremy is so much better at it than I am ;) )</li>
<li>Talking of not-for-Brightbox design stuff, I use <a href="http://kxstitch.sourceforge.net/">KXStitch</a> for designing stitch charts for (often geeky) craft projects</li>
</ul>
<p>I prefer a paper desk diary instead of using Google Calendar or to-do list software, but have to use the former to keep up to date with the rest of the team</p>
<h3>Rahoul</h3>
<p><b>Hardware</b></p>
<ul>
<li>Macbook Pro 15&#8221; Core 2 Duo with 3Gb <span class="caps">RAM</span><br />
Running Leopard as I&#8217;ve not had time to upgrade to Snow Leopard yet</li>
<li>EeePC 701 for emergencies<br />
Running Ubuntu Netbook Remix</li>
<li>MacMini Core Duo<br />
Running Snow Leopard</li>
</ul>
<p><b>Software</b></p>
<ul>
<li><a href="http://www.panic.com/coda/">Coda</a> and <a href="http://www.barebones.com/products/TextWrangler/">Textwrangler</a> &#8211; Believe it or not, I don&#8217;t like Textmate</li>
<li><a href="http://adium.im/">Adium</a> and <a href="http://www.nambu.com/">Nambu</a></li>
<li><a href="http://fluidapp.com/">Fluid</a> &#8211; To keep my important web-based stuff separate to Safari</li>
<li><a href="http://flyingmeat.com/acorn/">Acorn</a> &#8211; Can&#8217;t afford Photoshop, don&#8217;t want it</li>
<li><a href="http://www.potionfactory.com/thehitlist/">The Hit List</a>, iCal, <a href="http://spanningsync.com/">Spanning Sync</a> and Google Calendar &#8211; Productivity ahoy</li>
<li>Windows Vista inside VMWare, with <a href="http://my-debugbar.com/wiki/IETester/HomePage">IETester</a> &#8211; Because <span class="caps">IE6</span> still exists</li>
</ul>
<h2>Shared tools</h2>
<p>And finally some shared tools that we all use for various things.</p>
<ul>
<li><a href="http://www.xero.com/">Xero</a> for our accounts</li>
<li><a href="http://highrisehq.com/">Highrise</a> to keep track of sales/marketing stuff</li>
<li><a href="http://www.getdropbox.com/">Dropbox</a> for quick&#8217;n&#8217;easy doc sharing<br />
<em>(I love how it JustWorks™ on Linux&#8212;Louisa)</em></li>
<li><a href="http://www.redmine.org/">Redmine</a> for project management and bug tracking.</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/the-brightbox-toolkit/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux Sys Admin &#8211; Join the Brightbox team!</title>
		<link>http://blog.brightbox.co.uk/posts/linux-sys-admin-join-the-brightbox-team</link>
		<comments>http://blog.brightbox.co.uk/posts/linux-sys-admin-join-the-brightbox-team#comments</comments>
		<pubDate>Wed, 07 Oct 2009 09:00:58 +0000</pubDate>
		<dc:creator>Louisa Parry</dc:creator>
				<category><![CDATA[jobs]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[leeds]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[sys admin]]></category>
		<category><![CDATA[sysadmin]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=775</guid>
		<description><![CDATA[We’re looking for an experienced and motivated Linux Systems Administrator to join our Technical Team here at Brightbox.
You’ll work closely with our Technical Director and Senior Sys Admin to run our virtual hosting platform, our Ruby on Rails hosting clusters, our network and our MySQL databases.  A full job description is below.
The role is [...]]]></description>
			<content:encoded><![CDATA[<p>We’re looking for an experienced and motivated Linux Systems Administrator to join our Technical Team here at Brightbox.</p>
<p>You’ll work closely with our Technical Director and Senior Sys Admin to run our virtual hosting platform, our Ruby on Rails hosting clusters, our network and our MySQL databases.  A full job description is below.</p>
<p>The role is full-time and you can work from home, from our office in Leeds, or a bit of both (the rest of us do a bit of both).</p>
<p>Send a hello, a CV and salary expectations to jobs at the Brightbox UK domain. CVs should be in an open format, preferably PDF or plain text. Closing date is <strong>24th October 2009</strong>.</p>
<p>As always, recruitment agents should e-mail our special recruitment company email address: root@localhost</p>
<ul>
<li><a href="http://www.brightbox.co.uk/about/jobs">More jobs available at Brightbox</a></li>
<li><a href="http://www.brightbox.co.uk/about/working-for-brightbox">More about working for Brightbox</a></li>
</ul>
<p><span id="more-775"></span></p>
<h3>Linux Systems Administrator</h3>
<p><strong>Job Description</strong></p>
<ul>
<li>Work under the Technical Director and with our other system admins to support and run:</li>
<ul>
<li>our customers’ Ruby on Rails hosting clusters</li>
<li>our virtual hosting platform</li>
<li>our MySQL systems</li>
<li>our networking infrastructure</li>
<li>our backup systems</li>
<li>our network management and monitoring systems</li>
</ul>
<li>Provide excellent customer service and support</li>
<li>Assist with technical sales</li>
<li>Participate in an out-of-hours on-call rota</li>
<li>Work from home or our office in Leeds, or a mixture of the two</li>
<li>Occasional visits to our hosting data centres for new builds and hardware maintenance</li>
<li>Update technical and process documentation</li>
</ul>
<p><strong>Qualifications</strong></p>
<ul>
<li>2+ years experience with GNU/Linux based systems</li>
<li>Experience with web technologies such as NGINX, Apache &#038; mongrel</li>
<li>Experience with Ruby, Rails desirable</li>
<li>Familiarity with Puppet, Virtualization, MySQL, PostgreSQL, LVM desirable</li>
<li>Familiarity with common Internet services such as DNS and SMTP</li>
<li>Experience working with customers</li>
<li>Ability to work both independently and as part of a team</li>
<li>Keeps up with new technologies and developments</li>
<li>Good written and verbal communication skills</li>
<li>Able to commute to Leeds, UK for team meetings</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/linux-sys-admin-join-the-brightbox-team/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Netbook Remix on an Acer Aspire One A110</title>
		<link>http://blog.brightbox.co.uk/posts/ubuntu-netbook-remix-on-an-acer-aspire-one-a110</link>
		<comments>http://blog.brightbox.co.uk/posts/ubuntu-netbook-remix-on-an-acer-aspire-one-a110#comments</comments>
		<pubDate>Thu, 24 Sep 2009 14:59:08 +0000</pubDate>
		<dc:creator>George Hills</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[acer]]></category>
		<category><![CDATA[acer aspire]]></category>
		<category><![CDATA[acer aspire A110]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=737</guid>
		<description><![CDATA[For my weeks on call, Brightbox let me choose an ultra-mobile (netbook) PC.  This will allow me to leave the house without having to carry a heavy full-size laptop with me.
I wanted one that worked well with Linux, preferably Ubuntu Netbook Remix, had SSD rather than hard disk, and built-in 3G connectivity.
I&#8217;ve picked the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="right content_image size-full wp-image-745" title="acer-aspire-one" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/09/acer-aspire-one.jpg" alt="acer-aspire-one" width="250" height="250" />For my weeks on call, Brightbox let me choose an ultra-mobile (netbook) PC.  This will allow me to leave the house without having to carry a heavy full-size laptop with me.</p>
<p>I wanted one that worked well with Linux, preferably Ubuntu Netbook Remix, had SSD rather than hard disk, and built-in 3G connectivity.</p>
<p>I&#8217;ve picked the Acer Aspire One (AAO) A110. It was available in the UK from Tesco in this spec with 1GB of RAM for GBP 179 &#8211; a bargain.</p>
<p>It came with a truly dreadful pre-installed build of Windows XP Home. Very slow and very much not recommended. Ubuntu Netbook Remix is, on the other hand, superb.</p>
<p>I&#8217;ve installed the pre-release Ubuntu 9.10 &#8220;Karmic&#8221;. Here&#8217;s what I&#8217;ve found that&#8217;s specific to the A110. I&#8217;ve written up these notes in the hope that they&#8217;ll be useful to someone else thinking of running Linux on an AAO. While there is a wealth of information about it out on the Internet, it&#8217;s not all collected together in one place.<br />
<span id="more-737"></span></p>
<ul>
<li>The 3G unit is an Option GTM380 (USB ID 0af0:7211). SIM card goes in behind the battery in a very strange orientation &#8211; connectors facing outwards &#8211; but the correct orientation is the only one it will click home in. This is a good card and works well out-of-the-box in Ubuntu.  I&#8217;m using a &#8220;3&#8243; PAYG SIM in it, with the &#8220;50p for a day&#8217;s Internet&#8221; offer, but it&#8217;s unlocked for all networks &#8211; if 3 isn&#8217;t available, I can pop in the SIM from my own phone very quickly.</li>
<li>The wireless toggle switch on the front works in a slightly unexpected way. When &#8220;disabled&#8221;, both the 3G and Wifi interfaces still appear to the OS and can be configured &#8211; but their radio interfaces appear to be disabled so they can&#8217;t communicate.</li>
<li>The 3G Wifi, sound, webcam, keyboard and synaptics touchpad all worked fine out-of-the-box. There are widespread complaints on the Internet about the poor quality of driver support for the Atheros<br />
chipset the wifi uses, but it&#8217;s fine for me in Ubuntu Karmic.</li>
<li>The left-hand SecureDigital card slot works as shipped, but the right-hand (multi-card) one is not detected. To fix this, edit the kernel command-line (in /etc/default/grub) and append &#8220;pciehp.pciehp_force=1&#8243;, then run update-grub2 and reboot.</li>
<li>The above SD slot fix also fixes suspend; without it, the AAO hangs on resume.</li>
<li>The SSD is quite a lot slower than a traditional hard disk, but uses less power and is more robust. To compensate for the slowness there are a few things we can do.
<ul>
<li>Mount the root filesystem &#8220;noatime&#8221;. This stops it from recording the last time every file has been accessed &#8211; a functionality few people need. Add &#8220;noatime&#8221; to the options for &#8220;/&#8221; in /etc/fstab to do this.</li>
<li>By default, Linux tries to combine hard disk activity involvin parts of the disk which are close together. Normally, this is faster because it reduces the amount of (slow) seeking the disk has to do. The SSD is solid-state, so seeking is free &#8211; we can get quite a speed-up from disabling this behaviour by adding &#8220;elevator=noop&#8221; to the kernel commandline. In the new Karmic grub2 this is controlled from<br />
/etc/default/grub, and you need to run &#8220;update-grub2&#8243; after editing it.</li>
<li>If you want to take this a bit further, you can reduce the amount of syslog logging, or have syslog log to a tmpfs (memory) filesystem.</li>
</ul>
</li>
</ul>
<p><img class="right content_image size-full wp-image-744" title="spencer-laptop" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/09/spencer-laptop.jpg" alt="spencer-laptop" width="250" height="250" /></p>
<ul>
<li>The BIOS will control the internal fan adequately, but it&#8217;ll end up turned on quite a lot. It&#8217;s pretty quiet, but you can silence it completely by turning it off unless the AAO&#8217;s innards are properly warm.<br />
Beware if you play with this that it may be possible to cause permanent damage to the AAO by overheating if you set these values incorrectly.  You may also render your AAO inaccessible by causing it to become just pleasantly warm, which results in your cat going to sleep on top of it.</p>
<ul>
<li>Fetch the &#8220;acerhdf&#8221; source from <a href="http://piie.net/index.php?section=acerhdf">http://piie.net/index.php?section=acerhdf</a>; I&#8217;m using 0.5.17 with Ubuntu&#8217;s 2.6.31 kernel.</li>
<li>You&#8217;ll need the Ubuntu linux-kernel-headers package installed, and the C compiler &amp; libraries; if you install the &#8220;build-essential&#8221; package, it depends on everything you&#8217;ll need and it&#8217;ll all get installed for you.</li>
<li>untar, &#8220;make&#8221; and &#8220;make install&#8221; the acerhdf module.</li>
<li>As of 0.5.17, the module behaves slightly differently to how its README file suggests. What you now need to do is:<br />
- &#8220;modprobe acerhdf verbose=1&#8243;<br />
- Watch the kernel log (dmesg) to see if it&#8217;s outputting succesfully<br />
- If it is, then add the module to your /etc/modules with your desired parameters &#8211; I&#8217;m using &#8220;acerhdf fanon=75 fanoff=70 verbose=1&#8243;<br />
- Enable it by adding a line above the &#8220;exit 0&#8243; in your /etc/rc.local: &#8220;echo -n &#8220;enabled&#8221; &gt; /sys/class/thermal/thermal_zone0/mode&#8221;. It will then take effect at next  reboot</li>
</ul>
</li>
<li>BIOS flash &#8211; if you have anything before v3309, upgrade to get worthwhile fixes (eg to the card readers). Alternatively, Packard Bell and Gateway 2000 both make a model of Netbook which shares hardware with the AAO.I like the Gateway 2000 BIOS because
<ul>
<li>It changes the BIOS logo to a cow-coloured cube.</li>
<li>It provides a better choice of screen brightnesses, specifically giving the option of a really low brightness level, which saves battery power and is still ample for low-light conditions.</li>
<li>Fetch it from here &#8211; note that this probably voids your warranty:<br />
<a href="http://sites.google.com/site/maclesblogspotcom/BIOS/PBG">http://sites.google.com/site/maclesblogspotcom/BIOS/PBG</a></li>
</ul>
</li>
</ul>
<h4>Useful AAO links</h4>
<ul>
<li>AAO blog <a href="http://macles.blogspot.com/">http://macles.blogspot.com/</a></li>
<li>AAO Ubuntu pages <a href="https://help.ubuntu.com/community/AspireOne">https://help.ubuntu.com/community/AspireOne</a></li>
<li>AAO forums <a href="http://www.aspireoneuser.com/forum/">http://www.aspireoneuser.com/forum/</a></li>
</ul>
<h4>Some non-AAO-specific suggestions</h4>
<ul>
<li>Throw out Firefox and get Google Chrome installed. The Linux version is now more than ready for everyday use.</li>
<li>If you want remote-control of your Netbook (eg as you configure it), the VNC Server package for the Ubuntu desktop is called &#8220;vino&#8221;. It&#8217;s not installed by default in UNR.</li>
<li>I strongly recommend removing the &#8220;quiet&#8221; and &#8220;splash&#8221; options from the Kernel command line &#8211; again in /etc/default/grub. This removes the pretty graphical effects at boot-time, but allows you to see what&#8217;s happened if something goes wrong.</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/ubuntu-netbook-remix-on-an-acer-aspire-one-a110/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>NGINX buffer underflow security vulnerability</title>
		<link>http://blog.brightbox.co.uk/posts/nginx-buffer-underflow-security-vulnerability</link>
		<comments>http://blog.brightbox.co.uk/posts/nginx-buffer-underflow-security-vulnerability#comments</comments>
		<pubDate>Tue, 15 Sep 2009 17:11:58 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[packages]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=732</guid>
		<description><![CDATA[From the Debian Security team (CVE-2009-2629):
nginx &#8230; is vulnerable to a buffer underflow when processing certain HTTP requests. An attacker can use this to execute arbitrary code with the rights of the worker process  or possibly perform denial of service attacks by repeatedly crashing worker processes via a specially crafted URL in an HTTP request.
New [...]]]></description>
			<content:encoded><![CDATA[<p>From the <a href="http://www.debian.org/security/2009/dsa-1884">Debian Security team</a> (<a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-2629">CVE-2009-2629</a>):</p>
<blockquote><p>nginx &#8230; is vulnerable to a buffer underflow when processing certain HTTP requests. An attacker can use this to execute arbitrary code with the rights of the worker process  or possibly perform denial of service attacks by repeatedly crashing worker processes via a specially crafted URL in an HTTP request.</p></blockquote>
<p>New versions of our <a href="http://wiki.brightbox.co.uk/docs:brightboxaptrepository:packages">nginx packages</a> that address this security vulnerability are now available.  nginx 0.6.39 (with the fair balancer module) is available from the Brightbox apt repositories &#8211; running the following command will get you the latest version:</p>
<pre>sudo apt-get update
sudo apt-get install nginx</pre>
<p>Our more experimental nginx-brightbox package has also been upgraded to 0.6.39.  This includes a number of nginx addons, such as the <a href="http://www.grid.net.ru/nginx/upload.en.html">upload module</a>, <a href="http://wiki.nginx.org/NginxHttpGeoIPModule">geoip module</a>, and <a href="http://www.modrails.com/">Phusion Passenger 2.0.5</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/nginx-buffer-underflow-security-vulnerability/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails form helper security vulnerability</title>
		<link>http://blog.brightbox.co.uk/posts/rails-form-helper-security-vulnerability</link>
		<comments>http://blog.brightbox.co.uk/posts/rails-form-helper-security-vulnerability#comments</comments>
		<pubDate>Fri, 04 Sep 2009 10:22:47 +0000</pubDate>
		<dc:creator>John Leach</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[attach]]></category>
		<category><![CDATA[cross site scripting]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[vulnerability]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=724</guid>
		<description><![CDATA[A vulnerability has been found in the Rails form helpers that allows an attacker to inject arbitrary HTML into pages.  This opens up an unpatched Rails app to potential cross site scripting attacks (XSS), which could result in stolen session cookies and other such scenarios.
All versions of Rails above and including version 2.0 are affected. [...]]]></description>
			<content:encoded><![CDATA[<p>A vulnerability has been found in the Rails form helpers that allows an attacker to inject arbitrary HTML into pages.  This opens up an unpatched Rails app to potential <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">cross site scripting attacks</a> (XSS), which could result in stolen session cookies and other such scenarios.</p>
<p>All versions of Rails above and including version 2.0 are affected. There are two new official releases to fix this, 2.3.4 and 2.2.3.  If you&#8217;re still running Rails 2.0 or 2.1 and can&#8217;t upgrade, patches have been provided by the security team but need applying manually.  In this case, we&#8217;d recommend vendoring the rails gems and then applying the patches.</p>
<p><a href="http://groups.google.com/group/rubyonrails-security/msg/7f57cd7794e1d1b4">More details from the security team here.</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/rails-form-helper-security-vulnerability/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Brightbox sponsors LRUG (London Ruby User Group)</title>
		<link>http://blog.brightbox.co.uk/posts/brightbox-sponsors-lrug-london-ruby-user-group</link>
		<comments>http://blog.brightbox.co.uk/posts/brightbox-sponsors-lrug-london-ruby-user-group#comments</comments>
		<pubDate>Tue, 25 Aug 2009 09:00:33 +0000</pubDate>
		<dc:creator>Jeremy Jarvis</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[london]]></category>
		<category><![CDATA[lrug]]></category>
		<category><![CDATA[sponsor]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=713</guid>
		<description><![CDATA[Together with our friends at Eden Development, Unboxed Consulting and Skills Matter, Brightbox will be sponsoring LRUG events for the next few months.
The next event, on Wednesday 9th September at The Crypt in Clerkenwell, will be a Coding Dojo which sounds like fun! Don&#8217;t forget to register as early as you can if you&#8217;re going.]]></description>
			<content:encoded><![CDATA[<p><img class="right content_image size-full wp-image-714" title="elrug" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/08/elrug.jpg" alt="elrug" width="179" height="181" />Together with our friends at <a href="http://www.edendevelopment.co.uk">Eden Development</a>, <a href="http://www.unboxedconsulting.com/">Unboxed Consulting</a> and <a href="http://skillsmatter.com/">Skills Matter</a>, Brightbox will be sponsoring <a href="http://lrug.org">LRUG</a> events for the next few months.</p>
<p>The <a href="http://lrug.org/meetings/2009/08/18/september-2009-meeting/">next event</a>, on Wednesday 9th September at The Crypt in Clerkenwell, will be a <a href="http://codingdojo.org/cgi-bin/wiki.pl?WhatIsCodingDojo">Coding Dojo</a> which sounds like fun! Don&#8217;t forget to <a href="http://skillsmatter.com/event/ajax-ria/lrug-sep">register as early as you can</a> if you&#8217;re going.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/brightbox-sponsors-lrug-london-ruby-user-group/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Senior Rails Developer &#8211; Join the Brightbox team!</title>
		<link>http://blog.brightbox.co.uk/posts/senior-rails-developer-join-the-brightbox-team</link>
		<comments>http://blog.brightbox.co.uk/posts/senior-rails-developer-join-the-brightbox-team#comments</comments>
		<pubDate>Mon, 24 Aug 2009 10:34:58 +0000</pubDate>
		<dc:creator>Louisa Parry</dc:creator>
				<category><![CDATA[jobs]]></category>
		<category><![CDATA[careers]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[leeds]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=707</guid>
		<description><![CDATA[We&#8217;re currently looking for an experienced and motivated Senior Rails Developer/Project Manager to join our development team here at Brightbox.
You&#8217;ll work closely both with our Development and Technical Teams to develop our customer control panel and other backend systems.  We&#8217;re looking for someone who, in addition to being a great coder, will be an [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re currently looking for an experienced and motivated Senior Rails Developer/Project Manager to join our development team here at Brightbox.</p>
<p>You&#8217;ll work closely both with our Development and Technical Teams to develop our customer control panel and other backend systems.  We&#8217;re looking for someone who, in addition to being a great coder, will be an integral part of the team and an organised and enthusiastic project manager.</p>
<p>The role is full-time and you can work from home, from our office in Leeds, or a bit of both (the rest of us do a bit of both).</p>
<p>Send a hello, a CV and salary expectations to jobs at the Brightbox UK domain. CVs should be in an open format, preferably PDF or plain text. Closing date is Friday 11th September 2009.</p>
<p>As always, recruitment agents should e-mail our special recruitment company email address: root@localhost<br />
<span id="more-707"></span></p>
<p><strong>Job Description</strong></p>
<ul>
<li>Work under the Technical Director and with our other developers to:</li>
<ul>
<li>Maintain and extend our &#8220;cloud&#8221; management systems</li>
<li>Maintain and extend our billing system</li>
<li>Build the front end for our next generation of deployment systems</li>
<li>Help with application consultancy (advising customers how to design and scale their apps)</li>
<li>Work on side-projects that help the community and promote Brightbox (such as isitruby19.com)</li>
<li>Extract code to be shared with the community as open source/free software</li>
<li>Invent and develop new ideas for services and products</li>
</ul>
<li>Project manage several concurrent projects</li>
<li>Work from home or our office in Leeds</li>
</ul>
<p><strong>Qualifications</strong></p>
<ul>
<li>Great Ruby on Rails coding skills</li>
<li>A track record of implementing live RoR sites</li>
<li>Experience of test driven development using RSpec</li>
<li>Experience of deploying Rails using tools such as Capistrano</li>
<li>Experience of project management desirable</li>
<li>Proactive developer able to work independently as well as part of the team</li>
<li>Suited to working in an agile, flexible environment</li>
<li>Good written and verbal communication skills</li>
<li>Living within 2 hours of the UTC time zone</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/senior-rails-developer-join-the-brightbox-team/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>T-shirt giveaway</title>
		<link>http://blog.brightbox.co.uk/posts/t-shirt-giveaway</link>
		<comments>http://blog.brightbox.co.uk/posts/t-shirt-giveaway#comments</comments>
		<pubDate>Fri, 21 Aug 2009 11:06:20 +0000</pubDate>
		<dc:creator>Louisa Parry</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[freebies]]></category>
		<category><![CDATA[giveaway]]></category>
		<category><![CDATA[tshirts]]></category>

		<guid isPermaLink="false">http://blog.brightbox.co.uk/?p=682</guid>
		<description><![CDATA[It&#8217;s come to our attention that some of our customers don&#8217;t have our highly coveted Brightbox tshirts and we want to rectify that tragic state of affairs :)
We&#8217;ve got shirts in a range of sizes &#8211; standard unisex Ts from small to XXL, and women&#8217;s shirts in Medium &#38; Large.
If you&#8217;re a Brightbox customer and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="right content_image size-full wp-image-684" title="brightbox-tshirts" src="http://blog.brightbox.co.uk/wp-content/uploads/2009/08/brightbox-tshirts.jpg" alt="brightbox-tshirts" width="300" height="300" />It&#8217;s come to our attention that some of our customers don&#8217;t have our highly coveted Brightbox tshirts and we want to rectify that tragic state of affairs :)</p>
<p>We&#8217;ve got shirts in a range of sizes &#8211; standard unisex Ts from small to XXL, and women&#8217;s shirts in Medium &amp; Large.</p>
<p>If you&#8217;re a Brightbox customer and want to add one of these super-stylish charcoal garments to your wardrobe, send me an email (louisa @ brightbox.co.uk) telling me your details and what size you would like, and I&#8217;ll get one in the post to you as soon as possible.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.brightbox.co.uk/posts/t-shirt-giveaway/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
