Go to the previous, next section.
This document describes the structure and functioning of the ILU runtime kernel library, which is linked with both client and server programs (really, in ILU there is no significant difference between the two), and provides basic ILU services to language-specific runtime libraries. It covers transport services, RPC protocols, object identification and mapping, and the way that object classes are managed.
Much of the kernel documentation is in the file `ILUHOME/include/iluxport.h', particularly the discussions on locking, garbage collection, and event processing loops. It is kept there in an attempt to be somewhat more up-to-date than the material in this chapter may be.
The kernel library consists of the following files:
Core code, which contains routines which implement functionality which is in turn exported to various language runtimes:
Support code, which provides implementations of various programming constructs:
System code provides implementations of optional functionality:
In the ILU kernel, the Object is represented by the
struct _ilu_Object_s
, pointed at by values of the type ilu_Object
(see `src/runtime/kernel/ilu.h'). This structure
is used for both surrogate and true objects.
ILU preserves eq'ness of objects. This means that two objects may be examined for equality by comparing the addresses of their structs; if the address are the same, the objects are said to be eq. This distinction means that if, for example, a client receives an object as a return value from a method call, and receives it again as a return value from a different method call, the same object in memory will be returned from both method calls. Note that this behavior is not required by CORBA.
Surrogate objects are related to true objects by the server
field
of the ilu_Object
struct. This field, of type ilu_Server
points to a value of type
struct _ilu_Server_s
, which contains a pointer to a connection,
a service id string, and a hash table of objects that are served by that
server. The connection, pointed at by a value of type ilu_Connection
,
indicates the transport channel to the actual server process,
and the RPC protocol spoken between the server process and its clients.
The object hash table is used in maintaining eq'ness; when an instance is
received from the particular server associated with the hash table,
the receiver checks the instance-id of the object against the hash table,
to see if that particular object has already been instantiated in the
address space.
ILU uses the Sun and/or Xerox Courier RPC protocols to communicate, and both use class identifiers called program numbers, and version numbers, to identify the object class being used. These numbers are not represented directly in the ISL file, but rather the program number and version assigned to a class are remembered in a separate `registry', which is simply a text file which has one class per line, in the form
interface-name.class-name:class-unique-id hex-program-number decimal-version-number
For example,
rwho.machine:NgZs92nNMUOYWrb7Z4GR=ZZ2fBa 310001c9 1 nms.server:7sUFAwcfVPucrRskkKaud6FI9gc 310001a2 2 rwho.m2:kwvFDgDtY2qE0hgRKAwL5UwXMUd 310001d2 1 ...
This registry is found by the kernel at run time, and the contents are loaded into an internal hash table for use. To find the registry, the kernel looks for a file called `SunRPCRegistry' (or, the Courier case, `CourierRegistry'), by looking in one of the following 3 locations:
ILUREGISTRY
is set, it is assumed that
its value indicates the directory in which the registry lives.
ILUHOME
is set, it is assumed that
the registry lives in the subdirectory `lib/' of the ILUHOME
directory.
ILUREGISTRY
or ILUHOME
are set, the runtime
looks in the directory specified during the ILU installation
as the value of REGISTRY_LAST_RESORT
.
The programs sunrpc-register-interface
and courier-register-interface
can be used to register all the classes in a given ISL file:
% sunrpc-register-interface ISL-file-name
The registry can also be edited by hand to add or delete registrations for classes.
When editing by hand, be sure to update the value of .LastAssignedProgramNumber
,
so that future program numbers are allocated properly.
This system is overly fragile, and a better replacement system for relating ILU object types to Sun RPC program numbers is under design.
Go to the previous, next section.