RPC addresses: Running a distributed application

# Running an RPC system

You should read this general section of RPC addressing, then the specific sections both for your communications medium , and for each machines you are running on. You may also want to read about the WAY name server.

## Defining server addresses

When an RPC system is made, none of the modules have, built into them, a knowledge of the addresses of other modules required. Therefore, before running a distributed system, this information must be set up, so that the run&hyphen.time support system can make the necessary connections. This is done by associating an address string with the name of each remote package. This address must be known on any machine that will need to access that package. On VAX/VMS, the logical name system is used. Under OS9, MSDOS or Unix, the "shell" evironment is used. Under MoniCa, the symbol table is used. On the Macintosh and on the M6809 under FLEX, no such device exists, so the definitions are stored in a file. See the section relating to your particular system for details.

For VMS or MoniCa, the command to define the server address to be used by the client is the same:

             DEFINE  <remote package name>   <server address>

Under Unix or OS9 it is

             setenv  <remote package name>   <server address>

Under MSDOS it is

             SET <remote package name>=<server address>

without any spaces surrounding the '=' sign.

Example :

            VMS:     DEFINE   filer  "FILER@AA_00_04_00_2F_58.ETHERNET"
            MoniCa:  DEFINE   filer   FILER@AA_00_04_00_2F_58.ETHERNET
            OS9:     SETENV   filer   FILER@AA_00_04_00_2F_58.ETHERNET
            MSDOS:   SET filer=FILER@AA_00_04_00_2F_58.ETHERNET
            unix:    setenv FILER FILER@AA_00_04_00_2F_58.ETHERNET

(The "quotation marks" are necessary under VMS only, if the string contains an @ sign.)

There is currently a limit of 40 characters on the length of a logical or physical name. The format of the is defined below. A similar scheme is used to define the client(s) to which a server process requests. This is done (for the standard server) by defining the name RPC_CLIENT_NAME to give the of the client. Example :

             DEFINE RPC_CLIENT_NAME        *.ETHERNET

## RPC address format

The rpc address of a server has two parts. The first is a package name or number, used to distinguish different packages attached to the same .

     <server address>       ::=       <package name> @ <medium address>
                            or        <package number> @ <medium address>
                            or        <medium address>
                            or        <package name>

- In the first case, the must be the name used in the package declaration. At initialisation time, the client machine will interrogate the server machine, to acquire a corresponding number for use during actual remote calls.
- In the second case, if the package number is known by the client in advance, specifying it explicitly will save a little time and allow back-compatibility with previous systems. Package numbers are allocated by the server run-time system, as the packages are attached to the server, starting from zero.
- In the third case, neither a name or number is given. The RPC system will assume that the logical name given was the package name, and use that. For example, the following two definitions would have the same effect:

            $ DEFINE FILER MYTASK.DECNET
            $ DEFINE FILER "FILER@MYTASK.DECNET"

- In the last case, no is specified, and so ".LOCAL" is assumed (see below). Therefore, if no address is given, the RPC system system will assume that the server stub (as well as the client stub) is linked locally to the same program.

A client is identified to a server by the alone. The second part, the medium address, is in turn composed of two pieces. The first is a network or similar address, in a format depending on the medium. The second is the name of the medium.

              <medium address> ::= <net address> . <medium>

The format of depends on , and is given, for each communication medium .

## LOCAL routing

It is possible, if your are using the advanced client features , that one wants a package to be either remote or local, as selected at runtime. In this case, the for a local call is simply LOCAL . Example :

                    DEFINE PHI1 PHI1@LOCAL

    </A>