PowerWeb Components: PowerWeb Slave


PowerWeb Slave runs on each computer on the network. It is designed to be unobtrusive, quietly using extra CPU time to work on whatever tasks PowerWeb Master has assigned to it.

PowerWeb Slave may have any number of Slave Plug-in Fragments (SPiF's) that it is working on simultaneously. PowerWeb Slave is in charge of round-robining between them and ensuring that each SPiF is allotted a reasonable amount of CPU time.

The local user can control how much CPU time PowerWeb Slave uses. Here is a picture of the interface:

The vertical slider controls how much CPU time PowerWeb Slave will allow itself. It is currently set to 34%. A few moments before this screen snapshot was taken, this slider was adjusted from 50% to 34%. Note in the usage stats that the graph dips from 50% to 34%. This reflects the slider bar adjustment.

The Overdrive Mode settings indicate whether PowerWeb is allowed to use 95% of the CPU if the computer is inactive for awhile. (That is, if no keystrokes, mouse movements, disk insertions, etc., have happened.) Also, the number of inactive minutes can be adjusted.

There is a status area for current SPiF's. There is a list of all plug-ins currently loaded. If one of them is selected, there is a CPU history area that shows how much of the CPU that SPiF has used. There's also an "Active" checkmark, indicating if that SPiF is currently processing. A description is also provided.

Whenever a task is initiated, PowerWeb Master transmits the data that the SPiF will need to process. PowerWeb Master assumes that PowerWeb Slave already has the actual SPiF loaded. If PowerWeb Slave does not have the SPiF loaded, it requests PowerWeb Master to transmit the SPiF. Once PowerWeb Slave has the SPiF loaded, it calls it and passes in the data the SPiF needs.

PowerWeb Slave includes a kind of high-level cache of SPiF's; if memory is running short, PowerWeb Slave looks through all its loaded SPiF's. Those SPiF's that have been inactive the longest are purged, providing more memory as required.

When PowerWeb Slave is started, an automatic search for Masters is initiated. PowerWeb Slave first searches for any Master it has previously connected to. (The location of each PowerWeb Master is stored in a preferences file.) If it can't find any, it searches on its machine for a Master; if it still can't find one, it then searches the local zone, then the local network, then the wide-area network. It can also optionally present a dialog to the user for the user to find and connect to PowerWeb Master.

There is a good reason why PowerWeb has launching PowerWeb Slaves search for PowerWeb Masters rather than the more intuitive search direction of PowerWeb Master searching for PowerWeb Slave. System 7 requires two steps for an application to be able to receive connections by other applications: Program Linking must be turned on from the "Sharing Setup" Control Panel; and a user must be set up from the "Users and Groups" control panel. On the other hand, any application can send connection requests without setting up anything special. It seems simpler to do the necessary setup on as few computers as possible, so we require the setup only on machines running PowerWeb Master. Furthermore, users of PowerWeb Master are likely to be more technically astute than users of PowerWeb Slave.

While SPiF's are being executed, they are periodically making callbacks to PowerWeb Slave. This callback code checks to see if it's time to allow another SPiF some CPU time, or if PowerWeb Slave should relinquish the processor for awhile.