Information Technology Reference
In-Depth Information
can use it. COM is a component standard that provides black box reuse. A
developer can access a COM component through interfaces provided by the
component. Similar to CORBA, these interfaces are described using COM
Interface Description Language (COM IDL). An interface is immutable in the
sense that it is a contract for the service it provides. When a client application
invokes an interface, it is guaranteed that the interface will always work the
way it is defined in the COM IDL. A new interface has to be created if there
are to be changes to an existing interface. As in CORBA interface, the immu-
tability property is one of the core principles of component standards.
In COM, there is a Microsoft Interface Definition Language (MIDL) com-
piler that generates a stub and proxy objects from COM IDL for interaction
with other components. A proxy object is a program of a target component
that is local to the client application. If the client wants to invoke a method of
a target component, the client sends the call to the proxy of the target compo-
nent. The proxy relays the request to the stub object of the target component.
The job of the stub is to receive the remote call on behalf of the target compo-
nent and send the request to the target component for processing. When the
request has been completed, the response is returned by the target compo-
nent to the stub object, which relays the response to the client application via
the proxy object. In comparison to CORBA, integration using COM does not
require a broker. Similar to RPC, the client application communicates directly
with the target component through proxy and stub.
To enable transparent communication of components across the network,
Microsoft created Distributed COM (DCOM). DCOM does not alter how
COM operates. It simply provides a mechanism for the client application
to communicate with a remote target component using the network. When
the client application and the target component reside on the same machine,
there is no need to use DCOM. The request can be sent by COM through
interprocess communication. The main benefit DCOM provides to the devel-
oper is location independence. When making the call, the developer does not
have to worry about whether the request from the client application is local
or remote. DCOM automatically handles the communication. To accomplish
remote communication, DCOM uses Object Remote Procedure Call (ORPC).
This protocol is similar to IIOP that CORBA uses to communicate between
ORBs. The combination of COM and DCOM is a competing component
model to CORBA. Microsoft has implemented COM on its Windows plat-
form and Apple's Macintosh platform. COM has also been implemented on
specific versions of UNIX platforms.
The COM technology has been developed further to COM+, .NET, and
.NET Web Service.
3.2.2.2.1 How DCOM Works
DCOM is sometimes referred to as COM on the wire. DCOM works similarly
to CORBA in that a client-side DCOM object creates a message and invokes
a wire protocol similar to IIOP called ORPC (Object Remote Procedure Call)
Search WWH ::




Custom Search