2.2   Setting up the Tornado Registry

Before anyone at your site can use Tornado, someone must set up the Tornado target server registry, a daemon that keeps track of all available targets by name. The registry daemon must always run; otherwise Tornado tools cannot locate targets.

Usage of the Tornado registry is initially determined during the software installation process, based on the installer's choice of options for the registry. See the Tornado Getting Started Guide for information about installation.

Only one registry is required on your network, and it can run on any networked host. It is recommended that a development site use a single registry for the entire network; this provides maximum flexibility, allowing any Tornado user at the site to connect to any target.

If there is already a registry running at your site, you do not need the remainder of this section; just make sure you know which host the registry is running on, and proceed to 2.3 The Tornado Host Environment.1

No privilege is required to start the registry, and it is not harmful to attempt to start a registry even if another is already running on the same host--the second daemon detects that it is not needed, and shuts itself down.

To start the registry daemon from a command line, execute wtxregd in the background. For example, on a Sun-4 running Solaris 2.x:

% /usr/wind/host/sun4-solaris2/bin/wtxregd -V >/tmp/wtxregd.log &

This example uses the -V (verbose) option to collect diagnostic output in a logging file in /tmp. We recommend this practice, so that status information from the registry is available for troubleshooting.

To ensure that the registry remains available after a system restart, run wtxregd from a system startup file. For example, on Sun hosts, a suitable file is /etc/rc2. Insert lines like the following in the appropriate system startup file for your registry host. The example below uses conditionals to avoid halting system startup if wtxregd is not available due to some unusual circumstance such as a disk failure.

# 
# Start up Tornado registry daemon 
# 
if [ -f /usr/wind/host/host-os/bin/wtxregd ]; then 
    WIND_HOST_TYPE=host-os 
    export WIND_HOST_TYPE 
    WIND_BASE=/usr/wind 
    export WIND_BASE 
    /usr/wind/host/host-os/bin/wtxregd -V -d /var/tmp >/tmp/wtxregd.log & 
    echo -n 'Tornado Registry started' 
fi

The Tornado tools locate the registry daemon through the environment variable WIND_REGISTRY; each Tornado user must set this variable to the name of whatever host on the network runs wtxregd.

In some cases, you may wish to segregate some collections of targets; to do this, run a separate registry daemon for each separate set of targets. Developers can then use the WIND_REGISTRY environment variable to select a registry host.

One of the more exotic applications of Tornado is to set this environment variable to a remote site; this allows the Tornado environment to execute remotely. Using a remote registry can bridge two separate buildings, or even enable concurrent development on both sides of the globe! As a support mechanism, it allows customer support engineers to wire themselves into a remote environment. This application often requires setting WIND_REGISTRY to a numeric Internet address, since the registry host may not be mapped by domain name. For example (using the C shell):

% setenv WIND_REGISTRY 127.0.0.1

If WIND_REGISTRY is not set at all, the Tornado tools look for the registry daemon on the local host.

You can query the registry daemon for information on currently-registered targets using the auxiliary program wtxreg. See C. Tornado Tools Reference for more information about both wtxreg and wtxregd.


1:  Note that the same registry can serve both UNIX and Windows developers, as long as they share a local network. Either flavor of host may run the registry; see the Tornado User's Guide (Windows version) for instructions on setting up a registry on a Windows host.