TrickleChargeServerDoc.tioga
Copyright © 1986 by Xerox Corporation. All rights reserved.
Rick Beach, June 15, 1985 5:58:45 pm PDT
Russ Atkinson (RRA) June 20, 1985 1:03:44 pm PDT
Eric Nickell February 25, 1986 11:21:55 am PST
Carl Hauser, May 15, 1986 9:14:58 am PDT
TRICKLECHARGESERVER
CEDAR 6.0 — FOR INTERNAL XEROX USE ONLY
TrickleChargeServer
-- how to replicate Cedar directories
© Copyright 1985 Xerox Corporation. All rights reserved.
Abstract: The TrickleChargeServer provides a command to replicate a directory (or a DF file) from one server onto another preserving version numbers.
Created by: Russ Atkinson
Maintained by: AlpineImplementors^.pa
Keywords: Cedar, pseudo servers, replicated directories
XEROX  Xerox Corporation
   Palo Alto Research Center
   3333 Coyote Hill Road
   Palo Alto, California 94304

For Internal Xerox Use Only
The TrickleChargeServer package will register a command (TrickleChargeServer) that enables copying sets of files, preserving the version numbers and dates, which is of particular use when trying to replicate servers. This command can be run in repetitive mode, which will keep one server refreshed from another.
The syntax of the command is
TrickleChargeServer {srcDir dstDir}*
One TrickleChargeServer command can refresh various directories or various servers. The srcDir specification may be either a directory prefix or a DF file. In the latter case, the files to be moved are those in the closure of the DF file (following Includes items, but not Imports items).
Time Restriction
A time restriction may be placed on any srcDir dstDir pair, which will inhibit the enumeration and transfer unless the current time is between those specified. Because the times may be vague, it is possible to specify something equivalent to "each night" or "on the weekends". A time restriction must be a single command line token (i.e. you may have to enclose it in quotes) of the form:
( time1 .. time2 )
where time1 and time2 are time specifications parsable by Tempus. (Extra credit: Guess who parses it.) Thus, the command
% TrickleChargeServer -r "(Saturday .. Monday)" [Cyan]<Cedar6.0> [Cask]<Cedar6.0>
would do nothing until the weekend came, and then it would transfer the Cedar6.0 release.
Note that the time restriction is sticky, i.e. it applies to all subsequent transfers on the line. Further, only the most recent time restriction is applicable to any transfer — they are not cumulative. Therefore, there is no easy way to specify weekday evenings, or afternoons on the weekend.
Switches and global variables
Switches may be freely supplied, with the effects being cumulative, and the switches being sampled at each dstDir specification. The current switches are:
-C: connect to the destination host via STP
(this will work for persons with connect rights)
-D: debug (inhibits file transfer)
-R: repeat (keep doing the transfer forever)
-V: verify (no transfers, messages only for missing files)
-Q: (quick) enumerate only the df files, and transfer new files referred to by df file
Various global variables can be set by the interpreter to further govern the behavior:
maxRetries: NAT ← 10;
# of times to retry connectionRejected from STP
retrySeconds: NAT ← 20;
# of seconds between retry attemps
repeatSeconds: NAT ← 1800;
# of seconds between repeats (when using the R switch)
secondsBetweenMoves: NAT ← 0;
# of seconds to wait after a file transfer (to keep IFS load down)
Fine points
When running in repeat mode (via the R switch), once a file has been moved, the destination host is not interrogated again for that file.
When using pseudo-servers in the source DF files, the server names are translated to the master host designation.
The V switch can be used to verify that a DF file has its files stored on a remote server. This verification takes place even if your FS cache may be wrong, as may be the case if a server goes down and you have to switch to a backup server.
Examples
TrickleChargeServer -cr [Indigo]<CedarFonts> [Cyan]<CedarFonts> &
This command refreshes Cyan with the font files for Cedar. It relies on an STP enumeration of the highest versions on Indigo. The command is run repetitively, and STP.Connect is attempted to Cyan to enable write access for priviliged users. The trailing & indicates that the command runs in a detached command tool viewer.
TrickleChargeServer -cr
[Indigo]<CedarFonts>Top>FontMetrics.df [Cyan]<CedarFonts> [Indigo]<CedarFonts>Top>PressFonts.df [Cyan]<CedarFonts> [Indigo]<CedarFonts>Top>TiogaFonts.df [Cyan]<CedarFonts>
This command refreshes Cyan with the font files for Cedar. It relies on the DF files, which places a much lighter load on the Indigo server.
TrickleChargeServer -cr CurrentCedar.df [Cyan]<Cedar6.0> CedarChest.df [Cyan]<CedarChest6.0>
This command refreshes Cyan with the files for the Cedar 6.0 release and the files in the Cedar Chest. It is useful during prerelease. Note that it will run "forever", with a default pause of 30 minutes between examinations. It uses the DF files as the "truth", although it has to interrogate the server to verify the version number.