The Role of COM in a Distributed System

The Role of COM+ in a Distributed System

Here's a surprising claim: COM+ isn't perfect. Here's another: In .NET distributed applications, you don't always need COM+.

COM+ is designed to solve some common problems with large-scale enterprise applications. In the past, it just wasn't possible to design a scalable distributed application without COM+. In .NET, that isn't necessarily the case. Some .NET features compete with or duplicate COM+ functionality. Others complement it. And because COM+ is based on COM and DCOM, a few useful COM+ features are prohibitively difficult to integrate into a .NET application.

It's important to understand that COM+ was initially designed to work with COM components. Many COM+ services can be reused in .NET, but some fit into .NET solutions much more effectively than others. Some of the COM+ services that are ideally suited for .NET include the following:

  • Object pooling

    This service enables you to pool objects that are expensive to create and reuse them for different client requests.

  • Just-in-time (JIT) activation

    With this service, an object isn't created until the client invokes a method call. JIT activation is also used in conjunction with object pooling, which allows an object to be deactivated when not in use and reused to serve another client, even while the original client maintains its reference to the object.

  • Automatic transactions

    Automatic transactions allow components to be used in a transaction without specifically knowing anything about the transaction itself. This service also provides support for distributed transactions.

COM+ also provides some services that are generally less elegant to implement (or less important to use) in a .NET application:

  • Queued components

    This service enables you to create components that execute asynchronously by using a transparent Microsoft Message Queuing (MSMQ) interface.

  • Loosely coupled events

    This service provides publish and subscribe communication between objects. However, the publisher and the subscriber require no knowledge of each other.

  • Role-based security

    This service enables you to group application users into logical roles and assign them different permissions without having to embed security code into the component itself.

Before we consider the individual services COM+ offers and how they fit into the .NET picture, we need to take a closer look at COM interoperability and registration with a serviced component.

MTS, COM+, and COM+ 1.5

COM+ is the successor to Microsoft Transaction Server (MTS). Most developers agree that the MTS moniker is at least as confusing as COM+. Although MTS and COM+ both support distributed transactions, both support several other services as well. In .NET, COM+ services are usually referred to as enterprise services, and a .NET component that uses enterprise services is called a serviced component.

COM+ 1.5 is yet another version of COM+; it first shipped with Microsoft Windows XP. It adds the ability to expose a COM+ serviced component as a SOAP-based XML Web service, the ability to configure components to be recycled periodically, and configurable transaction levels that can improve performance by reducing the level of failsafe protection.



Microsoft. NET Distributed Applications(c) Integrating XML Web Services and. NET Remoting
MicrosoftВ® .NET Distributed Applications: Integrating XML Web Services and .NET Remoting (Pro-Developer)
ISBN: 0735619336
EAN: 2147483647
Year: 2005
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net