
                       Services Server
                     (August 1, 1993)

This directory contains the source code for a freely
distributable services server.

The services server solves the following problem: for a client
process to connect to a server process, the client process must
first find out the host address and port number of the server
process.  The services server is a dynamic repository of this
address and port information.  It is an alternative to hardcoding
this information in the client process.  In other words, it acts
as a name server.

The services server allows TCP/IP server processes to advertise a
network address and port number by name, and it allows client
processes to retrieve the network address and port number of any
advertised service.  The Sun Yellow Pages and the /etc/services
Unix convention are other solutions to the same problem.

The services server is implemented using Tcl/Tk.  Tcl stands for
the Tool Command Language, a freely distributable, embeddable
scripting language.  Tk is a freely distributable X windows
toolkit and widget set implemented as Tcl commands.  Tcl/Tk and
information about Tcl/Tk are available by anonymous FTP from
sprite.berkeley.edu [128.32.150.27].

The services server also uses Tcl-DP, or Tcl Distributed
Programming, which is an extension to Tcl/Tk.  Processes that
want to connect to the services server must follow Tcl-DP remote
procedure call protocols.  Tcl-DP is not supplied in this
package, but is available by anonymous ftp from toe.berkeley.edu.

Contents of this directory:

  README		- this README file
  Makefile		- creates and installs executables
  dpcap/		- information on /etc/dpcap file
  install-scripts.tcl	- installation script used by Makefile
  killservice.tcl	- script for killing a currently advertised service
  lservices.tcl		- script for listing currently advertised services
  msg.tcl		- utility script used by srvc and srvlib
			  to print status messages
  phoenix/		- code for the phoenix utility
  rmservice.tcl		- script for removing (unadvertising) a currently 
			  advertised service
  serviced.tcl		- services daemon Tcl/Tk script
  services.1		- man page for executables
  services.l		- man page for Tcl/Tk procedures
  services.tcl		- older, simpler version of srvc.tcl
  srvc.tcl 		- client code for accessing registered servers
  srvlib.tcl		- library of routines for servers that register
			  with the service daemon

To compile and start the services server daemon:

+) If you do not already have Tcl/Tk, get a copy and follow the
compilation instructions.  

+) If you do not already have Tcl-DP, get a copy and follow its
compilation instructions. Make and install the dpwish interpreter.

+) Choose a machine where you want the services server daemon
running.  This services server machine should be network
accessible to all client processes.

+) Choose an unused port number where the services server daemon
will allow client processes to connect.  For example, 2222.

+) Each machine that will run clients of the services server must
have an /etc/dpcap file, including the services server machine
you chose above.  Follow the directions in dpcap/README subdirectory 
to install these files.  Use the network address of the services server 
machine and the port number that you chose above.

+) Edit the Makefile, and type "make install" to finish off creation of
the services server package.  

+) On the services server machine, run "serviced," the services server
daemon.  The services server daemon is now started and waiting for 
client connections.

+) For examples of simple applications that access the services
server, see the lservices.tcl, rmservice.tcl, and killservice.tcl
Tcl/Tk scripts.
