OSF DCE Application Development Guide--Introduction and Style Guide
OSF DCE Application Development Guide—Introduction and Style Guide
entries, depending on how the client is coded.
5.11.2 Profiles
A profile entry specifies a search path or hierarchy of search paths to be followed through
the namespace in order to obtain a binding to a server that offers a specified interface.
When a client imports from an entry that happens to be a profile, successive imports
(accomplished by calling rpc_ns_binding_import_next( )) return the contents of entries
that are read as a result of following the specified path through the namespace. All this is
transparent to the client, which sees only the bindings returned. Profiles can be used to
set up default paths and groups of paths for users. The
RPC_DEFAULT_ENTRY_NAME environment variable, which is the default entry
name used by the name service in import operations, usually contains the name of a
profile.
As with groups, the entries contained in profiles, which are called elements, exist
independently of the profile entry itself.
A very important property of profiles is that they allow clients to know little or nothing
about the organization of the namespace itself. Using the default case as an example,
consider the following: if the profile at RPC_DEFAULT_ENTRY_NAME has been set
up with elements containing entries for all possible active servers for a particular
application, clients can simply import from this name and trust the profile mechanism to
walk through the various compatible possibilities and return binding handles via
successive calls to rpc_ns_binding_import_next( ). (Note that a profile entry is not
limited to containing entries for just one interface; thus,
RPC_DEFAULT_ENTRY_NAME could be set up to contain all the defaults for a
cell.)
5.11.3 Summary of Namespace Entry Types
Clients access binding information in the namespace by looking up (by name) one of
three different kinds of entry:
• A server entry
• A group entry, which contains other entries whose contents are returned to the caller
when it reads the group entry
• A profile entry, which specifies a path of entries to be searched whose contents are
returned to the caller when it reads the profile entry
Lookups behave differently depending on the kind of entry read. If an entry is a simple
server entry, then the search begins and ends right there, whether successful or not. If the
entry is a group, then the lookup is more complicated. A binding will be returned from
among those that are found to be compatible by the name service, but within that
category the selection is undefined. If the entry is a profile, then a specified path of
5− 20 Tandem Computers Incorporated 124246