The calcServer shell is a simple server shell containing a number of calculators. Each calculator is doing work for a single client. The example includes two different clients; an X based client, XcalcClient, using the Athena widget set, and a non X client, calcClient. To create the executables of the calculator example, copy the contents of the calculator directory to a directory of your own and compile:
beta calcClient calcServer XcalcClient.
Before running the calculator example, make sure that an ensembleDeamon is running on the host(s) involved (See section 5.1).
Now execute a calcServer on some network host, followed by the execution of a calcClient. The calcClient prompts for the name of the ensemble where it should lookup the calcServer. Answer with the name of the network host on which the calcServer is running.
If a calcServer is not started explicitly, as was the case above, or if the calcServer has terminated [4], the calcClient will fail to lookup a calcServer on the host whose name it was given. In this case the calcClient will try to start a new calcServer. For this to be possible, the following changes to the calcClient code could be made:
shellEnv (# defaultAppsDir:: (# do 'mydir/$/' -> dir[] #); ... #)
With the above changes, the calcClient is able to create a new calcServer if one is not already running.
Distributed Objects in BETA - Reference Manual | © 1993-2002 Mjølner Informatics |
[Modified: Monday October 23rd 2000 at 22:18]
|