COM+ is
an umbrella name for a number of new features in
Microsoft's Component Object Model (COM).
COM+ is,
in large part, a merging of Transaction Server (MTS)
and Message Queue (MSMQ) into the base framework of
COM. It is basically the unification of COM, MTS and
MSMQ,
in addition to:
Extensions to COM
Extensions to MTS
and the addition
of other services.
These
services include self-describing components, queued
components, events, security, transactions, and load
balancing.
Self Describing Components
Self-describing
components are standard COM components that have attributes associated with them. The
attributes --not to be confused with properties that
can be programmatically set and queried-- are runtime
characteristic that can be applied to the component.
Administrators can define attribute values at runtime
or developers can define the values at design time.
For example, a designer might stipulate that a
component requires transaction.
Administrators
can override other attributes. It is possible to pass
an attribute to a component as it is created. The
attribute can be a database connection string as an
example. This would allow a component to redirect
opens to a database replica in case the master cannot
be immediately recovered.
Queueing
Probably the most
prominent new feature of COM is support for Queued
components (QC).
An ordinary component that accepts only in parameters can be marked at
design time (through self-description) or runtime as
a QC. In normal mode, all interactions with the
component occur in real-time using DCOM. But when a
component is used in QC mode, the client-side stub
silently records interactions between the application
and the component. When the component is destroyed,
the interactions are batched into an MSMQ message and
sent across the network. QC interactions can leverage
common MSMQ messaging properties like recovery and
transactions --again through self-description or by
administrative control. At the target queue, a player
reads the interactions and replays them. Another
feature of QCs is automatic processing of poison
messages --transactions that are never going to
succeed and stay at the head of a queue.
Events (Loosely Coupled Events)
COM+ provides a
multi-publisher, multi-subscriber event channel
mechanism. Unlike many other publisher-subscriber
mechanisms, COM+ events can have a semantically rich
interface. That is, a publisher might call
Teller.credit(Athul,
1000001);
rather
than
SendEvent(channel=Teller, name=Athul,
credit=1000001);
Publication
and Subscription is at the method level. In other
words, it's highly granular -- you can have different
publishers emitting events to each method and
different subscribers receiving events through each
method. Anyone or any program can register another
program to publish or subscribe to events. Event
filters can be defined at the publisher or at the
subscriber ends of an event channel. Events,
publications, filters and other event machinery can
be secured using standard NT 5 security. Redirection
allows events to be republished as invocations to
ordinary COM objects. Finally, events can be sent
using DCOM or as Queued Components (when broader fan-out
and maximum scaleability are needed).
Transactions
The transaction
features of COM+ are a repackaging of MTS. COM+ will
provide a new interface with individual get/set
methods for each bit - SetComplete, EnableCommit,
SetAbort, DisableCommit.
Security
The security
features of COM+ are much like those in MTS, but they
also leverage the new security infrastructure of NT 5.
Access controls can be placed on the application (package),
component, and (this is new) method level. You have
the ability to map NT user accounts and groups to
Roles. This allows you to build a logical security
model on top of the grungier model often found in the
real world. The core of NT security is provided by
Active Directory. Kerberos (with transitive trust) is
the primary security service used by AD, but PKI and
NTLM are also supported. AD implements the PKI
extensions to Kerberos that allow users to
authenticate themselves with X.509 certificates and
then obtain the standard Kerberos TGT and session
keys.
Load Balancing
The COM+ load
balancing architecture allows you to define a router
on a server that forwards object creations to a
machine that has low utilization. Once the object is
created, method calls go to the same object even when
it is stateless. Of course, there are Wizards for
everything and a single Application Explorer window
for management.