In article <3F341BB2.BFB90E2Apku.edu.cn>,
Bing Du Test <testpku.edu.cn> wrote:Two obvious solutions come to mind:>
>Let's say there is a host1 (SunOS 5.8) which handles daily dataloading.
>There is a host2 (FreeBSD 4.3-20010721-STABLE FreeBSD) which uses the
>data loaded by host1.
>Host1 usually takes a couple of hours loading data. During the loading
>time, host2 should be out of service and just publishes a notice to
>users saying 'service not available until data loading is finished'.
>There used to be a NFS filesystem shared between host1 and host2. So
>whenever data loading was in progress, host1 created a signal file on
>host1 and then host2 could decide whether or not to provide the service
>by checking the existence of the signal file. But we've just stopped
>using NFS between the two machines.
>Anybody have any idea how the same function can be accomplished in a
>different way? Perl is used on host1 and host2 for coding. Any
>suggestions and ideas would be appreciated.
1) Host1 runs a server that answers the question "Is data loading taking
place?". When host2 receives a request, it connects to the server on
host1 to find out. The server can operate by simply looking for the
signal file, so the loading application itself doesn't need to change.
2) Host2 runs a server that listens for changes in the loading status.
When host1 starts loading, it connects to the server and reports
"Loading started". When it's done loading it connects again and reports
"Loading completed". The server can operate by writing and removing the
signal file, so the application on host2 doesn't need to change.
Barry Margolin, [email]barry.margolinlevel3.com[/email]
Level(3), Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.