## Using Object UUIDs to Avoid Binding Ambiguity

Binding handles can contain, besides host address and endpoint information, an object UUID as well. The endpoint mapper will try to match an object UUID contained in a binding handle with one of the object UUIDs associated with its map of registered endpoints. This allows even a partial binding to specify a target more precisely than just by host machine. Since object UUIDs are generated by the uuid_create( ) function call (see the OSF DCE Application Development Reference), servers can create as many of them as they need.

For the print server example discussed in the previous topic, the namespace entries for the servers could be set up as shown in the following figure.

Print Server Name Entries with Object UUIDs

The following steps describe the sequence of events shown in the preceding figure:

1. The client imports a partial binding to the printer interface from the entry A in the namespace.

2. The client makes its first call with the binding it imported from A.

3. This time the endpoint mapper at print server A's host is able to match the call with A's registered endpoints, because the endpoints have been registered with both the printer interface and print server A's object UUID, and the incoming call's partial binding also contains print server A's object UUID.

Each server has exported a set of partial bindings that differs from all other servers' by its object UUID (which thus becomes, in effect, a server ID). If, for example, server A has properly registered its endpoints with the same object UUID as the one it exported its bindings with, the endpoint mapper will make sure that a partial binding exported from server A's name entry will result in a full binding to server A.

Now suppose that each print server sets up a separate namespace entry for each printer it manages. The printers themselves would, in effect, be identified by their own object UUIDs. The following figure illustrates this.

Separate Printer Name Entries

Now a client will be able to access a specific printer by importing a binding handle from that printer's name entry. The endpoint mapper at the target host would compare the object UUID in the partial binding with the object UUIDs registered by the print servers, and select an appropriate server. The server in turn would also use the object UUID to select the correct printer for the request, if it managed more than one printer. A namespace set up in this way with a separate entry that contains a unique object UUID for each accessible service resource is called an object-oriented namespace.

##