Using Serviced Components
Component Services, or COM+, provides a rich set of features in a component-hosting envi-
ronment, such as distributed transactions, just-in-time activation, object pooling, and
asynchronously queued components. In Chapter 7, we examine these features in detail.
Even though Component Services is a COM-based technology, Microsoft has added facili-
ties to the .NET Framework that allow managed types to be easily configured for use within
this environment. When you create .NET types that can be hosted under Component Services,
they are called Serviced Components.
Here’s a logical view of an architecture that uses Serviced Components (see Figure 1-3).
The critical feature of Component Services being leveraged from this architecture is its
ability to automatically roll back transactions that span several data sources. Even if the data
isn’t hosted on the same server or on the same vendor platform, the Distributed Transaction
Coordinator will automatically manage and then commit or roll back work that spans differ-
ent data stores.Since it’s a web-based application, it’s possible to deploy all of the logical tiers of this
system to a single physical tier. Here’s a physical view of the deployment of this system into
production (see Figure 1-4).
Deployment to a single physical tier means that all layers of the application execute in-
process with one another. This is a great boon to performance. An extra hop across a process
boundary, or especially a hop across machine boundaries, can make an application perform
many times slower than when all components are created in-process.
The other thing to notice about this application is that sticky sessions are in use at the
load balancer layer in order to support the use of in-process sessions. The session data is left
in-process for the performance benefit gained by avoiding the extra network hop to retrieve
and retain the state information.
Running Codes
One of the trade-offs of this approach is the decreased efficiency of the load balancing
algorithm. However, the load of this site is easily handled by the two web servers, and there
could be a third in the mix, for failover support, should one of the servers crash. So under
normal operations, with three servers handling the traffic, they don’t even break a sweat. The
loss in efficiency of the load balancing algorithm doesn’t sacrifice acceptable application
performance.












0 comments:
Post a Comment