This file describes the principles of the Name_Server client-server
test application.

1. Libraries
   ---------

The Naming Service consists of a client library (see
$WRAPPER_ROOT/Name_Server/Client-Server/client) and a server library
(see $WRAPPER_ROOT/Name_Server/Client-Server/server). The client
library is intended to be linked to client processes that want to use
the NamingService.  The server library is to be linked to the server
process, that manages Net_Local name bindings.

2. Startup configuration
   ---------------------

To communicate with the server process, a client needs to know the
INET_Addr, where the server offers its service. Class Name_Options
holds all the configuration information of the Name Service. This
consists of :

 - nameserver_port : Port number where the server process expects requests
 - nameserver_host : hostname where the server process resides
 - namespace_dir   : directory that holds the NameBinding databases
 - process_name    : name of the client process (argv[0]), NameBindings of
		     a ProcessLocal namespace are stored in file 
		     "namespace_dir/process_name". NameBindings of NodeGlobal
		     namespace are stored in "namespace_dir/localnames".
		     NameBindings of Net_Local namespace are stored in file
		     "namespace_dir/globalnames" on the server host.
 These configuration parameters are passed to the process as commandline
 arguments to main:
		-p nameserver port
		-h nameserver host
		-l namespace directory

 The main program _must_ initialize an instance of Name_Options with name
 name_options (since the shared libraries depend on this). Main should
 look like :

   #include "ace/Name_Options.h"

   Name_Options name_options;

   int main(int argc, char **argv)
   {
     name_options.process_name(argv[0]);
     name_options.parse_args (argc, argv);
     ......
   }

See the examples in the tests subdirectory of
...Name_Server/Client-Server/client and
...Name_Server/Client-Server/server


3. Class Naming_Context
   -------------------

This is the main workhorse of the Name Service. It is used as well by
client processes as by the server process. It manages all accesses to
the appropriate NameBinding database (that is the file where
NameBindings are stored) and it also manages the communication between
a client process and the server (by using class Name_Proxy, which is a
private member of Naming_Context).  (Note: no IPC is necessary, if a
client process runs on the same host as the server).

The strategy for all public methods of Naming_Context is common :

1. Transform the format of the arguments to ACE_SString (which is
   internally used) if necessary.

2. check if work can be done locally : -> call the appropriate local_* method 
   otherwise call the appropriate global_* method.

Removing Name_Bindings from the database (either with unbind or
rebind) uses the ACE_Malloc class configured with the
ACE_MMAP_Memory_Pool.  This allows memory to be reclaimed when
name/value tuples are unbound.

4. Class Name_Server
   ----------------

The Name_Server registers in its run method its Name_Acceptor
(instantiated with the INET_Addr) at the Reactor, to receive incoming
requests.

5. Class Name_Acceptor
   ------------------

The Name_Acceptor allocates in its handle_input routine a new instance
of class Name_Handler on the heap, and accepts connections into this
Name_Handler.

6. Class Name_Handler
   -----------------

The Name_Handler represents the server side of communication between
client and server. It interprets incoming requests to the Net_Local
namespace and dele- gates the requests to its own Naming_Context
(which is the Net_Local namespace on the current host). For
communication it uses the helper classes Name_Request (which up to now
needs not only contain the request from the client, but also the
appropriate reply from the server) and Name_Reply.  Note that I want
to change the usage of these classes to make the structure of the
software clearer.

7. Dependencies
   ------------

As the Name service must be able to handle wide character strings, it
uses ACE_WString String classes.

8. Examples
   --------

The Name_Server/Client-Server/client and
Name_Server/Client-Server/server directories each contain sample code
that exercises the client and server side of the application,
respectively.  

9. Known bugs
   ----------

The "type" portion of the name/value/type tuple is not currently
implemented.

10.TBD
---

- solving the known bugs
- add more testsoftware

