COM+ and MSMQ Srinivasan.G
Windows DNAA comprehensive platform scaling from the department to the Internet Legacy Systems External Application s 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 Win32 MSMQ Presentation Business Data
COM+ application SQL Server Win32 Business Object Data Objec t COM+ DCOM ADO Presentation Business Data
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 IUnknow n Context CreateInstance … OK: SetComplete … Err: SetAbort Attrib utes
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

COM+ & MSMQ

  • 1.
    COM+ and MSMQ Srinivasan.G
  • 2.
    Windows DNAA comprehensive platform scaling from the department to the Internet Legacy Systems External Application s Database s Thin Client Rich Client
  • 3.
    Keys to WindowsDNA ●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
  • 4.
    Non-Functional Requirements ●PerformanceRequirements oResponse time oNumber of clients oAvailability ●Deployment Constraints oExisting databases & applications oTopology ●Security Requirements oData protection oUser authorization ●Transaction & Workflow Constraints
  • 5.
    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
  • 6.
    Collaboration via MSMQ Win32 MSMQ Presentation Business Data
  • 7.
    COM+ application SQL Server Win32 Business Object Data Objec t COM+ DCOM ADO Presentation Business Data
  • 8.
    Component Design vsOOA/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
  • 9.
    COM Programming ModelObjects and Interfaces Component Client Class Factory IClassFactory IUnknown Registration Packaging Object IClassFactory
  • 10.
    COM+: Simple, Powerful Architecture IUnknow n Context CreateInstance … OK: SetComplete … Err: SetAbort Attrib utes
  • 11.
    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
  • 12.
    COM+ Model Benefits ●The glue in Windows DNA oComponent Model + Services oLanguage agnostic oOnline & offline oCentralized & distributed oWeb & client-server
  • 13.
    COM+ Features ●Servers ●Transactions ●Security ●Administration ●Load Balancing ●Queued Components ●Events
  • 14.
    Problem: Server Programmingis Difficult ●Difficult to write servers oThreading oConcurrency oProcess Management oN-Tier Complexity oDeployment
  • 15.
    COM+: Servers MadeEasy ●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
  • 16.
    Problem: Security IsComplicated ●Many different users sharing the same components ●Different users require different security solutions ●Distributed applications
  • 17.
    COM+: Role-based Security ●Role-based security ●Method-level security ●Context ‘flows’ the security information ●Abstracts security settings oEasier for the user
  • 18.
    Problem: Management isDifficult ●Managing hundreds or thousands of clients ●Managing tens or hundreds of servers ●Monitoring System Activity ●GUIs are too laborious for large systems
  • 19.
    COM+: Administration ●MMCSnap In - Easy to Use ●Scriptable Interfaces - Full function ●System events are logged for Measuring Monitoring and Metering
  • 20.
    Component Services ●Componentscan be decorated with attributes odeclarative oconfigurable
  • 21.
    Problem: Continue toWork 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
  • 22.
    COM+: Queued Components ●Based on unification of objects, transactions, and messaging oDeferred obj execution oAutomatic transactions ●Unifies connected / disconnected application design ●Increases scalability / availability
  • 23.
    Problem: Customers Wantto 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
  • 24.
    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
  • 25.
    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
  • 26.
    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
  • 27.
    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
  • 28.
    COM+ Event Services ●Publish and subscribe model ●Late bound design ●Notifications sent by COM Publisher Event Database Subscriber Event Service Subscriber Subscriber Administration