<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>No Content, No Fuss</title>
    <link>http://anil.recoil.org/blog/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Anil Madhavapeddy</description>
    <item>
      <title>Parsing EXIF/IPTC photo tags using pyexiv2 on Leopard</title>
      <description>&lt;p&gt;I've been looking around at refreshing my current photo gallery to make it easier to update, since I'm around 1000 photos behind over the last year.  Part of making it easier to use is to adopt an &lt;a href="http://www.apple.com/aperture"&gt;Aperture&lt;/a&gt;-based system of marking the metadata directly in the image itself, and figuring out how to render so many pictures more effectively in my &lt;a href="http://anil.recoil.org/gallery/"&gt;gallery&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The best library I could find to do the job is &lt;a href="http://www.exiv2.org"&gt;Exiv2&lt;/a&gt; and its associated Python bindings &lt;a href="http://tilloy.net/dev/pyexiv2/"&gt;pyexiv2&lt;/a&gt;.  They use the rather complex &lt;a href="http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index.html"&gt;Boost.Python&lt;/a&gt; bindings, which are a total pain to compile on MacOS X Leopard.&lt;/p&gt;

&lt;p&gt;In order to get it to work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the latest &lt;a href="http://www.finkproject.org"&gt;Fink&lt;/a&gt; to install:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;python25&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;boost1.34.python25&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libexiv2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scons&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Download the latest &lt;a href="http://tilloy.net/dev/pyexiv2/download.htm"&gt;pyexiv2 distribution&lt;/a&gt;, extract it, and drop in my &lt;a href="http://anil.recoil.org/files/pyexiv2/Makefile"&gt;exiv2 Leopard Makefile&lt;/a&gt; into the extracted directory.&lt;/li&gt;
&lt;li&gt;Type in:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;make&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo make install&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Test it out by running python2.5 and experimenting with importing pyexiv2 (see the pyexiv2 &lt;a href="http://tilloy.net/dev/pyexiv2/developers.htm"&gt;developer guide&lt;/a&gt; for more information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll tidy this up into a fink package sometime, but for now I want to press on with finishing my &lt;a href="http://www.djangoproject.org/"&gt;Django&lt;/a&gt; experiments.&lt;/p&gt;</description>
      <pubDate>Thu, 17 Apr 2008 11:58:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:1c1c8218-945d-4f62-a566-953d1b685766</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2008/04/17/parsing-exif-iptc-photo-tags-using-pyexiv2-on-leopard</link>
      <category>hacking</category>
      <category>macosx</category>
    </item>
    <item>
      <title>Sushi, Seattle and Seahawks</title>
      <description>&lt;p&gt;&lt;a href="http://anil.recoil.org/gallery/images/redmond-view-1-large.jpg" rel="lightbox" title="Random view of Redmond countryside"&gt;&lt;img style="float:right" src="http://anil.recoil.org/gallery/images/redmond-view-1-medium.jpg" alt="Random view of Redmond countryside" /&gt; &lt;/a&gt;
So I'm hanging at the &lt;a href="http://www.xensource.com/"&gt;XenSource&lt;/a&gt; Redmond office for a few days, and munching on delicious sushi at &lt;a href="http://www.florestaurant.com/index.htm"&gt;Flo&lt;/a&gt;, and it turns out that the dude behind us was none other than &lt;a href="http://www.nfl.com/players/playerpage/12429"&gt;Matt Hasselbeck&lt;/a&gt;!  It seems like only two years ago that I was cheering on the &lt;a href="http://www.steelers.com/"&gt;Pittsburgh Steelers&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Jerome_Bettis"&gt;the Bus&lt;/a&gt; as they owned the &lt;a href="http://www.seahawks.com/"&gt;Seahawks&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Unfortunately, I only realised my brief brush with celebrity on our way out of the restaurant, which also probably saved me from saying something stupid to him.  As if!  But anyway, the, err, moral of this post is that you must check out Flo Sushi if you're in Seattle and eat the spider roll, it's awesome.&lt;/p&gt;</description>
      <pubDate>Wed, 11 Apr 2007 18:21:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:5c13cdad-1b8c-498c-9da9-631ad26264dc</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2007/04/11/sushi-seattle-and-seahawks</link>
      <category>travel</category>
      <category>usa</category>
    </item>
    <item>
      <title>Core stability exercising</title>
      <description>&lt;p&gt;It's been a wierd exercise year; I went from hard-core powerlifting (go 220lb bench!), to playing a lot of badminton and tennis, and then ending off the PhD era with breaking my knee (details not suitable for blog publication).&lt;br/&gt;
  &lt;a href="http://anil.recoil.org/gallery/images/ajay-stretch-1-large.jpg" rel="lightbox" title="Ajay having a little stretch"&gt;&lt;img style="float:right" src="http://anil.recoil.org/gallery/images/ajay-stretch-1-medium.jpg" alt="Ajay having a nice stretch" /&gt; &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As anyone it's happened to knows, a knee injury is really annoying to recover from as it feels really "wobbly" for ages and can't quite be trusted.  I've been doing physio on it myself for about half a year now, and can finally run around for 5km or so without too much discomfort, although &lt;a href="http://www.camyoga.co.uk/"&gt;yoga&lt;/a&gt; and &lt;a href="http://www.capoeira-cambridge.co.uk/"&gt;Capoeria&lt;/a&gt; are perhaps a few more months away.&lt;/p&gt;

&lt;p&gt;But then, the Forrest Gump-class runner and ex-officemate &lt;a href="http://www.cl.cam.ac.uk/~ach61/"&gt;Alex Ho&lt;/a&gt; pointed out &lt;em&gt;&lt;a href="http://www.srcf.ucam.org/cuhh/linksandresources/core-stability.pdf"&gt;these amazing exercises&lt;/a&gt;&lt;/em&gt; by the captain of the &lt;a href="http://www.srcf.ucam.org/cuhh/"&gt;CUH&amp;amp;H&lt;/a&gt; running team in Cambridge.  They all emphasise smooth movement and core strength without the need for heavy weights, so can be done while travelling as well.  So highly recommended, that even little Ajay &lt;em&gt;(right)&lt;/em&gt; is trying them out!&lt;/p&gt;</description>
      <pubDate>Sun, 08 Apr 2007 21:57:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:191280e3-ebac-4bc8-a68f-77f0f034871b</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2007/04/08/core-stability-exercising</link>
      <category>family</category>
      <category>gym</category>
    </item>
    <item>
      <title>Karnatik Jazz, Live Painting, and such things...</title>
      <description>&lt;p&gt;Had a great evening out in San Francisco on Friday, when we visited the &lt;a href="http://www.redpoppyarthouse.org/"&gt;Red Poppy Art House&lt;/a&gt; on Folsom Street to check out a really unique Jazz experience.  &lt;/p&gt;

&lt;p&gt;The boys from &lt;a href="http://www.vidyamusic.com/"&gt;VidyA&lt;/a&gt; recently took up an artist-in-residence position there, and performed their fusion of traditional Indian &lt;a href="http://www.karnatik.com/"&gt;Karnatik&lt;/a&gt; music with modern Jazz pieces.  They've been making some &lt;a href="http://sfgate.com/cgi-bin/article.cgi?f=/c/a/2007/01/10/DDGTFNF6OE1.DTL&amp;amp;type=music"&gt;waves&lt;/a&gt; in the SF Jazz scene already it seems, and to top it all of, the owner of the art house did a live painting session during the performance.  The audience passed out random bits of stuff, and he incorporated it into a piece done over the course of an evening.  Talk about artistic overload!&lt;/p&gt;

&lt;p&gt;Love the area as well; there's a nice friendly &lt;a href="http://www.folsomstreetcoffee.com/"&gt;coffee-house&lt;/a&gt; down the road (which is pretty much my only criteria, apart from not getting shot and such).&lt;/p&gt;

&lt;table width="90%" align="center"&gt;
&lt;tr&gt;
&lt;td class="bimg"&gt;
&lt;a href="http://anil.recoil.org/gallery/2007/04/07/index.html#sf-mission-4"&gt;&lt;img border="0" src="http://anil.recoil.org/gallery/images/sf-mission-4-medium.jpg" alt="My school was never this cool." width="140" height="140" /&gt;&lt;/a&gt;&lt;br /&gt;My school was never this cool.&lt;/td&gt;
&lt;td class="bimg"&gt;&lt;a href="http://anil.recoil.org/gallery/2007/04/07/index.html#sf-mission-8"&gt;&lt;img border="0" src="http://anil.recoil.org/gallery/images/sf-mission-8-medium.jpg" alt="The area was a mix of Latino and African, it seemed" width="140" height="140" /&gt;&lt;/a&gt;&lt;br /&gt;The area was a mix of Latino and African, it seemed&lt;/td&gt;
&lt;td class="bimg"&gt;&lt;a href="http://anil.recoil.org/gallery/2007/04/07/index.html#sf-mission-9"&gt;&lt;img border="0" src="http://anil.recoil.org/gallery/images/sf-mission-9-medium.jpg" alt="And in the Red Poppy Art House, eclectic art abounds" width="140" height="140" /&gt;&lt;/a&gt;&lt;br /&gt;And in the Red Poppy Art House, eclectic art abounds&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;</description>
      <pubDate>Sun, 08 Apr 2007 21:28:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:68cac704-b456-46b1-bb15-7d2dd06fcd86</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2007/04/08/karnatik-jazz-live-painting-and-such-things</link>
      <category>india</category>
      <category>travel</category>
      <category>art</category>
    </item>
    <item>
      <title>Trac spamming is taking down Melange</title>
      <description>&lt;p&gt;After loads of reports that the &lt;a href="http://melange.recoil.org/"&gt;Melange&lt;/a&gt; site keeps going 505 and crashing, I took at look at why.  Turns out several spam crawlers were going mental and repeatedly adding tickets with spam links.  Around 600 tickets and thousands of comments later, the process decided it had enough and terminated.&lt;/p&gt;

&lt;p&gt;I've deleted all tickets (even the valid ones were spammed into oblivion) and turned off comment creation and modification for anonymous users.  A look on the &lt;a href="http://trac.edgewall.org/wiki"&gt;Trac Wiki&lt;/a&gt; shows that there are some &lt;a href="http://trac.edgewall.org/wiki/SpamFilter"&gt;SpamFilter&lt;/a&gt; extensions being developed which I'll investigate at some point.&lt;/p&gt;</description>
      <pubDate>Mon, 02 Apr 2007 11:15:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:db28ddc2-d81c-45ff-95a3-5a280fc78ba5</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2007/04/02/trac-spamming-is-taking-down-melange</link>
      <category>recoil</category>
    </item>
    <item>
      <title>Hans Rosling at TED last year on global development</title>
      <description>&lt;p&gt;Having coffee with &lt;a href="http://www.cl.cam.ac.uk/~arb33/"&gt;AliB&lt;/a&gt; and discussing lecturing reminded me of one of the best presentations I've ever seen: &lt;a href="http://roslingsblogger.blogspot.com/"&gt;Hans Rosling&lt;/a&gt; at &lt;a href="http://tedblog.typepad.com/"&gt;TED&lt;/a&gt; and &lt;a href="http://tedblog.typepad.com/tedblog/2006/06/hans_rosling_on.html#"&gt;debunking myths about the developing world&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Even if you're not interested in the subject, it's worth checking out just to see how cool his presentation of otherwise rather boring statistics is.  His company, &lt;a href="http://www.gapminder.org/"&gt;Gapminder&lt;/a&gt; also got &lt;a href="http://googleblog.blogspot.com/2007/03/world-in-motion.html"&gt;bought by Google&lt;/a&gt; a few weeks ago, so chances are &lt;a href="http://www.google.com/analytics/"&gt;Analytics&lt;/a&gt; will get more interesting soon.&lt;/p&gt;</description>
      <pubDate>Sun, 01 Apr 2007 23:36:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:cf2f2652-d247-4d84-97e3-1c8497182747</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2007/04/01/hans-rosling-at-ted-last-year-on-global-development</link>
      <category>politics</category>
    </item>
    <item>
      <title>Melange hits the euro-spotlight</title>
      <description>&lt;p&gt;It's been a busy old March (release management of the new &lt;a href="http://www.xensource.com/products/xen_enterprise/index.html"&gt;XenEnterprise&lt;/a&gt; sucked up most of it).  I did take a break and go over to &lt;a href="http://www.gsd.inesc-id.pt/conference/EuroSys2007/"&gt;EuroSys 2007&lt;/a&gt; in Portugal to present the language and compiler I &lt;a href="http://melange.recoil.org/"&gt;implemented&lt;/a&gt; as part of my PhD work (&lt;a href="http://anil.recoil.org/papers/2007-eurosys-melange.pdf"&gt;read it here&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Although the talk I gave was was a bit underwhelming (more preparation and time-practise next time!), I met a whole bunch of really interesting people.  My argument about rewriting whole applications also didn't get laughed out the room as I thought it might, as people recognise that retro-fitting safety enhancements on existing languages is a bit of a dead-end road to go down.  It has definitely inspired me to make more time to spend on polishing up the &lt;a href="http://melange.recoil.org/"&gt;Melange&lt;/a&gt; applications for a proper release in 2007.&lt;/p&gt;

&lt;p&gt;In a pleasant surprise, it also won the &lt;em&gt;Best Student Paper&lt;/em&gt; award of the conference as well!&lt;/p&gt;</description>
      <pubDate>Sun, 01 Apr 2007 23:12:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:d0584912-6c7d-4555-9554-6047bfebc62c</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2007/04/01/melange-hits-the-euro-spotlight</link>
      <category>research</category>
    </item>
    <item>
      <title>Deens, welcome to the Internet!</title>
      <description>&lt;p&gt;Inspired by finishing my PhD corrections (!) today, I decided to hook up the DNS server from our &lt;a href="http://melange.recoil.org/"&gt;Melange&lt;/a&gt; project up to the Internet.  The authoritative server is called &lt;a href="http://melange.recoil.org/trac/browser/apps/deens/"&gt;deens&lt;/a&gt; (since the co-author is one &lt;a href="http://www.tjd.phlegethon.org/"&gt;Tim Deegan&lt;/a&gt;, geddit?), and is written in pure &lt;a href="http://caml.inria.fr/"&gt;OCaml&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This is all rather experimental, to put it mildly, but I stuck in the zone file below, hooked it up as a delegate to our main name-servers, checked it against the &lt;a href="http://www.dnsreport.com/tools/dnsreport.ch?domain=deens.recoil.org"&gt;DNS Report&lt;/a&gt;, and it all seems to be working!&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ORIGIN deens.recoil.org. ;
$TTL    240
deens.recoil.org. 604800 IN SOA  (
    deens.recoil.org. anil.recoil.org.
    2006122401 3600 1800 3024000 1800
)
        IN  NS     ns1.deens.recoil.org.
        IN  NS     deensns.recoil.org.
ns1     IN  A      194.70.3.132
dynamic IN  CNAME  dynamic.recoil.org.
static  IN  CNAME  static.recoil.org.
anil    IN  CNAME  dynamic
stats   IN  CNAME  dynamic
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I also modified &lt;a href="http://stats.recoil.org/"&gt;stats.recoil.org&lt;/a&gt; to be an alias to &lt;em&gt;stats.deens.recoil.org&lt;/em&gt;, so all the requests for that domain will go via the deens setup.  You actually need a user/pass to access the site, but that doesn't matter; if it gets that far, the DNS bit has worked.&lt;/p&gt;

&lt;p&gt;There's still an awful lot of tedious work to get the server into a production-ready state, such as proper logging, more error handling and recovery, etc., but I really hope to find the time in 2007 to polish this up somewhat.  Performance is excellent already; faster than &lt;a href="http://www.isc.org/bind/"&gt;BIND&lt;/a&gt; by quite a lot, and it can optionally use more memory to cache responses to shoot up to crazy levels.&lt;/p&gt;

&lt;p&gt;Incidentally, the &lt;a href="http://melange.recoil.org/trac/browser/apps/mldig/"&gt;dig replacement&lt;/a&gt; utility also seems to be working fairly well, and &lt;a href="http://dave.recoil.org/"&gt;David Scott&lt;/a&gt; has been messing around with a &lt;a href="http://www.apple.com/macosx/features/bonjour/"&gt;Bonjour&lt;/a&gt; implementation that will get finished sometime in 2007 as well (honest!).&lt;/p&gt;</description>
      <pubDate>Sat, 30 Dec 2006 01:11:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fa0b4534-23b5-4166-b078-d29a1a43f3ca</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2006/12/30/deens-welcome-to-the-internet</link>
      <category>research</category>
      <category>hacking</category>
      <category>net</category>
    </item>
    <item>
      <title>Google Webmaster tools</title>
      <description>&lt;p&gt;The conversion of the Recoil web services to external FastCGI pinned our &lt;a href="http://trac.edgewall.org/"&gt;Trac&lt;/a&gt; installation at &lt;a href="http://melange.recoil.org/"&gt;Melange&lt;/a&gt; as the source of the CPU hogging.  It turned out the Google crawler was indexing the entire source tree via Trac, causing it to go ballistic.&lt;/p&gt;

&lt;p&gt;I then stumbled on the latest cool Googlism: the &lt;a href="https://www.google.com/webmasters/tools/"&gt;Google Webmaster Tool&lt;/a&gt;, which lets you register your sites and displays options, diagnostics and statistics about how the Google crawler views your website.
I turned down the frequency at which Google hits the Trac installation (as well as installing a suitable &lt;a href="http://melange.recoil.org/robots.txt"&gt;robots.txt&lt;/a&gt; file).  This solved the immediate problem, but some of the search statistics were fun to check out as well.&lt;/p&gt;

&lt;p&gt;It turns out the &lt;a href="http://anil.recoil.org/gallery/"&gt;gallery&lt;/a&gt; is pretty highly ranked for &lt;a href="http://images.google.com/"&gt;image searches&lt;/a&gt;.  My trips to Japan seems to have made it big, with popular searches including "&lt;a href="http://images.google.com/images?q=shibuya&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;sa=N&amp;amp;tab=wi"&gt;Shibuya&lt;/a&gt;", "&lt;a href="http://images.google.com/images?q=tokyo%20at%20night&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;sa=N&amp;amp;tab=wi"&gt;tokyo at night&lt;/a&gt;", and "&lt;a href="http://images.google.com/images?q=japanese%20roof&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;sa=N&amp;amp;tab=wi"&gt;japanese roof&lt;/a&gt;".  My random pictures of &lt;a href="http://images.google.com/images?q=buffalo%20india&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;sa=N&amp;amp;tab=wi"&gt;indian buffaloes&lt;/a&gt;, &lt;a href="http://images.google.com/images?svnum=10&amp;amp;hl=en&amp;amp;lr=&amp;amp;q=smoggy+skyline&amp;amp;btnG=Search"&gt;smoggy skylines&lt;/a&gt; and &lt;a href="http://images.google.com/images?q=fried%20ice%20cream&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;sa=N&amp;amp;tab=wi"&gt;fried ice-cream&lt;/a&gt; seem especially popular as well.  It's a wierd old Internet eh?&lt;/p&gt;

&lt;p&gt;The gallery has fallen a bit by the wayside in recent months.  I'll update it when I get back to Cambridge!&lt;/p&gt;</description>
      <pubDate>Thu, 28 Dec 2006 15:04:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ae998dee-78ec-4f05-b751-1ff800d3f880</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2006/12/28/google-webmaster-tools</link>
      <category>travel</category>
      <category>recoil</category>
      <category>net</category>
    </item>
    <item>
      <title>Mercurial FastCGI module</title>
      <description>&lt;p&gt;Our &lt;a href="http://www.lighttpd.net"&gt;lighttpd&lt;/a&gt; setup has been very unstable in recent months, probably brought on by the load of the large &lt;a href="http://www.selenic.com/mercurial"&gt;Mercurial&lt;/a&gt; repositories &lt;a href="http://hg.recoil.org/"&gt;hosted&lt;/a&gt; on Recoil since the Google &lt;a href="http://code.google.com/soc/"&gt;Summer of Code&lt;/a&gt; mentoring.&lt;/p&gt;

&lt;p&gt;The source of the instability was really hard to track down, but it seems to be the automatic spawning of &lt;a href="http://www.fastcgi.org/"&gt;FastCGI&lt;/a&gt; processes by the web-server, and lighttpd failing to handle a &lt;a href="http://en.wikipedia.org/wiki/SIGCHLD"&gt;SIGCHLD&lt;/a&gt; somewhere when a child process crashes.  To sort this out, I just converted all the Ruby on Rails setups (this blog and &lt;a href="http://nick.recoil.org/"&gt;Nick's&lt;/a&gt;) to use an external spawn.&lt;/p&gt;

&lt;p&gt;This only leaves our Mercurial vhost &lt;a href="http://hg.recoil.org/"&gt;hg.recoil.org&lt;/a&gt; to switch to using FastCGI, and I couldn't find a module for this anywhere and so lashed up some Python glue to do the job.&lt;/p&gt;

&lt;p&gt;You can download the small distribution for Mercurial 0.9 (&lt;a href="http://anil.recoil.org/projects/hg-fcgi-0.9.tar.gz"&gt;hg-fcgi-0.9.tar.gz&lt;/a&gt;).  It has a FastCGI library written by someone else, the Python files to glue the Mercurial and FastCGI libraries together, and a simple rc script to launch the external web process.&lt;/p&gt;&lt;p&gt;Instructions are for lighttpd... install the Python files somewhere, modify them to point to the Mercurial directory, run the rc script to start the daemon, and then add something similar to the following to your lighttpd config file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;fastcgi.server = (
  ".fcgi" =&amp;gt; ( "localhost" =&amp;gt;
    ( "socket" =&amp;gt; "/var/cache/fcgi/sites/hg.recoil.org/dirsock" )),
  ".hg" =&amp;gt; ( "localhost" =&amp;gt;
    ( "socket" =&amp;gt; "/var/cache/fcgi/sites/hg.recoil.org/sock" )),
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Also add "index.fcgi" to &lt;em&gt;index-file.names&lt;/em&gt; in the config file, and touch it in the vhost directory to create an empty file (this is to avoid getting a 404 error and instead pass it through to the FastCGI process).  Similarly, touch a .hg file for every repository you want to serve.  You could do this differently by passing through a URL prefix and modifying the Python appropriately, but I prefer finer control over what we're serving.&lt;/p&gt;

&lt;p&gt;Hope this is useful; I won't bother submitting it back to the Mercurial list as it looks like the &lt;a href="http://www.selenic.com/hg/"&gt;official hg repo&lt;/a&gt; has a different code layout; I'll check it out later on when I have a bit more time and integrate properly.&lt;/p&gt;

&lt;p&gt;I have no idea whether or not this will actually improve our stability, but it's at least easier to move onto a different web-server now that everything is FastCGI.  All I need now is an OpenBSD/php5-fastcgi port, which doesn't seem to exist (yet).&lt;/p&gt;</description>
      <pubDate>Wed, 27 Dec 2006 20:59:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c9de9f88-5d89-42ea-9430-6df6c7054109</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2006/12/27/mercurial-fastcgi-module</link>
      <category>hacking</category>
      <category>net</category>
    </item>
  </channel>
</rss>
