June 07, 2003

Controlling the competition from within the Matrix

You may have noticed that on occassion, the regular update feature of the FC competition has been slow to start (a couple of times starting at about midday, and once pausing in the afternoon). There are technical reasons for this (see below), but now it should be sorted.

However, if you were worrying that I'm not giving proper attention to the competition - you can set your minds at rest. On Friday, while in the local cinema watching The Matrix Reloaded, I realised that I hadn't started up the program which fetches the scorecards & updates the scores. Luckily, even from within the matrix, the Fantasy competition is still only a GPRS-phone connection away. So one minute later, without leaving my chair, I had kicked the updater into action. Personally, I think that's a much neater trick than Neo's ability to stop bullets :-)

The technical problem with the system is that I need to start a process each morning which (every 5 mins) downloads all the scorecard webpages, parses them and updates everyones scores. The best way to do this is to have the process started every day a given time (e.g. 10:30) automatically (a cron-job in Unixspeak). Unfortunately, the company that hosts yule.org don't give users access to this, so at the moment I have to manually kick it (by accessing 1 webpage) sometime before start of play each day. This works fine unless I forget.

The new improved solution, which is going into action this week, is to have a timed (cron) process on a different machine kick yule.org at the correct time. That machine is yule.homeip.net (aka 'jujuflop'), the machine which sits on top of my fridge at home in Taipei, permanently connected via ADSL.

An associated problem is that occasionally my updater program gets killed on yule.org (either the machine occasionally resets, or does some 'internal spring-cleaning' of processes). I plan to get round this problem by putting a little extra script into the FC homepage, which checks every time someone requests that page that the updater is running (if it should be running), and restarts it if not.

Posted by david at June 7, 2003 12:04 PM | TrackBack
Comments