## Kinds of Objects

In addition to the local objects that servers and clients each have, there are two major kinds of distributed objects: dynamic objects and named objects. Distributed objects exist in the server's memory space, and clients refer to them via a pointer data structure known as an object reference.

Distributed dynamic objects are created on a server by a client request for the exclusive use of the invoking client. These objects reside on the server, but clients initiate the object's creation using an object creator function defined in the interface. In C++, dynamic objects are simply local objects created at runtime. In the context of DCE, we use the term dynamic objects to mean distributed dynamic objects. Dynamic objects are typically short-lived; that is, in the life span of the client rather than that of the server.

Well-known objects represent specific resources supported by one or more servers, and are called named objects when they are identified by a name stored in a name service. Each server that supports the resource creates and maintains its own object representing the resource.

Clients control dynamic objects and servers control named objects. The server can give out a dynamic object reference only to the initiating client and cannot give out the reference to any other client. However, the client that initiated the creation o f a dynamic object can become a server to another client and give out a reference to the dynamic objects it owns. Servers do not automatically delete dynamic objects when a client exits (unlike other RPC features such as a context handle). This allows clients to pass object references to other programs to use. This also means that it is the responsibility of the clients to delete all their dynamic object references, thereby causing remote procedure calls to delete the object on the server. On the other hand, a server may pass object references for named objects to more than one client, and the server has control over when a named object is deleted. Clients delete only their local reference to named distributed objects; they cannot delete the actual object on the server.

Persistent objects are known objects (usually named) whose characteristics are maintained independently from a specific server, usually on disk.

##