Object-Oriented Programming Using SOM and DSOM:Distributing Your Objects:DSOM Overview

From EDM2
Jump to: navigation, search

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.

Figure 5.1

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.

  1. Define the interface for your objects and write code to implement your objects.
  2. Create a server program that executes and manages the objects you defined in step one.
  3. Create a client program that accesses the objects.
  4. Configure your DSOM environment.
  5. Build and register your classes and your server program.
  6. Run the client program.

The following sections provide details on each of the above steps.