ComputeServerController.mesa
The controller interface for the Summoner. Provides for finding of services for clients, registration of statistics for servers, and administrative functions.
Last Edited by: Bob Hagmann, May 9, 1986 7:47:00 am PDT
Hal Murray, March 22, 1986 9:13:53 pm PST
Copyright © 1984 by Xerox Corporation. All rights reserved.
DIRECTORY
BasicTime,
ComputeServer,
PrincOps,
Pup USING [Address],
Rope,
RPC;
ComputeServerController: CEDAR DEFINITIONS =
BEGIN
Ask the controller for a server to run the specified service.
FindService: PROCEDURE [service: Rope.ROPE, userName: RPC.ShortROPE] RETURNS [found: BOOL, instance: RPC.ShortROPE];
Find a likely server, but do not contact it to see if the command is acceptable.
FindServiceWithQueueing: PROCEDURE [service: Rope.ROPE, userName: RPC.ShortROPE, version: RPC.ShortROPE, timeToWait: INT ← 3600, clientMachineName: RPC.ShortROPE, streamPupAddress: Pup.Address, needListener: BOOL] RETURNS [found: ATOM, instance: RPC.ShortROPE, serverPupAddress: Pup.Address, errMsg: Rope.ROPE];
Find a likely server, but do contact it to see if the command is acceptable. Return values as though acquired through ComputeServer.AskForService. "timeToWait" is the number of seconds to wait for a server to become available.
Tell the controller my statistics. Get back whether to stop service (terminateService), whether new packages exist, and the current list of commands to do queing (queueingCommands).
NewStats: PROC [serverMachineName: RPC.ShortROPE, serverMachinePupAddress: RPC.ShortROPE, serverUP: BOOL, firstCall: BOOL, machineType: PrincOps.MachineType, mainMemory: CARDINAL, numberCPUs: CARDINAL, diskPartionSize: INT, freePagesOnDisk: INT, freeboard: INT, freeGFI: CARDINAL, freeMDS: CARDINAL, freeVM: CARDINAL, oldestLRUFileDate: BasicTime.GMT, CPULoad: REAL, nonBackgroundCPULoad: REAL, reclamationRate: REAL, freeProcesses: CARDINAL, userName: RPC.ShortROPE, currentRequests: LIST OF ComputeServer.Request, aveBackgroundLoad: REAL] RETURNS [terminateService, newPackage: BOOL, queueingCommands: LIST OF Rope.ROPE];
Ask controller what are the best stats it knows about. See ComputeClient for defination of FOM.
BestServerStats: PROC RETURNS[instance: RPC.ShortROPE, FOM: REAL] ;
Get the controller to notice that a new package, or a new version of a package, is now available on the file server
NoticeNewPackage: PROC [package: RPC.ShortROPE] RETURNS [error: BOOL, tryDifferentController: BOOL, msg: Rope.ROPE];
Remove a package.
RemoveOldPackage: PROC [package: RPC.ShortROPE] RETURNS [error: BOOL, tryDifferentController: BOOL, msg: Rope.ROPE];
Get some information from the controller about the cluster state.
GetSomeInfo: PROC RETURNS [error: BOOL, tryDifferentController: BOOL, msg: Rope.ROPE, serverList: LIST OF Rope.ROPE, bestFOM: REAL];
A server has been given a command that, for whatever reason, it cannot execute.
CommandUnavailable: PROC [serverMachineName: RPC.ShortROPE, commandName: Rope.ROPE, version: RPC.ShortROPE];
A Server has discovered a command that it is willing to run, but is not a standard one derivable from the files on the file server.
ExtraCommandAvailable: PROC [serverMachineName: RPC.ShortROPE, commandName: Rope.ROPE, version: RPC.ShortROPE];
Due to a change of state on the server, the named command might now be accepted. This is only a hint.
MightAcceptQueuedCommand: PROC [serverMachineAddress: RPC.ShortROPE, commandName: Rope.ROPE];
GenericToController: PROC [requestCode: ATOM, requestString: Rope.ROPE] RETURNS [resultCode: ATOM, resultString: Rope.ROPE]; -- generic call to allow for expansion without RPC interface recompilation
END.
Bob Hagmann May 6, 1985 8:08:25 am PDT
added GenericToController; add userName parameters