Upload
g-srinivasan
View
115
Download
4
Embed Size (px)
DESCRIPTION
Adding my old slides to slideshare
Citation preview
COM+ and MSMQ
Srinivasan.G
Windows DNAA comprehensive
platform scaling from the department to the
Internet
External
Application
s
Legacy
Systems
Database
s
Thin
Client
Rich
Client
Keys to Windows DNA
●Three-tier Application Architecture
okey for scalable, distributed applications
●Cooperating Components
oreusable, binary, pieces of software that provide
services
okey to incremental, flexible development
●Enablers
oTools
oMiddleware ⇨ Application Services
oInteroperability
Non-Functional Requirements
●Performance Requirements
oResponse time
oNumber of clients
oAvailability
●Deployment Constraints
oExisting databases & applications
oTopology
●Security Requirements
oData protection
oUser authorization
●Transaction & Workflow Constraints
Application Services
●COM+
oRuntime environment for COM components
oDeclarative, rich infrastructure
oDistributed Transaction Coordinator (DTC)
oAdministration tool
●Microsoft Message Queue Server (MSMQ)
oRich messaging programming model
and infrastructure
oFlexible; e.g., exactly once, guaranteed delivery
Collaboration via MSMQ
Presentation Business Data
Win32
MSMQ
COM+ application
Presentation Business Data
SQL
Server
Win32
COM+
DCOM
ADO
Business
Object
Data
Objec
t
Component Design vs OOA/D
●Component design and OOA/D are
different
●OOA/D focuses on modeling ‘things’
●Component design focuses more on
services
●OOA/D/P is often used to implement
components but not sufficient
●Pure object designs aren’t always good
component designs
COM Programming ModelObjects
and Interfaces
Component
Client
Class
Factory
IClassFactory
IUnknown
Registration
Packaging
Object
IClassFactory
COM+: Simple, Powerful
Architecture
Context
CreateInstance
…
OK: SetComplete
…
Err: SetAbort
Attrib
utes
IUnknow
n
COM+ Model Benefits
●Simplification through reduction
oIncrease abstraction
o“Zero plumbing”
●Simple programming model
oClients: Create, use, release
oServers: Do work
●Simple, extensible architecture
oInterceptors
COM+ Model Benefits
●The glue in Windows DNA
oComponent Model + Services
oLanguage agnostic
oOnline & offline
oCentralized & distributed
oWeb & client-server
COM+ Features
●Servers
●Transactions
●Security
●Administration
●Load Balancing
●Queued Components
●Events
Problem: Server Programming is
Difficult●Difficult to write servers
oThreading
oConcurrency
oProcess Management
oN-Tier Complexity
oDeployment
COM+: Servers Made Easy
●Design components as a client application
oSingle user, single thread, no process concern
●Write components in ANY language
oVB, VJ, VC, Cobol, whatever
●Deploy as 1, 2, 3 or N-tier Application
oDrag and drop simplicity
Problem: Security Is Complicated
●Many different users sharing the same
components
●Different users require different security
solutions
●Distributed applications
COM+: Role-based Security
●Role-based security
●Method-level security
●Context ‘flows’ the security information
●Abstracts security settings
oEasier for the user
Problem: Management is Difficult
●Managing hundreds or thousands of
clients
●Managing tens or hundreds of servers
●Monitoring System Activity
●GUIs are too laborious for large systems
COM+: Administration
●MMC Snap In - Easy to Use
●Scriptable Interfaces - Full function
●System events are logged for Measuring
Monitoring and Metering
Component Services
●Components can be decorated with
attributes
odeclarative
oconfigurable
Problem: Continue to Work When Servers are
Unavailable
Problem: Smooth the Demand of Your system
●Different components are needed for
connected and disconnected versions of
the same application
●Deployment of two applications is difficult
●No way to govern system load for
consistent server performance
●Scale limitations
COM+: Queued Components
●Based on unification of objects,
transactions, and messaging
oDeferred obj execution
oAutomatic transactions
●Unifies connected / disconnected
application design
●Increases scalability / availability
Problem: Customers Want to Add
machines to increase Performance
●Small servers are dropping down in prices
●Distribute system load across systems
with no changes to the application (client
OR server)
●Increase availability
COM+: Load Balancing
●Transparent to clients
●Controlled via Admin
oReplicated Automatically
●Simple routing
oDesigned for extensibility
●Single router per application cluster
oRouter can fail over via resource cluster
Dynamic Load Balancing
●In addition to static load balancing or DNS
round-robin, COM+ provides dynamic load
balancing
oUses response time algorithm
oLoad balance on creation only
●Use to improve scalability, availability
●Most COM+ components are load-
balanceable
oBeware of machine affinities
Object Pooling
●COM+ supports pooling
●Lets you build a homogeneous pool of objects
oPer-process
oObjects can not have thread-affinity
oPool can be initialized in the background
oPool sizes set administratively
●Use to govern the maximum number of objects
created
●May be useful if construction costs are high
oTest to see if you get a performance benefit
Problem: Proprietary Event
Services●Enterprise applications need event
services
oNotify other components that something
‘interesting’ has happened
●Customers forced to design and
implement their own solutions
●Integration with other application
events becomes difficult
COM+ Event Services
●Publish and subscribe model
●Late bound design
●Notifications sent by COM
Publisher
Event
Database
Subscriber
Event Service Subscriber
Subscriber
Administration