The Lurker

Latest posts | Archive

posted by ajf on 2006-05-13 at 11:19 pm

I received an email earlier in the week telling me that lurking.org would be moved to new hosting facilities. The site is undeniably faster now that it's located here in Melbourne, rather than across the Pacific. But I've just spent the last half-hour or so rewriting parts of my blog software (the old queries used a temporary table because the ancient version of mysql available to me couldn't do subqueries (or maybe it was just correlated subqueries, I can't remember exactly now); the new server's mysql is more current, so the queries don't have to be so contrived any more, which is nice, but I had to rewrite the queries because, unlike the old server, my database account on the new server doesn't have permission to create temporary tables.

My blog code is a bit of a mess — looking back, that query never needed to be correlated subquery in the first place. The code has evolved badly because when I started blogging, the hosting company I used at the time charged extra for mysql (and I couldn't bring myself to pay a few more dollars every month for a database server that didn't even support correlated subqueries). So I ended up storing the blog content in flat files, with the metadata stored in Berkeley DB. Even more perversely, I split the blog into front end PHP code and a Python back end, because it was hosted on a shared server — I could run CGI scripts as my own user, whereas PHP ran as the same user for all clients on the server, so using Python to write CGI scripts to manage the blog meant that other users on the same box couldn't theoretically mess with it. I couldn't really imagine that anyone would want to mess with my blog, but it seemed like the right thing to do. Anyway, when I moved lurking.org to a new service provider, I wanted to rewrite as little as possible, so the PHP/Python split remained, and the database queries weren't far from the redundant multiple key/value lookups the Berkeley DB implementation had mandated.

One day, I'll put together something better — or do something sensible, like installing somebody else's blogging software. Hopefully, though, everything is now back up and running for now.

Related topics: Rants The Lurker

All timestamps are Melbourne time.