OSF DCE Application Development Guide--Introduction and Style Guide

Using the DCE Name Service
A single namespace entry for the server, which contains a binding attribute and,
possibly, an object attribute. Thus, this entry contains all the binding information
that is exported to the namespace by the server.
One namespace entry for each object that the server offers. Each entry contains an
object attribute that contains that object’s UUID, and a group attribute that refers
back to the exporting server’s namespace entry.
Note that the object entries consist of a combination of attributes not encountered before
(object and group). Although unorthodox combinations of attributes are not generally
recommended, they can sometimes be useful, as in this example.
The advantages of this scheme are twofold:
It greatly reduces the amount of server-provoked export activity into the namespace.
It allows the server application to associate a people-readable name (that is, the name
of each object’s namespace entry) with a UUID.
When the server is first activated it creates all the namespace entries, exports the objects’
UUIDs into the object entries, and initializes the group attributes to refer to the server
entry. It exports its binding information into the server entry only. From then on,
whenever it is restarted, all the server needs to do is reexport its binding information into
the single server entry. Everything else remains the same; that is, the objects’ UUIDs
have not changed, nor has the name of the server entry to which the object entries’ group
attributes refer. Thus, instead of exporting bindings to every one of its object entries on
subsequent startups, the server exports to only one entry.
Of course, if the system were restarted or the namespace reinitialized, then the original
start-up process would have to be repeated.
The slight disadvantage of this scheme occurs on the client side, where the import
process becomes somewhat more complicated than it would be if all necessary
information (both binding and object UUID) could be read in from the same entry.
5.15 Server and Client Steps
The following subsections describe in detail, from both the server’s and the client’s side,
how this model works.
5.15.1 Server Export
This section lists the steps that the server must perform to set up and initialize its
namespace. Each step consists of the NSI function that must be called to perform the
operation.
1. uuid_create()
124246 Tandem Computers Incorporated 5 25