// 07.Feb.2010

PHP Caching to Speed up Dynamically Generated Sites


// 14.Jan.2010

Improve Multi-country Support in Address Book

Fixing Countries in Address Book: Winfred van Kuijk presents an awesome plugin he has written which addresses (pun intended) two significant issues with OS X’s Address Book multi-country support:

  • country names: you no longer have many variations for country names (so: all “United States”, instead of many variations like “USA”, “US”, “United States of America”);
  • country address formats: it tells Address Book to use the formatting that belongs to that country (e.g. [van Kuijk’s] default format is for the Netherlands, which means for US addresses that state is missing and zip and city are switched).

// 29.Dec.2009

Gearman

Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. It allows you to do work in parallel, to load-balance processing, and to call functions between languages. It can be used in a variety of applications, from high-availability web sites to the transport of database replication events. In other words, it is the nervous system for how distributed processing communicates.

Sounds awesome. I’ve got to make some time to experiment with this.


// 25.Nov.2009

Top 20+ MySQL Best Practices

Ah now this is pure gold, 21 things to keep in mind when coding for MySQL. Most of these I knew but it was good to be reminded. Some of them are entirely new to me though:

  • Use ENUM over VARCHAR: ENUM type columns are very fast and compact. Internally they are stored like TINYINT, yet they can contain and display string values.
  • Store IP Addresses as UNSIGNED INT: Many programmers will create a VARCHAR(15) field without realizing they can actually store IP addresses as integer values. With an INT you go down to only 4 bytes of space, and have a fixed size field instead.
  • Do Not ORDER BY RAND(): This is one of those tricks that sound cool at first, and many rookie programmers fall for this trap. You may not realize what kind of terrible bottleneck you can create once you start using this in your queries.

Priceless information. I’ll be referring back to this list over and over again.


// 19.Nov.2009

MySQL Tuning Primer Script

The MySQL Tuning Primer script takes information from “SHOW STATUS LIKE…” and “SHOW VARIABLES LIKE…” then attempts to produce sane recommendations for tuning server variables. It is compatible with all versions of MySQL 3.23 - 5.1.


// 19.Nov.2009

Fixing Poor MySQL Default Configuration Values

Database guru Jeremy Zawodny helps us out with a handful of MySQL tweaks for high-volume databases that could boost their performance.


// 28.Oct.2009

Building an E-commerce Website from Open-source Software

The Building of Training Pages: GBdirect write about the design, architecture and build of www.trainingpages.com. This old, yet still fascinating article has much that should be digested by anyone who builds service sites (as opposed to brochure sites) at any level.

In about three months of effort the bulk of the site was up and running. There’s less than six staff months of work in the whole thing, yet we think it stacks up better than 99% of all the websites we have ever seen. It’s generating increasing levels of traffic, regular training leads for us and the other providers who are listed and on a day-to-day basis we can just leave it running, mostly looking after itself.

Ours is built totally from free software and is extremely reliable. Rough tests show that with no optimisation at all in our code it can probably service 2–3 requests per second — vastly more than our bandwidth could ever support. Running with a load average of 0.01 — i.e. it’s 99% idle.


// 30.Aug.2009

A Window into the Archives (Part 2)

In this article I’m going to present the PHP code I wrote for the Window into the Archives module that currently adorns the sidebar on this website. I described the rationale behind the module in an earlier essay.

Continue Reading…


// 31.May.2009

Building a Large-scale E-commerce Site with Apache and mod_perl


// 23.May.2009

WordPress Performance

There’s no good reason for WordPress or your site to be slow, except your own negligence. Cache everything. Monitor performance. Use the latest versions of your software. Configure it intelligently. If you take an active part in every bit of software that powers your site, soon you’ll find things fit together more smoothly than before, and the secrets of a fast server will naturally fall into place.