CORBA and DCOM: How Each Works
By David F. CarrFor months, we've been reporting on the "object wars" over how best to combine the Web with distributed object computing. In this primer, we will try to set aside the attacks and counterattacks in order to# explain the Object Management Group's (OMG's) CORBA, Microsoft's DCOM, and how each works with the Web.
Distributed object computing has two goals: to simplify system development and maintenance by creating reusable pieces of code, known as objects; and to allow objects installed on different computers to communicate over a network. Although there are distributed object systems for particular programming languages, CORBA and DCOM both also require the creation of language-independent interfaces.
CORBA Defined
CORBA: The Common Object Request Broker Architecture is a specification for Object Request Brokers (ORBs). An ORB sends requests from objects executing on one system to objects executing on another system.CORBA developers create their objects in a specific programming language and then create proxy objects called "stubs" and "skeletons." A stub is compiled into the language of the client application. It contains the interface for a remote object, but not the behavior. The skeleton is compiled in the language of the target application and is installed on a server.
For example, a Java applet for banking on the Web might send a "pay $800 on mortgage" message to a stub representing the bank's application. The message goes from the stub to an ORB running on the client, to an ORB on the server. If the bank's application is written in C++, the server ORB would call a C++ skeleton, which would pass it to the C++ object responsible for executing bill payments.
DCOM Defined
DCOM, the distributed extension of the Component Object Model (COM), grew from Microsoft's work on OLE compound documents. The full set of these technologies is now known as ActiveX.Unlike CORBA objects, which execute in a particular programming language, COM components use standardized interfaces and methodologies to pass data. For instance, all COM objects use the interface Iunknown as the basis for establishing communication between objects. As long as objects implement the standard interfaces, the language used to create either is irrelevant.
Microsoft calls DCOM "COM with a longer wire" because it uses the same methodology to talk across networks that is used to run interprocess communication on the same machine.
This process, called marshalling, involves creating a proxy for the object on the local machine and a stub on the remote machine. The proxy communicates with the stub, handling all details. As far as the COM object is concerned, it is working with an object running in the same process.
The Protocols
CORBA and DCOM work best when they can use their own protocols, but both also have strategies for using HTTP where their protocols are blocked by firewalls.Although CORBA products use a number of different protocols to communicate, the trend is toward standardization around the Internet Inter-ORB Protocol (IIOP), introduced in CORBA 2.0.
Microsoft based its DCOM protocol on Remote Procedure Call (RPC) standards developed for the Distributed Computing Environment (DCE) standards. Called Object RPC, it can use TCP for guaranteed connectivity or User Datagram Protocol (UDP) for connectionless transfer. DCE is controlled by the Open Group, the same industry consortium to which Microsoft granted the right to standardize COM and DCOM.
The Supporters
Netscape and Oracle have both put CORBA IIOP at the center of their Web computing strategies and conspicuously snubbed DCOM. Netscape is building IIOP support into this spring's releases of its client and server product lines. Oracle is inviting partners to extend the functionality of its database by building "cartridges," which are CORBA servers that know how to interact with the Oracle database.Microsoft is DCOM's most outspoken backer, but many vendors of COM-based systems agree that DCOM is the most convenient way for them to add distributed capabilities. Some other vendors, including Informix and Sybase, intend to support interfaces to both.
How They Work With the Web
CORBA piggybacks on Java to gain access to Web clients. DCOM works with either Java or ActiveX components that are downloaded into an ActiveX-capable browser.In 1996, several CORBA vendors introduced Java applets that could act as ORBs.
Netscape has licensed one of these, Visigenic Software's VisiBroker for Java. The Java ORBs also work within Microsoft Internet Explorer.
Because the majority of CORBA Web clients are being written in Java, they will be instantly portable to all platforms where a Java Virtual Machine is available. This is one of their major virtues for Netscape, which prides itself on cross-platform support.
Applets written to the ActiveX specification will also be portable to all platforms where an ActiveX-enabled browser is available. To date, that still mostly means Windows 95 and Windows NT.
But even after ActiveX browsers are available on a wider variety of platforms, binary ActiveX components will have to be recompiled for each platform.
A Java ORB can be downloaded as an applet or permanently stored on the client. To access remote objects with CORBA, an applet must include proxy objects responsible for translating Java messages and transmitting them to the server.
An ActiveX-enabled browser allows applets to function as ActiveX components. This means they can interact with other ActiveX components on the client, including those that are functioning as DCOM proxies for remote objects.
Maturity and Availability
CORBA implementations exist on most platforms, and have been used successfully in some large projects. But its complexity, lack of tools, and the industry's failure to agree on interoperability between ORBs have cost it wide commercial acceptance.DCOM is still new as a commercial product, although beta versions have been available for several months. Microsoft is working to make COM and DCOM generally available on the Macintosh. A Solaris version of DCOM developed in partnership with Software A.G. is in its second beta release, with general availability scheduled for April. Beta versions for Digital Unix, Linux (on Intel platforms), and IBM mainframes are expected soon.
CORBA is more mature as a cross-platform technology, while DCOM has an army of developers who already know COM programming. COM also benefits from user-friendly Windows tools.
For these reasons, some developers see the best of both worlds as Windows clients that capitalize on the strengths of COM talking to CORBA servers on other platforms. At Object World East earlier this month, Microsoft endorsed a proposal for interoperability between DCOM and CORBA--the first time Microsoft has formally backed an OMG standard.
However, that doesn't resolve the issue for the Web, where Netscape is developing a Web strategy that revolves around CORBA and IIOP, while Microsoft is promoting the combination of ActiveX and DCOM.
Reprinted from Web Week, Volume 3, Issue 7, March 24, 1997 © Mecklermedia Corp. All rights reserved. Keywords: java objects Date: 19970324