$Id: README 94654 2011-10-07 09:17:20Z msmit $

CONTENT
=======
This directory contains files implementing CosNaming idl interfaces
(from CORBA COSS), as well as a few utilities.  Server code, service
executable, and documentation for using the service are located in
$TAO_ROOT/orbsvcs/Naming_Service.


UTILITIES
=========
Naming_{Client,Server}.{h,cpp} contain utility classes that can simplify
programs which play a role of Naming Service server or client.  See
$TAO_ROOT/orbsvcs/Naming_Service/Naming_Service.{h,cpp} and
$TAO_ROOT/orbsvcs/tests/Simple_Naming/client.{h,cpp} for examples of
using these classes.


IMPLEMENTATION
==============
The architecture for TAO's implementation of CosNaming::NamingContext
interface follows the Bridge pattern.

 * TAO_Naming_Context (in Naming_Context_Interface.h) inherits from
   POA skeleton, and plays the role of 'Abstraction' (aka 'Interface')
   in the Bridge architecture - it forwards all client requests to a
   'ConcreteImplementor' through an 'Implementor' pointer.

 * TAO_Naming_Context_Impl (in Naming_Context_Interface.h) is an
   abstract base class for all concrete implementations of
   NamingContext functionality (i.e., 'Implementor').

 * Currently, TAO Naming Service has two 'ConcreteImplementors':
   TAO_Transient_Naming_Context (in Transient_Naming_Context.h), and
   TAO_Persistent_Naming_Context (in Persistent_Naming_Context.h),
   providing non-persistent and persistent, hash-table-based implementations of the
   NamingContext functionality, correspondingly.  Both
   'ConcreteImplementors' inherit from TAO_Hash_Naming_Context (in
   Hash_Naming_Context.h), which, in turn, inherits from
   TAO_Naming_Context_Impl.  TAO_Hash_Naming_Context factors out code
   common to both 'ConcreteImplementors'. (Here we have a form of the
   Template Method pattern).

*  Other major classes:
   - TAO_Persistent_Context_Index - facilitates implementation of the
     Persistent version of the Naming Service.
   - TAO_BindingsIterator - implements CosNaming::BindingIterator
     interface.  Can be used with either of the NamingContext 'ConcreteImplementors'.

*  Persistent implementation of the Naming Service uses ACE_Allocators
   and memory-mapped files.

The Bridge implementation class structure makes it easy to:

1) Create and plug-in different CosNaming::NamingContext implementations by
   subclassing TAO_Naming_Context_Impl.

2) Dynamically load an appropriate NamingContext implementation at
   run-time, based on the config file entry, by making TAO_Naming_Context_Impl
   inherit from ACE_Service_Object...


TO-DO
=====
Extend CosNaming::NamingContext interface and its implementation to
support binding of more than one object per name and name
resolution according to policies (e.g., random or round robin), to provide
Load Balancing functionality.
