Open up a TCP socket, and have the programs ping each other back and forth. Typically the secondary will ping the primary. If the primary doesn't respond, then the secondary should take over.Actually, couldn't you write a different script that does the pinging, and then fires up the needed process on one system or the other?
They'd each be identical. If the process was running, no new action. If the process isn't running, ping the identical script on the other machine. If the other machine's not there, start the process on the current machine.
If they were both running at once, one had to start, and if that one started, then the process is running. Each freezes current working data in a known location, and if the process fails for one, then it tells the other to start its process up with the working data. If the process gets no ping and no process is running, it looks in the known place for the last set of working data and uses that. If there's no last set, it just starts the process.
Just my $0.02...
-----------------------
You are what you think.
In reply to Re: Re: CGI script on cluster server
by chaoticset
in thread CGI script on cluster server
by qadwjoh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |