Rover Client-Side Tcl Interface

The following Tcl calls are available to Rover client applications:
Rover_LoadApplication // Rover_NewSession // Rover_RPC // Rover_Flush Rover_Flush // Rover_ClientFlush // Rover_QRPC // Rover_PromiseClaim // Rover_WatchApps // Rover_WatchHTTP // Rover_WatchLog // Rover_WatchNet // Rover_Import // Rover_Export // Rover_Shutdown // Rover_StartTimer // Rover_EndTimer // Rover_GetDV // Rover_GetPid // Rover_USleep // Rover_AddFromString // Rover_Escape // Rover_TclEscape // Rover_Unescape // Rover_Info // Rover_IsTentative // Rover_SetAlarm // Rover_CancelAlarm // Rover_ResetSession

There should be documentation of the import and export hook functions.

We explain the following internal procedures in the Rover client library in order to help the application programmer understand the behavior of the library. These calls are NOT meant to be called directly by client applications.
Rover_FinishImport // Rover_FinishExport // Rover_InvokeCallback


Rover_LoadApplication URL args

Loads an application binary, forks, and execs it in its own thread of control and own address space. Returns a promise for the process identifier of the started application


Rover_NewSession service consistency exclusivity user password

Sets up state in the client to support a session. Calls with identical arguments are return the smae session identifier.

Returns the (integer) session identifier.


Rover_RPC session URL command args

Performs a remote procedure call. The actual semantics of the operation performed depends on the specified command, the status of the object named by URL, and the characteristics of session.


Rover_Flush session URL

Flushes an RDO from the client application's and access manager's caches.

Returns TCL_OK

Raises error if


Rover_ClientFlush session URL

Flushes an RDO from client cache.

Returns TCL_OK

Raises error if


Rover_QRPC


Rover_PromiseClaim promiseID

Obtains the value of a promise. Blocks until the promised value is available.

  • promiseID is a promise returned by Rover_LoadApplication,Rover_Import, or Rover_QRPC

    Returns the value of the claimed promise.


    Rover_WatchApps text_widget

    Monitors currently running client applications. Each application is listed by URL on one line in the text widget with an indication of the number of users running that application.

    Used by Rover chooser.

    Returns TCL_OK


    Rover_WatchHTTP

    Monitors HTTP traffic. Formats the cache list as a Tk text widget, with buttons to view, reload, or delete each visible entry. Then, invokes the tcl interpreter to display it.

    Used by Rover Web proxy.

    Returns TCL_OK


    Rover_WatchLog text_widget

    Monitors the access manager log. Each (Q)RPC in log is displayed on a separate line listing the session, URL, type of operation, and status. Each priority queue and the queue of operations already sent to servers is listed separately.

    Used by Rover chooser.

    Returns TCL_OK


    Rover_WatchNet

    Monitors the state of the network. Ask the access manager to update the client with the state of the network. The global Tcl variable Rover__Env__netStatus is set to reflect the state of the network. The access manager informs the client of changes in the status of the network every 5 seconds. Currently, the only recognized network statuses are ON and OFF.

    Returns TCL_OK


    Rover_Import session URL callback

    Fetches an RDO into the application. Rover_Import is non-blocking in the sense that control will be returned to the calling context without waiting for the network. However, callback (or any other pending callback) may be invoked before Rover_Import returns.

    Returns a promise for the object.

    If the RDO is in the access manager's cache and the cacheability of the RDO allows it, the RDO will be returned and the callback invoked without contacting the server. If the RDO is not present, or if cacheability of RDO requires it, the RDO will be fetched (or verified) from the server before the callback is invoked. The last possiblity is that the RDO will be returned and the callback invoked immediately, but a QRPC will scheduled to be completed at the access manager's convenience.

    The semantics of session determine if a tentative version of an object may be returned.


    Rover_FinishImport

    Rover_FinishImport is NOT an available call into the library. We provide this explanation so the application programmer understands what happens as a result of Rover_Import

    Some time after a Rover_Import call is issued, the server will respond with an RDO. When the RDO is received in the application from the access manager, the following steps occur:

    NOTE: Currently, if Rover finds tentative opeartions associated with an object during Rover_FinishImport, the tentative operations are purged, not replayed. This behavior will go away when the FinishImport and FinishExport paths are merged.


    Rover_InvokeCallback

    Rover_InvokeCallback is NOT an available call into the library. We provide this explanation so the application programmer understands what happens as a result of Rover_Import/Export

    Evaluates a callback script. The following arguments are appended to the script before it is executed.


    Rover_Export session URL operation unmarshall_script callback

    Applies an operation to RDO and reconciles the result of that opeation with the server. Rover_Export is non-blocking in the sense that control will be returned to the calling context without waiting for the network. However, callback (or any other pending callback) may be invoked before Rover_Export returns.

    Returns a promise for the object.

    Rover_Export performs the following actions:


    Rover_FinishExport

    Rover_FinishExport is NOT an available call into the library. We provide this explanation so the application programmer understands what happens as a result of Rover_Export

    Completes the export and reconciliation process for an operation on an RDO. Some time after Rover_Export is called, the server will return a log of operations that will update the RDO from the permanent state stored in the client (and access manager) cache to the state of the RDO at the server (at the time the log was sent).When the log is received in the application the following steps occur:


    Rover_Shutdown

    Shuts down sessions and other soft state of an application held by the access manager for an application..

    Unimplemented.

    Returns TCL_OK


    Rover_StartTimer

    Starts a real time timer. Up to MAXTIMERS (1000) timers maybe running simultaneously. (More will overwrite the oldest timers.) Returns an (integer) identifier of the started timer.

    Rover_EndTimer timer

    Computes real time since timer was started. Returns number of seconds since timer was started. Truncated to four decimal places.

    Rover_GetDV session URL

    Obtains the dependency vector for an RDO. The vector is the time stamp provided by the server for the last permanaent state of the <RDO.

    Returns dependency vector for RDO

    Raises error if


    Rover_GetPid appID

    Asks the access manager for the process identifier for a Rover application. Block until answer is returned.

    Returns (integer) PID for application

    Raises error if unable to send to access manager


    Rover_USleep usec

    Suspends the client process for the number of microseconds specified by the argument as usleep (3).

    Returns TCL_OK

    Rover_AddFromString string [priority]

    Enters options for tkwin's main window given a string containing lines in the standard format for X resources (see other documentation for details on what this is).The memory at string is totally trashed by this procedure. If you care about its contents, make a copy before calling here.

    Returns TCL_OK

    Raises error if parsing string fails


    Rover_Escape string

    Escapes a URL for transmission by substituting a '%' followed by a two digit hexadecimal code for any characters that cannot be transmitted raw. This table lists the characters which are escaped. Returns escaped string.

    Rover_TclEscape string

    Escapes a string for use as an argument to a TCL procedure by inserting a \ before any special TCL characters. This table lists the characters which are escaped.

    Returns escaped string.

    Rover_Unescape string

    Reverses escaping performed by Rover_Escape This table lists the characters which are effected.

    Returns unescaped string.

    Rover_Info infoType session object

    Returns information about an object:

    Type CodeSize DataSize TDataSize OperCount LogSize DVSize CacheType
    Returns information about an object.

    Rover_IsTentative session object

    Determines if object has tentative (unreconciled) data.

    Returns number of tentative operations on object

    Raises error if


    Rover_SetAlarm name milliseconds callback

    Sets a real time alarm. Up to MAXALARMS (1000) alarms maybe running simultaneously. (Attempts to use more will return an error.) The alarm expires periodically until cancelled by Rover_CancelAlarm. Returns TCL_OK.

    Rover_CancelAlarm name

    Cancels a previously set real time alarm. Returns TCL_OK if the alarm is defined, otherwise, returns TCL_ERROR.

    Rover_ResetSession session command

    Passes command to the server for session for execution. Returns TCL_OK, unless the session name is invalid, in which case it returns TCL_ERROR.
    Last updated by $Author: adj $ on $Date: 1997/12/01 23:41:23 $.
    Copyright © 1995-1998 Anthony D. Joseph and Massachusetts Institute of Technology