Today is Ordinary Polling Day (regular people call it “Election Day”) here in Prince Edward Island. For the past couple of days I’ve been busy fine-tuning the election results website for Elections PEI, and tonight just after 7:00 p.m. it will spring to life with live results.
Given that the last time we did this we’d all just slept through a hurricane, we’re starting the day with a concrete logistical advantage: it’s so much easier to run a website when you have electricity, and when you don’t have to step over fallen trees to get to the office.
Because much of the Island was without both electricity and Internet in 2003, the use of the election results website for that election was, well, “much lower than anticipated.” So tonight is really the first opportunity since 2000 to discover how many Islanders will get their results online. Which, in turn, should teach us something about the change in Internet penetration into Island homes in the past 7 years.
How do we know how much capacity to build? The honest answer is “as much as we can build with the gear we have.” How will we know whether it’s enough? When it grinds to a halt. Which, of course, we hope it doesn’t.
Which is not to say that we haven’t Taken Steps. All of the pages you see on the election results website are straight-ahead HTML; they’re not build “on the fly,” but rather generated automatically every two minutes by a PHP-driven process behind the scenes. This means that there’s no database bottleneck, and that the limiting factors, in the end, are Apache and available bandwidth.
To handle the increased bandwidth we’ve had a temporary additional Internet connection installed to supplement the bandwidth already in place through the Government WAN: there’s a fiber running to the Confederation Centre of the Arts and we’re tapping into the same big pipe there that’s used to stream live video of the Legislative Assembly. In theory we can burst to 10 Mbps if we need to. On the Apache side, we’re running Apache 2.2.4, with everything that’s not required stripped out.
As a failsafe we’ve got an off-Island mirror site set up, using Amazon’s S3 for hosting, and we can switchover to that site by changing our DNS if required.
From the ballot box to the Internet, your vote takes the following path: the ballots are counted separately for each of the 319 polls, the ballot count is reported by telephone to Elections PEI’s offices at 180 Richmond Street (there’s a phone bank with 10 stations set up there) where the ballot count for each candidate is recorded onto a pre-printed sheet of paper (technical tangent: the sheets themselves were printed from spreadsheets created directly from the MySQL database of polls and candidates by the excellent OpenOffice::OODoc).
The sheets of paper get carried over to Johnny and I where they’ll get entered into a web-based results tabulation system that’s running on a sister server to the webserver (trivia: the name of the webserver is Wallis, the name of the back-end server is Edward). Entering the results updates a MySQL database, and the MySQL database is used to update the results pages every 2 minutes. After they leave our hands, the results sheets get handed to the next desk over where they get entered into a spreadsheet on a standalone PC; having this redundancy in place lets us compare numbers through the evening, and also provides a backup in case the network goes down and we need to generate printed results.
At least that’s how it’s all supposed to work. Stay tuned tonight to see whether it actually does.
While there’s obviously some pressure involved in working to ensure that all the contingencies have been planned for, one of the beauteous things about Prince Edward Island’s electoral process is that it’s still firmly based on pencil and paper. If the Internet goes down, or the servers catch on fire, or I lose my ability to type, the election will happen, the results will get tabulated, and democracy will march on.
In any case, at 5:50 a.m. tomorrow morning I’m on a plane to Copenhagen by way of Montreal and Zurich. If tonight is problem-free then it will be a “well-deserved vacation.” If it isn’t, well, then I’ll be “fleeing the country.”