Basic Server Programming

Server programs execute and manage object implementations. That is, they are responsible for:

As mentioned previously, DSOM provides a simple, "generic" server program that performs all of these tasks. All the server programmer needs to provide are the application class library(ies) DLL that the implementer wants to distribute. Optionally, the programmer can also supply an application#specific server class, derived from SOMDServer. (The SOMDServer class can be used by default.) The server program does the rest automatically.

The "generic" server program is called somdsvr and can be found in /usr/lpp/som/bin/somdsvr on AIX and in %SOMBASE%\bin\somdsvr.exe on OS/2.

Some applications may require additional flexibility or functionality than what is provided by the generic server program. In that case, application-specific server programs can be developed. This section discusses the steps involved in writing such a server program.

To create a server program, a server writer needs to know what services the DSOM run-time environment will provide and how to use those services to perform the duties (listed above) of a server. The DSOM run-time environment provides several key objects that can be used to perform server tasks. These objects and the services they provide will be discussed in this section. Examples showing how to use the run-time objects to write a server are also shown.


[Back: Compiling and linking clients]
[Next: Server run-time objects]