Example: VAX-VAX over DECNET

Suppose, as in the build example , that the program MYPROG uses the module FILER, but let us suppose they are both on a VAX under VMS . The program MYPROG is on decnet node NODEM, and FILER is on NODEF. We build the system as described in that example, but to run under VMS on both sides: The server program is the standard one (SERVERLOOP) provided in the library: $ RPC FILER /SVAXVMS /CVAXVMS $ LINK MYPROG, CLIFILER, rpc_lib/OPT $ LINK FILER, SERFILER, rpc_lib/INCLUDE=SERVERLOOP/LIB rpc_lib/opt To run MYPROG on NODEM, we make a command file MYPROG.COM: $ DEFINE/USER MYTASK "NODEF""user password""::""0=FILER""" $ DEFINE/USER FILER "0@MYTASK.DECNET" $ RUN MYPROG.EXE (The definition of MYTASK as a logical name allows one to put in a long name without exceeding the limit of 40 characters on the RPC address string, FILER). When this runs, it will attempt, over decnet, to contact the object FILER on NODEF. The DECNET software on NODEF, when it receives the request, will look first for a task which has already declared a network object called FILER. If it can't find that, it will look for a command file (.COM), and run that. It will look for the .COM file in the default directory associated with the "user password" given, or otherwise in the default directory (usually [DECNET]). We therefore put, on NODEF, in the top level directory [user], the command file FILER.COM containing the following commands: $ DEFINE/USER RPC_CLIENT_NAME SYS$NET.DECNET $ RUN FILER.EXE Note that either the username and password must be specified with the node name, or a "proxy login" must be created for the remote (or even local) decnet access, or FILER.COM must be installed in the default network user directory. See the DECNET manual for details. When this file is run by the decnet network server on NODEF, it first declares that FILER should service the client SYS$NET. This is is a logical name set up to allow access to the process which started the job. Then, the FILER program runs, and will service any requests made by MYPROG. The distributed system is then run by typing (on NODEM) $ @MYPROG In this case, the server serves the one client, and exits when the client process exits. If another identical client asks for a connection to FILER, then a separate server process is started. If the server command file had been $ DEFINE/USER RPC_CLIENT_NAME *FILER.DECNET $ RUN FILER.EXE then the server would have declared itself as a DECNET object "FILER". It would have then serviced the client, but remained active even after the client had exited, to server any other clients which might run. In this case, if more than one client had requested a connection to FILER, then they would all have been connected to the same initial server, which would have serviced requests from all of them.