Infrastructure Change

The last couple of weeks have been taken up largely with restructuring the website as you see it today. After some issues (mainly on my part failing to properly administer a live web server without breaking it), I changed hosting provider from Amazon to Mythic Beasts. This has many advantages:

  1. Hosting costs are cheaper
  2. I do not have to administer my own server, hosting is managed
  3. I can scale easily

On Amazon I had a single server that did everything—hosting and database and compiling and e-mail. Obviously this was not good but it was the only cost–effective option available to me. Now for less cost I have one dedicated server and one hosting account. Database (a forced shift from Redis to MySQL—probably for the best, trying to store everything in memory was never going to be pretty), hosting (guaranteed uptime with support, not me who has never administered a server before) and e-mail (sensibly configured) is done for me. I have had to relinquish some of my more megalomaniacal tendencies but life is definitely easier now.

Compilation is now handled on a separate, completely isolated server that still runs php-resque and is only accessible from the hosting server. The webhost controls jobs on the compile server and the compile server maintains an autossh permanent tunnel to the database server back through the webhost. All the webhost then has to do is to poll the database for updates.


I have taken time to do things the “proper way”. I have rewritten all the spaghetti plugin code into various plugins that on the whole control the functions of a single page each but are linked together by a common database connection. Despite the protestations of the masses, I have opted to store data in the database. The previous version used a filestore directory but in the end I was just making my own database in the filesystem anyway… To save space, data is gzipped and stored in a single blob. When it is requested, we unzip and add each file to its own blob in another table. These files are deleted after 24 hours. I have also cleaned up the payment code and licences are no longer hardcoded in PHP but backed by the database.

All I need now are some actual editions…