## Naming Objects

This topic discusses the model used to advertise named objects. The model stores binding information for the object's hosts in the name service (for example, the Cell Directory Service (CDS)). The model also stores the object's server location information in the endpoint map of each host that has one of the running servers.

There are many ways to use the name service to store information. Typical servers create and export information to a name service entry representing the server itself. In the named object model, an additional name service entry is also created for each named object. Thus, as the following figure shows, if five persistent objects are supported by two servers, there are a total of seven entries in the namespace. These allow clients a choice to bind by way of server entry names or objects names.

Server and Object Names in the Name Service

The object name is application specific, and each server exports its binding information to both its server entry and the object entries it supports. The name service entries for each object associate the object name with the combination of interface class ID, binding information (protocol sequence and host name) for each supported server, and object identifier (a UUID).

Object entries are different than server entries. It is important to understand that object entries represent objects, not servers. A server entry should contain binding information for only one server because it represents that server. On the other hand, object entries contain binding information for one (or more) servers because multiple servers may support the object.

As the number of named objects for an interface grows, management of the name service may become necessary. This could be done in the code of each server, but a more consistent and practical approach is to create scripts that use dcecp, or management applications that use the name service application programming interface routines. For example, the performance of the name service may degrade as the number of entries in a directory becomes very large. Place object names in a directory structure appropriate for the application.

If the application allows all clients to know the object names, the practical number of objects may be limited. However, an application can be designed to name a service object that clients look up, and pass in the specific object name (or identifying number). In this case, the servers can implement (and even later change) the object name location any way preferred: by using CDS, a commercial database, or an application-specific database.