The OMG Common Object Request Broker Architecture
(CORBA) offers a promising platform for employing distributed
object technology in a language-independent manner. To gain experience
with this technology, we developed a small-scale Internet-based
workgroup application employing distributed objects.
This experience has led us to the identification
of a number of limitations and practical problems that may hinder
the widespread adoption of this technology.
The languages server and client are written in depend
on the language mappings supported by the ORBs used. To be called
CORBA-compliant, an ORB should at least support one language binding,
which can be C, C++ or Smalltalk. Interoperability between different
ORBs is also an separate compliance point, and CORBA 2.0 specifies
how ORBs can work together using the General Inter-ORB Prototol.
The Internet Inter-ORB Protocol (IIOP) is used to interconnect
ORBs via TCP/IP.
See
In this project, we used ORBeline from PostModern
Computing
PostModern Computing released a Java language mapping
called Black Widow
Each user participating is represented by a personal agent, which has an agenda and a message queue. Each agenda consists of several appointments. A workgroup has a membership list consisting of zero or more agents present in the system. An Agent can be a member of zero or more workgroups.
Possible operations on agents are sending messages
to and making appointments with other agents, subscribing to a
workgroup, making an appointment with a workgroup or sending a
message to all workgroup members.
The server is running as a daemon on one or more
servers. ORBeline allows clients to transparently connect to multiple
servers running on servers in the same subnet, and even has limited
support for object replication and fault tolerance.
The Java client applets are first transferred to
the client by the HTTP server using a web page and then contact
the object server through IIOP, the Internet Inter-ORB Protocol.
The client applets run in Netscape or HotJava and contain the
CORBA client communications software as well as the client application
code. The object server can reside on a different machine than
the Web server and is running an IIOP gatekeeper, for instance
on {\sc tcp} port 15000, that is part of the ORB. All further communication
is done through this gatekeeper.
Figure 3 shows the class inheritance hierarchy corresponding
to an IDL interface for X.
The IDL compiler generates a client proxy class with the
same name as the interface. This class is used directly by the
client applications. The member functions of X first marshal
the function's parameters for a client object Xc to a
network stream and then invoke the method on the corresponding
server object Xs.
Figure 3 also shows the server-side
skeleton class {\tt _sk_X} and implementation class
{\tt X_imp}.\footnote{The name {\tt _sk_X} is generated by ORBeline,
the name {\tt X_imp} is chosen by the programmer.}
The skeleton class embeds the ORB-related functionality needed
to communicate with the object.
The implementation class must be defined by the system developer.
When a client creates an instance of X,
the object reference to Xs as
returned from the server is actually the address of Xc. It is
however not possible to pass an object reference (the address
of Xc) from the client back to the server. Since Xc
refers to
a proxy object locally at the client, the server cannot handle
this memory location. This is partly inherent to the CORBA architecture,
where clients cannot act as servers while servers can act as clients.
The Naming Service, part of Common Object Service
Specification I (COSS I,
The Event Service, which is part of COSS I, allows objects to communicate asynchronously using events, but only for server objects.
Allowing client callbacks is further complicated by the fact that clients may already have an event loop, for example to dispatch window events. Adding callback capability to clients requires either the use of multiple threads or to merge these event loops.
With the introduction of Java on the Internet, several
vendors have extended their ORB implementations with a proprietary
IDL-to-Java mapping. For the prototype, we used PostModern's Black
Widow, which can be used to write CORBA clients as well as servers.
Until an IDL-to-Java mapping has been standardized by the OMG,
Java servers or clients are not likely to be portable between
the existing proprietary implementations.
In a CORBA environment, Java applets are used as
easy-transportable frontends. Java's concept of ``mobile code''
is only exploited during the initial phase of sending the client
applet to the client computer using the HTTP protocol. When the
Java client is running, it behaves like any other standalone CORBA
client.
The skeleton definitions however, are in most cases
vendor-specific. For instance, the skeleton class for an IDL-defined
interface Agent is called AgentBOAImpl in Orbix and
{\tt _sk_Agent} in Orbeline; the methods defined in the classes
are also different, as are the generated source file names. This
affects the definition of the derived implementation class, making
CORBA server software less portable among ORBs. Especially large
software systems would suffer portability problems.
Since the client is independent of the ORB used for
the server implementation vice versa, it would be possible to
write a prototype using distributed Smallltalk objects and rewrite
the final implementation in C++, without affecting the clients.
The most important problem we faced was the distinction
between clients and servers, where distributed objects can only
reside on a server. If a client wants to make its objects available
to other programs, it should be configured as a server as well,
with an ORB running on the same host. This causes problems regarding
overhead and licensing and is not a feasible situation for mass
distribution of Java clients over the Internet, for instance.
The same architecture limitation prevents servers from notifying
clients using callbacks.
This feature makes it impossible for clients to pass
distributed object references back to the server, forcing them
to work with other identification mechanisms such as object ids
or human-readable strings.
Other minor problems we observed concern the lack
of support for existing non-CORBA objects in a distributed environment.
Possible solutions are converting existing classes to CORBA and
making their interface available through IDL, or to write CORBA
object wrappers around these objects. The Java mapping should
be used with caution until an OMG specification is published.
Finally, not all parts of a CORBA system are compatible among
ORBs at the source-code level.
A possible future incorporation of an Object Request
Broker within desktop operating systems might be a solution to
allow clients to make objects available to others, perhaps in
a limited fashion.
In addition, given the growing dominance of the Web
as a client access point for a variety applications,
the ability to access CORBA objects from within Java
applets opens up an instant world-wide market for distributed object
applications.
In conclusion,
CORBA allows for the development of flexible client-server
systems and in that sense fullfills its promise of being a language-
and platform-independent architecture. Not all systems can be
built easily with CORBA, however. The design of a distributed
object application should reflect the limitations of the CORBA
architecture.