« One-Place Do-it-Yourself Helicopter Kit | Main | Your Sky, Home Planet, and Sky Screen Saver Updated »
Tuesday, September 12, 2006
Earth and Moon Viewer Updated
At 20:00 UTC on 2006-09-12 I put a new version of Earth and Moon Viewer into production on the primary Fourmilab server. This is the first update to this interactive Web resource since the “stateless” version (which refers to its ability to run on a load-balanced server farm without session persistence, as opposed to absence of allegiance to this or that petty tyrant and their tawdry turf) was released on 2005-08-15. Like that update, this release should be completely transparent to the overwhelming majority of users: only those who parse the output from Web requests with sloppy programs will be affected (and almost all of them ought to have been using dynamic image requests for years anyway). This release is a major clean-up of the code and efficiency improvement. Earth and Moon Viewer was the first interactive resource at Fourmilab, open to the public since December 1994. Since then, it has “just grown”, not only becoming far and away the most popular area on the site, but usually appearing on the first page of Google search results for both of the terms “Earth” and “Moon”. In the process, it has had to cope with the realities of being such a high profile page in today's Internet slum, including denial of service attacks and fire drills when a war breaks out and every computer-empowered idiot on the planet tries to zoom in on the war zone and watch the battle, notwithstanding explicit statements that the high resolution imagery is completely static, having been captured by Earth satellites years before. Anyway, with all of these alarums and diversions, and the quickly cobbled-up kludges to mitigate them, the processing of each and every Earth and Moon Viewer request became embarrassingly inefficient—not incapacitating—the server farm actually loafs along at less than 10% capacity most of the time, but that's the most propitious time to clean things up and, besides, every little bit of complexity is somewhere a security problem might be lurking, and the fewer the better. Vanity makes me hesitant to mention this figure, but prior to this update, each Earth and Moon Viewer request required nine Unix process forks to service, and passed the request form arguments to the program which generated the reply via a shell script and command line arguments, which runs the risk of somebody constructing a request which spoofs the shell into doing something destructive (although I believe the script in question was not vulnerable to such attacks, and the absence of evidence of them in a world in which this site is subjected to tens of thousands of attacks per day is plausible evidence of absence—still, one sleeps better knowing there is not even a potential vulnerability). The updated version requires only two process forks per request, which is is the irreducible minimum to handle such transactions in a stateless manner (one to create the reply page, the second to generate the image which is embedded within it). All existing URLs which request Earth and Moon Viewer results should continue to work, even if generated before this update; if you have one which appears to be broken, that's what the “Feedback” button is for. Although this update is transparent to the user, it is a major structural change to the Web application, involving changes in almost every static HTML document and even scheduled jobs which retrieve information such as orbital elements for Earth satellites. I will let it run for a few days, keeping an eye on the error log and an ear to the ground for reports of problems (which makes it difficult to use the mouse!) and, if all goes well, post the source code for the new version and begin propagating the changes to the other interactive Web resources: Solar System Live and Your Sky.Posted at September 12, 2006 22:18