<?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>James Henstridge &#187; Launchpad</title>
	<atom:link href="http://blogs.gnome.org/jamesh/tag/launchpad/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.gnome.org/jamesh</link>
	<description>Random stuff</description>
	<lastBuildDate>Tue, 27 Oct 2009 08:48:18 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Launchpad code scanned by Ohloh</title>
		<link>http://blogs.gnome.org/jamesh/2009/10/27/launchpad-ohloh/</link>
		<comments>http://blogs.gnome.org/jamesh/2009/10/27/launchpad-ohloh/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 08:48:18 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[Launchpad]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/?p=448</guid>
		<description><![CDATA[Today Ohloh finished importing the Launchpad source code and produced the first source code analysis report.  There seems to be something fishy about the reported line counts (e.g. -3,291 lines of SQL), but the commit counts and contributor list look about right.  If you&#8217;re interested in what sort of effort goes into producing an application [...]]]></description>
			<content:encoded><![CDATA[<p>Today <a href="http://www.ohloh.net/">Ohloh</a> finished importing the Launchpad source code and produced the first <a title="Launchpad.net Code Analysis" href="https://www.ohloh.net/p/launchpad/analyses/latest">source code analysis report</a>.  There seems to be something fishy about the reported line counts (e.g. -3,291 lines of SQL), but the commit counts and contributor list look about right.  If you&#8217;re interested in what sort of effort goes into producing an application like Launchpad, then it is worth a look.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2009/10/27/launchpad-ohloh/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu packages for Rygel</title>
		<link>http://blogs.gnome.org/jamesh/2009/06/17/ubuntu-packages-for-rygel/</link>
		<comments>http://blogs.gnome.org/jamesh/2009/06/17/ubuntu-packages-for-rygel/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 04:17:58 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Launchpad]]></category>
		<category><![CDATA[PlayStation 3]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[UPnP]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/?p=431</guid>
		<description><![CDATA[I promised Zeeshan that I&#8217;d have a look at his Rygel UPnP Media Server a few months back, and finally got around to doing so.  For anyone else who wants to give it a shot, I&#8217;ve put together some Ubuntu packages for Jaunty and Karmic in a PPA here:

https://launchpad.net/~jamesh/+archive/upnp

Most of the packages there are just [...]]]></description>
			<content:encoded><![CDATA[<p>I promised <a href="http://zee-nix.blogspot.com/">Zeeshan</a> that I&#8217;d have a look at his <a href="http://live.gnome.org/Rygel">Rygel UPnP Media Server</a> a few months back, and finally got around to doing so.  For anyone else who wants to give it a shot, I&#8217;ve put together some Ubuntu packages for Jaunty and Karmic in a <a href="https://help.launchpad.net/Packaging/PPA">PPA</a> here:</p>
<ul>
<li><a href="https://launchpad.net/~jamesh/+archive/upnp">https://launchpad.net/~jamesh/+archive/upnp</a></li>
</ul>
<p>Most of the packages there are just rebuilds or version updates of existing packages, but the Rygel ones were done from scratch.  It is the first Debian package I&#8217;ve put together from scratch and it wasn&#8217;t as difficult as I thought it might be.  The tips from the &#8220;Teach me packaging&#8221; workshop at the Canonical All Hands meeting last month were quite helpful.</p>
<p>After installing the package, you can configure it by running the &#8220;rygel-preferences&#8221; program.  The first notebook page lets you configure the transcoding support, and the second page lets you configure the various media source plugins.</p>
<p>I wasn&#8217;t able to get the <a href="http://projects.gnome.org/tracker/">Tracker</a> plugin working on my system, which I think is due to Rygel expecting the older Tracker D-Bus API.  I was able to get the folder plugin working pretty easily though.</p>
<p>Once things were configured, I ran Rygel itself and an extra icon showed up on my PlayStation 3.  Getting folder listings was quite slow, but apparently this is limited to the folder back end and is currently being worked on.  It&#8217;s a shame I wasn&#8217;t able to test the more mature Tracker back end.</p>
<p>With <a title="Linear pulse code modulation" href="http://en.wikipedia.org/wiki/Linear_pulse_code_modulation">LPCM</a> transcoding enabled, I was able to successfully play a <a href="http://xiph.org/vorbis/">Vorbis</a> file on the PS3.  With transcoding disabled, I wasn&#8217;t able to play any music &#8212; even files in formats the PS3 could handle natively.  This was apparently due to the folder backend not providing the necessary metadata.  I didn&#8217;t have any luck with MPEG2 transcoding for video.</p>
<p>It looks like Rygel has promise, but is not yet at a stage where it could replace something like MediaTomb.  The <a href="http://live.gnome.org/Rygel/MediaServerSpec">external D-Bus media source</a> support looks particularly interesting.  I look forward to trying out version 0.4 when it is released.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2009/06/17/ubuntu-packages-for-rygel/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>django-openid-auth</title>
		<link>http://blogs.gnome.org/jamesh/2009/04/14/django-openid-auth/</link>
		<comments>http://blogs.gnome.org/jamesh/2009/04/14/django-openid-auth/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 08:25:56 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Launchpad]]></category>
		<category><![CDATA[OpenID]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/?p=426</guid>
		<description><![CDATA[Last week, we released the source code to django-openid-auth.  This is a small library that can add OpenID based authentication to Django applications.  It has been used for a number of internal Canonical projects, including the sprint scheduler Scott wrote for the last Ubuntu Developer Summit, so it is possible you&#8217;ve already used the code.
Rather [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, we released the source code to <a href="https://launchpad.net/django-openid-auth">django-openid-auth</a>.  This is a small library that can add <a href="http://openid.net/">OpenID</a> based authentication to <a href="http://www.djangoproject.com/">Django</a> applications.  It has been used for a number of internal Canonical projects, including the sprint scheduler <a title="Scott James Remnant" href="http://www.netsplit.com/">Scott</a> wrote for the last Ubuntu Developer Summit, so it is possible you&#8217;ve already used the code.</p>
<p>Rather than trying to cover all possible use cases of OpenID, it focuses on providing OpenID Relying Party support to applications using Django&#8217;s <a title="User authentication in Django" href="http://docs.djangoproject.com/en/dev/topics/auth/">django.contrib.auth</a> authentication system.  As such, it is usually enough to edit just two files in an existing application to enable OpenID login.</p>
<p>The library has a number of useful features:</p>
<ul>
<li>As well as the standard method of prompting the user for an identity URL, you can configure a fixed OpenID server URL.  This is useful for deployments where OpenID is being used for single sign on, and you always want users to log in using a particular OpenID provider.  Rather than asking the user for their identity URL, they are sent directly to the provider.</li>
<li>It can be configured to automatically create accounts when new identity URLs are seen.</li>
<li>User names, full names and email addresses can be set on accounts based on data sent via the <a href="http://openid.net/specs/openid-simple-registration-extension-1_1-01.html">OpenID Simple Registration</a> extension.</li>
<li>Support for <a href="https://launchpad.net/">Launchpad</a>&#8217;s Teams OpenID extension, which lets you query membership of Launchpad teams when authenticating against Launchpad&#8217;s OpenID provider.  Team memberships are mapped to Django group membership.</li>
</ul>
<p>While the code can be used for generic OpenID login, we&#8217;ve mostly been using it for single sign on.  The hope is that it will help members of the Ubuntu and Launchpad communities reuse our authentication system in a secure fashion.</p>
<p>The source code can be downloaded using the following <a href="http://bazaar-vcs.org/">Bazaar</a> command:</p>
<blockquote>
<pre>bzr branch lp:django-openid-auth</pre>
</blockquote>
<p>Documentation on how to integrate the library is available in the <tt>README.txt</tt> file.  The library includes some code written by <a href="http://simonwillison.net/">Simon Willison</a> for <a href="http://code.google.com/p/django-openid/">django-openid</a>, and uses the same licensing terms (2 clause BSD) as that project.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2009/04/14/django-openid-auth/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Storm 0.13</title>
		<link>http://blogs.gnome.org/jamesh/2008/08/29/storm-013/</link>
		<comments>http://blogs.gnome.org/jamesh/2008/08/29/storm-013/#comments</comments>
		<pubDate>Fri, 29 Aug 2008 08:21:20 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Launchpad]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Storm]]></category>
		<category><![CDATA[Zope]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/2008/08/29/storm-013/</guid>
		<description><![CDATA[Yesterday, Thomas rolled the 0.13 release of Storm, which can be downloaded from Launchpad.  Storm is the object relational mapper for Python used by Launchpad and Landscape, so it is capable of supporting quite large scale applications.  It is seven months since the last release, so there is a lot of improvements.  Here are a [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday, Thomas rolled the 0.13 release of <a href="http://storm.canonical.com/">Storm</a>, which can be <a href="https://launchpad.net/storm/trunk/0.13">downloaded from Launchpad</a>.  Storm is the object relational mapper for <a href="http://www.python.org/">Python</a> used by <a href="https://launchpad.net/">Launchpad</a> and <a href="http://www.canonical.com/projects/landscape">Landscape</a>, so it is capable of supporting quite large scale applications.  It is seven months since the last release, so there is a lot of improvements.  Here are a few simple statistics:</p>
<table border="0" cellpadding="3">
<tr>
<td></td>
<th align="right">0.12</th>
<th align="right">0.13</th>
<th align="right">Change</th>
</tr>
<tr>
<td>Tarball size (KB)</td>
<td align="right">117</td>
<td align="right">155</td>
<td align="right">38</td>
</tr>
<tr>
<td>Mainline revisions</td>
<td align="right">213</td>
<td align="right">262</td>
<td align="right">49</td>
</tr>
<tr>
<td>Revisions in ancestry</td>
<td align="right">552</td>
<td align="right">875</td>
<td align="right">323</td>
</tr>
</table>
<p>So it is a fairly significant update by any of these metrics.  Among the new features are:</p>
<ul>
<li>Infrastructure for tracing the SQL statements issued by Storm.  Sample tracer implementations are provided to implement bounded statement run times and for logging statements (both features used for QA of Launchpad).</li>
<li>A validation framework.  The property constructors take a validator keyword argument, which should be a function taking arguments (object, attr_name, value) and return the value to set.  If the function raises an exception, it can prevent a value from being set.  By returning something different to its third argument it can transform values.</li>
<li>The <tt>find()</tt> and <tt>ResultSet</tt> API has been extended to make it possible to generate queries that use <tt>GROUP BY</tt> and <tt>HAVING</tt>.  The primary use case for result sets that contain an object plus some aggregates associated with that object.</li>
<li>Some core parts of Storm have been accelerated through a C extension.  This code is turned off by default, but can be enabled by defining the <tt>STORM_CEXTENSIONS</tt> environment variable to 1.  While it is disabled by default, it is pretty stable.  Barring any serious problems reported over the next release cycle, I&#8217;d expect it to be enabled by default for the next release.</li>
<li>The minimum dependencies of the <tt>storm.zope.zstorm</tt> module have been reduced to just the <tt>zope.interface</tt> and <tt>transaction</tt> modules.  This makes it easier to use the per-thread store management code and global transaction management outside of Zope apps (e.g. for <a href="http://blogs.gnome.org/jamesh/2008/08/01/using-storm-with-django/">integrating with Django</a>).</li>
</ul>
<p>It doesn&#8217;t include my Django integration code though, since that isn&#8217;t fully baked.  I&#8217;ll post some more about that later.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2008/08/29/storm-013/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Announces Move to Bazaar</title>
		<link>http://blogs.gnome.org/jamesh/2008/06/20/mysql-bazaar/</link>
		<comments>http://blogs.gnome.org/jamesh/2008/06/20/mysql-bazaar/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 09:31:11 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[Launchpad]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/2008/06/20/mysql-bazaar/</guid>
		<description><![CDATA[It has been a while coming, but MySQL has announced their move to Bazaar for version control.  This has been a long time coming, and it is great to finally see it announced publicly.
The published Bazaar branches include 8 years of history going back to MySQL 3.23.22, imported from the BitKeeper repositories.  So you can [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bazaar-vcs.org/"><img src="http://blogs.gnome.org/jamesh/files/2008/02/bazaar-logo.png" alt="Bazaar logo" align="right" border="0" height="96" hspace="10" vspace="10" width="94" /></a>It has been a while coming, but <a href="http://www.mysql.com/">MySQL</a> has <a href="http://blogs.mysql.com/kaj/2008/06/19/version-control-thanks-bitkeeper-welcome-bazaar/">announced their move to Bazaar</a> for version control.  This has been a long time coming, and it is great to finally see it announced publicly.</p>
<p>The published Bazaar branches include 8 years of history going back to MySQL 3.23.22, imported from the BitKeeper repositories.  So you can see a lot more than just the history since the switch: you can use all the normal Bazaar tools to see where the code came from and how it evolved.  Giuseppe Maxia has posted <a href="http://datacharmer.blogspot.com/2008/06/from-bazaar-to-sandbox-in-5-moves.html">some instructions on how to check out the code</a> for those who are interested.</p>
<p>I haven&#8217;t checked extensively, but I wouldn&#8217;t be surprised if this is the largest public code base managed with Bazaar.  I&#8217;ve known from personal experience working on Launchpad that it is capable of handling large trees, but it is good to have a high profile project to point at as an example now.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2008/06/20/mysql-bazaar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Psycopg migrated to Bazaar</title>
		<link>http://blogs.gnome.org/jamesh/2008/04/28/psycopg-migrated-to-bazaar/</link>
		<comments>http://blogs.gnome.org/jamesh/2008/04/28/psycopg-migrated-to-bazaar/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 14:07:50 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Bazaar]]></category>
		<category><![CDATA[Launchpad]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/2008/04/28/psycopg-migrated-to-bazaar/</guid>
		<description><![CDATA[Last week we moved psycopg from Subversion to Bazaar.  I did the migration using Gustavo Niemeyer&#8217;s svn2bzr tool with a few tweaks to map the old Subversion committer IDs to the email address form conventionally used by Bazaar.
The tool does a good job of following tree copies and create related Bazaar branches.  It doesn&#8217;t have [...]]]></description>
			<content:encoded><![CDATA[<p>Last week we moved psycopg from <a href="http://subversion.tigris.org/">Subversion</a> to <a href="http://bazaar-vcs.org/">Bazaar</a>.  I did the migration using <a href="http://blog.labix.org/">Gustavo Niemeyer</a>&#8217;s <a href="https://launchpad.net/svn2bzr">svn2bzr</a> tool with a few tweaks to map the old Subversion committer IDs to the email address form conventionally used by Bazaar.</p>
<p>The tool does a good job of following tree copies and create related Bazaar branches.  It doesn&#8217;t have any special handling for stuff in the tags/ directory (it produces new branches, as it does for other tree copies).  To get real Bazaar tags, I wrote a <a href="http://people.ubuntu.com/~jamesh/add-tags.py">simple post-processing script</a> to calculate the heads of all the branches in a tags/ directory and set them as tags in another branch (provided those revisions occur in its ancestry).  This worked pretty well except for a few revisions synthesised by a previous cvs2svn migration.  As these tags were from pretty old psycopg 1 releases I don&#8217;t know how much it matters.</p>
<p>As there is no code browsing set up on initd.org yet, I set up mirrors of the 2.0.x and 1.x branches on <a href="https://launchpad.net/">Launchpad</a> to do this:</p>
<ul>
<li><a href="http://bazaar.launchpad.net/~psycopg/psycopg/2.0.x/">http://bazaar.launchpad.net/~psycopg/psycopg/2.0.x/</a></li>
<li><a href="http://bazaar.launchpad.net/~psycopg/psycopg/1.x/">http://bazaar.launchpad.net/~psycopg/psycopg/1.x/</a></li>
</ul>
<p>It is pretty cool having access to the entire revision history locally, and should make it easier to maintain full credit for contributions from non-core developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2008/04/28/psycopg-migrated-to-bazaar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inkscape Migrated to Launchpad</title>
		<link>http://blogs.gnome.org/jamesh/2007/11/28/inkscape-migrated-to-launchpad/</link>
		<comments>http://blogs.gnome.org/jamesh/2007/11/28/inkscape-migrated-to-launchpad/#comments</comments>
		<pubDate>Wed, 28 Nov 2007 05:13:32 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Inkscape]]></category>
		<category><![CDATA[Launchpad]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/2007/11/28/inkscape-migrated-to-launchpad/</guid>
		<description><![CDATA[Yesterday I performed the migration of Inkscape&#8217;s bugs from SourceForge.net to Launchpad.  This was a full import of all their historic bug data – about 6900 bugs.
As the import only had access to the SF user names for bug reporters, commenters and assignees, it was not possible to link them up to existing Launchpad [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I performed the migration of <a href="http://www.inkscape.org/">Inkscape</a>&#8217;s bugs from <a href="http://sourceforge.net/">SourceForge.net</a> to <a href="https://launchpad.net/">Launchpad</a>.  This was a full import of all their historic bug data – about 6900 bugs.</p>
<p>As the import only had access to the SF user names for bug reporters, commenters and assignees, it was not possible to link them up to existing Launchpad users in most cases.  This means that duplicate person objects have been created with email addresses like <tt>$USERNAME@users.sourceforge.net</tt>.</p>
<p>If you are a Launchpad user and have previously filed or commented on Inkscape bugs, you can clean up the duplicate person object by going to the following URL and entering your <tt>$USERNAME@users.sourceforge.net</tt> address:</p>
<blockquote><p><a href="https://launchpad.net/people/+requestmerge">https://launchpad.net/people/+requestmerge</a></p></blockquote>
<p>After following the instructions in the email confirmation, all references to the duplicate person will be fixed up to point at your primary account (so bug mail will go to your preferred email address rather than being redirected through SourceForge).</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2007/11/28/inkscape-migrated-to-launchpad/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>On the way to Boston</title>
		<link>http://blogs.gnome.org/jamesh/2007/10/27/on-the-way-to-boston/</link>
		<comments>http://blogs.gnome.org/jamesh/2007/10/27/on-the-way-to-boston/#comments</comments>
		<pubDate>Sat, 27 Oct 2007 03:43:55 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Launchpad]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/2007/10/27/on-the-way-to-boston/</guid>
		<description><![CDATA[I am at Narita Airport at the moment, on the way to Boston for some of the meetings being held during UDS.  It&#8217;ll be good to catch up with everyone again.
Hopefully this trip won&#8217;t be as eventful as the previous one to Florida  
]]></description>
			<content:encoded><![CDATA[<p>I am at <a href="http://en.wikipedia.org/wiki/Narita_International_Airport" title="Narita International Airport">Narita Airport</a> at the moment, on the way to Boston for some of the meetings being held during <a href="https://wiki.ubuntu.com/UDS-Boston">UDS</a>.  It&#8217;ll be good to catch up with everyone again.</p>
<p>Hopefully this trip won&#8217;t be as eventful as the <a href="http://blogs.gnome.org/jamesh/2007/08/29/in-florida/">previous one to Florida</a> <img src='http://blogs.gnome.org/jamesh/wp-content/mu-plugins/tango-smilies/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2007/10/27/on-the-way-to-boston/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Schema Generation in ORMs</title>
		<link>http://blogs.gnome.org/jamesh/2007/09/28/orm-schema-generation/</link>
		<comments>http://blogs.gnome.org/jamesh/2007/09/28/orm-schema-generation/#comments</comments>
		<pubDate>Fri, 28 Sep 2007 10:05:04 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Uncategorised]]></category>
		<category><![CDATA[Launchpad]]></category>
		<category><![CDATA[Storm]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/2007/09/28/orm-schema-generation/</guid>
		<description><![CDATA[When Storm was released, one of the comments made was that it did not include the ability to generate a database schema from the Python classes used to represent the tables while this feature is available in a number of competing ORMs.  The simple reason for this is that we haven&#8217;t used schema generation [...]]]></description>
			<content:encoded><![CDATA[<p>When <a href="https://storm.canonical.com/">Storm</a> was released, one of the comments made was that it did not include the ability to generate a database schema from the Python classes used to represent the tables while this feature is available in a number of competing <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" title="Object-relational mapping">ORMs</a>.  The simple reason for this is that we haven&#8217;t used schema generation in any of our ORM-using projects.</p>
<p>Furthermore I&#8217;d argue that schema generation is not really appropriate for long lived projects where the data stored in the database is important.  Imagine developing an application along these lines:</p>
<ol>
<li>Write the initial version of the application.</li>
<li>Generate a schema from the code.</li>
<li>Deploy one or more instances of the application in production, and accumulate some data.</li>
<li>Do further development on the application, that involves modifications to the schema.</li>
<li>Deploy the new version of the application.</li>
</ol>
<p>In order to perform step 5, it will be necessary to modify the existing database to match the new schema.  These changes might be in a number of forms, including:</p>
<ul>
<li>adding or removing a table</li>
<li>adding or removing a column from a table</li>
<li>changing the way data is represented in a particular column</li>
<li>refactoring one table into two related tables or vice versa</li>
<li>adding or removing an index</li>
</ul>
<p>Assuming that you want to keep the existing data, it isn&#8217;t enough to simply represent the new schema in the updated application: we need to know how that new schema relates to the old one in order to migrate the existing data.</p>
<p>For some changes like addition of tables, it is pretty easy to update the schema given knowledge of the new schema.  For others it is more difficult, and will often require custom migration logic.  So it is likely that you will need to write a custom script to migrate the schema and data.</p>
<p>Now we have two methods of building the database schema for the application:</p>
<ol>
<li>generate a schema from the new version of the application.</li>
<li>generate a schema from the old version of the application, then run the migration script.</li>
</ol>
<p>Are you sure that the two methods will result in the same schema?  How about if we iterate the process another 10 times or so?  As a related question, are you sure that the database environment your tests are running under match the production environment?</p>
<p>The approach we settled on with Launchpad development was to only deal with migration scripts and not generate schemas from the code.  The migration scripts are formulated as a sequence of SQL commands to migrate the schema and data as needed.  So to set up a new instance, a base schema is loaded then patched up to the current schema.  Each patch leaves a record in the database that it has been applied so it is trivial to bring a database up to date, or check that an application is in sync with the database.</p>
<p>When the schema is not generated from the code, it also means that the code can be simpler.  As far as Python ORM layer is concerned, does it matter what type of integer a field contains?  Does the Python code care what indexes or constraints are defined for the table?  By only specifying what is needed to effectively map data to Python objects, we end up with easy to understand code without annotations that probably can&#8217;t specify everything we want anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2007/09/28/orm-schema-generation/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>In Florida</title>
		<link>http://blogs.gnome.org/jamesh/2007/08/29/in-florida/</link>
		<comments>http://blogs.gnome.org/jamesh/2007/08/29/in-florida/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 04:02:23 +0000</pubDate>
		<dc:creator>James Henstridge</dc:creator>
				<category><![CDATA[Launchpad]]></category>

		<guid isPermaLink="false">http://blogs.gnome.org/jamesh/2007/08/29/in-florida/</guid>
		<description><![CDATA[This week I am in Florida for a Launchpad sprint.  I was meant to arrive on Sunday night, but I fell asleep in the boarding lounge and missed the San Francisco → Orlando flight (the flight out of Perth was an early morning one, and I didn&#8217;t get enough sleep on the plane).  [...]]]></description>
			<content:encoded><![CDATA[<p>This week I am in Florida for a <a href="https://launchpad.net/">Launchpad</a> sprint.  I was meant to arrive on Sunday night, but I fell asleep in the boarding lounge and missed the San Francisco → Orlando flight (the flight out of Perth was an early morning one, and I didn&#8217;t get enough sleep on the plane).  The earliest alternative fligh was the same time the next day, so I ended up ariving on Monday night.</p>
<p>I can&#8217;t say I was impressed with United&#8217;s customer service though.  I was directed to the customer service centre in the airport and queued up behind about 10 other people.  After a short while, the one staff member at the desk  announced that her shift was over and that her replacements would not be arriving for another hour.  It seems like really bad management to leave the desk unattended for an hour, particularly when they knew that there were people waiting.</p>
<p>They had a bunch of check-in computers which were supposed to let you change your flight details, so I gave one of these a try.  Unfortunately, the computers directed me to pick up the phone to talk to a representative, and the representative ended up directing me to talk to someone at the customer service centre.  After waiting for the next shift, things got sorted out okay though, which was good.</p>
<p>This was also my first experience with <a href="http://en.wikipedia.org/wiki/Secondary_Security_Screening_Selection">SSSS</a> screening.  In fact I got to experience it twice: once when checking in for the flight I missed, and again for the later flight.  On my way back to Australia, I&#8217;ll have two more flights leaving from US airports so it&#8217;ll be interesting to see what happens then.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.gnome.org/jamesh/2007/08/29/in-florida/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
