Object-Oriented Programming Using SOM and DSOM:Distributing Your Objects:DSOM Overview
DSOM supports transparent, remote access to distributed objects. The DSOM run-time routes requests to objects that are outside the address space of a client. In effect, DSOM is a remote method capability. It allows a client to run methods on remote objects. Figure 5.1 shows the DSOM structure.
DSOM is typically used when you want to allow objects to be shared by multiple processes. In DSOM terminology, the objects exist in a DSOM server, and different clients can access the objects via the DSOM run-time. Another situation where DSOM should be used is when you want to divide your application so that a failure in one part of the application will not cause the entire application to crash. One potential example of such usage is the OS/2 Workplace Shell. By implementing the Workplace Shell as a DSOM server, the Workplace Shell can avoid crashing due to Workplace Shell application errors.
The development of a DSOM application involves the following steps.
- Define the interface for your objects and write code to implement your objects.
- Create a server program that executes and manages the objects you defined in step one.
- Create a client program that accesses the objects.
- Configure your DSOM environment.
- Build and register your classes and your server program.
- Run the client program.
The following sections provide details on each of the above steps.