OSF DCE Application Development Guide--Core Components

Basic RPC Routine Usage
To simultaneously offer alternative implementations of an RPC interface for different
types of objects, a server uses alternative managers. Servers that implement each of their
interfaces with only one manager can usually avoid the tasks associated with assigning
object types. However, when a server offers multiple managers, each manager must be
dedicated to operating on a separate type of object. In this case, a server must classify
some or all of its objects into types; for example, a calendar application that specifies one
non-nil type UUID for departmental calendars and another non-nil type UUID for
personal calendars.
By default, objects have the nil type. Only a server that implements different managers
for different objects or sets of objects needs to type classify its RPC objects. To type
classify an object, a server associates the object UUID of the object with a single type
UUID by calling the rpc_object_set_type() procedure separately for each object. To
create a UUID, a server calls the uuid_create( ) routine.
The exact implementation of a manager can vary with the type of object on which each
manager operates. For example, a queue-management interface may be implemented to
manage print queues as objects in one case and to manage batch queues as objects in
another. Figure 13-1 illustrates the use of type UUIDs to identify two types of managers.
Figure 13-1. Manager Types
4086B9D4FB6C 11C9 B09A 08002B0F4528
E5E46D28FB6A 11C9 881D 08002B0F4528
Type UUID:
Type UUID:
Procedure get_sum
Procedure get_sums
Procedure get_sums
Procedure get_sum
(operates on objects of first type)Manager A
Manager B (operates on objects of second type)
When the server receives an incoming call that specifies an object UUID, the server
dispatches the call to the manager for the type to which the object belongs. For
information on how a type is used to select a manager for an incoming call, see Chapter
16.
124245 Tandem Computers Incorporated 135