Weblogs: Miscellaneous

Sitepointed and mysql

Thursday, September 30, 2004

Ever since Aaron Schwarz wrote about the advantages and disadvantages of Baking and Frying websites I've understood the drawback of relying on multiple MySQL queries to dynamically generate a page.

Drawbacks of dynamically generating pages on the fly

The PHP behind this blog does two database queries for each page - one for the list of stories and one for my link list. I thought I wouldn't have too much of a problem until I got Slashdotted - something that's unlikely to happen soon. So I've pushed back a rewrite of this script further and further.

Today I've been Sitepointed, and that was enough for MySQL to bitterly complain about the number of connections being requested. Sitepoint blog entries also seem to be syndicated elsewhere, so alongside the growing number of aggregator subscribers pushed the littel guy firmly over the edge. This iteration of my blog software has reached its limits.

Baking blogs - creating static pages from dynamic blogs

And I have to rewrite. I could just take an off-the-shelf package like Wordpress or Movable Type and work from that. But the reason why I blog is because I want to understand things. Writing efficient and load bearing applications is something I want to get to grips with and "master". Its a challenge - to make my site survive a future Sitepointing. Its an itch I want to scratch myself.

So the main plan is to write some blogging software that creates static pages that require no more than a <?php include ?>. The script needs to be intelligent enough to figure out which pages need to be regenerated if I add or edit a blog entry. Blogs tend to be hierachial in nature, so editing a blog entry requires updates to the static versions of the blog entry, its category page and main blog page (if the story is recent), as well as the corresponding Atom0.3 and RSS/RDF feeds.

A simple version of Blogger I guess. And that fits another piece of my long-range software puzzle into place.

Apologies to visitors

Apologies to readers who couldn't get to what they wanted to see. I'm flattered enough concurrent visitors thought my material was interesting enough to request that MySQL felt the need to complain. Next time I intend to be ready.


[ Weblog | Categories and feeds | 2011 | 2010 | 2009 | 2008 | 2007 | 2006 | 2005 | 2004 | 2003 | 2002 ]