OSF DCE Application Development Guide--Introduction and Style Guide

OSF DCE Application Development Guide—Introduction and Style Guide
RPC
Runtime
RPC
Runtime
Client Server
export bindingsimport binding
CDS Namespace
When a prospective client attempts to import binding information from a namespace
entry that it looks up by name, the binding is checked by NSI for compatibility with the
client. This is done by comparing interface UUIDs. The client presents an interface
UUID when it begins the binding import operation; the UUID of the interface being
offered is exported to the name entry, but not in the binding handle itself, by the server.
If these interface UUIDs match, then the binding handle contained in the entry is
considered compatible by the RPC runtime and is returned to the client. If more than one
handle is contained in the entry (this is often the case), they are returned one by one on
successive imports. NSI also checks for protocol compatibility.
The import routines will return only client-compatible bindings, but a client can sift
through the returned bindings and make its own choice as to which ones to use, based on
its own criteria. The technique by which this is done consists of converting the bindings
into string bindings, and then inspecting (or comparing) the strings.
Note that binding handles do not include an interface UUID. Binding handles do contain
a host address, an endpoint, and an optional object UUID, among other things. The
interface UUID is associated with the interface’s stub code, which inserts it into outgoing
RPCs and checks it in incoming ones, thus guaranteeing client/server operational
compatibility. This allows binding handles to be used very flexibly: once a client has
successfully bound to a server, it can utilize any of the interfaces that server offers,
simply by making the desired remote call.
5.5.2 Summary
The mapping from name to server that occurs when bindings are imported from the
namespace is indirect because binding is a two-step process: first the binding handle is
obtained by lookup from a named entry, and then the handle is used to reach a server.
The crucial point is that the imported handle will not usually contain a complete binding
to a specific server (namely, the one that happened to export it). Completion of the
partial binding occurs later, when the client makes its first remote procedure call; the
RPC runtime uses UUIDs, not names, to determine how it should complete a binding.
5 10 Tandem Computers Incorporated 124246