in reply to CGI script on cluster server
There's no magic ideas in programming for cluster the way you need here: the point is just that serialized data should be accessed in a safe way (think about file locking), and that if you have long-running processes they should save the state as often as possible, and be able to restart their work from the saved state when needed. Which are indeed Very Good Ideas (tm) anyhow, so you should probably think about implementing them in every CGI you write...
If you can live with one process being terminated on
server1, and a fresh one being started in its place on
server2, without the need for the two processes to
communicate any state info, you have only the problem of making sure that if something goes wrong and your program terminates abnormally, no havoc is left around on the system. Again, this is something you really should do in any case...
Just my 2c!