1 / 45

COM+ 1.x Overview Frank E. Redmond III Program Manager COM+ Microsoft Corporation 1-301

COM+ 1.x Overview Frank E. Redmond III Program Manager COM+ Microsoft Corporation 1-301. COM+ 1.x Goal. Provide services that will increase the overall scalability, availability, and manageability of COM+ 1.0 applications. Agenda. Scalability Enhancements Availability Enhancements

kera
Download Presentation

COM+ 1.x Overview Frank E. Redmond III Program Manager COM+ Microsoft Corporation 1-301

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COM+ 1.x Overview Frank E. Redmond IIIProgram ManagerCOM+Microsoft Corporation 1-301

  2. COM+ 1.x Goal Provide services that will increase the overall scalability, availability, and manageability of COM+ 1.0 applications

  3. Agenda • Scalability Enhancements • Availability Enhancements • Manageability Enhancements

  4. Scalability Enhancements • Process Recycling • Configurable Isolation Level

  5. Process Recycling • Problem: The performance of most applications degrades over time • Reliance on third-party code of uncertain quality • Memory leaks • Non-scalable resource usage • Solution: Shut down and restart the application’s process • Developer Benefit: A quick fix for known problems and a guard against unexpected ones

  6. Process Recycling • Configured using COM+ Admin SDK • Application.RecycleLifetimeLimit • Elapsed time • Application.RecycleCallLimit • # of calls • Application.RecycleActivationLimit • # of activations • Application.RecycleMemoryLimit • Amount of memory used • Application.RecycleExpirationTimeout • Delay before recycled process is terminated

  7. Process Recycling • Retrieve the InstanceID for the application • ICOMAdminCatalog2::GetInstanceIDFromAppID • Recycle the process! • ICOMAdminCatalog2::RecycleProcess • Specify reason for recycling • CRR_LIFETIME_LIMIT • CRR_ACTIVATION_LIMIT • CRR_CALL_LIMIT • CRR_MEMORY_LIMIT • CRR_RECYCLED_FROM_UI • CRR_NO_REASON_SUPPLIED

  8. Process Recycling • Interested parties notified via COM+ Events • ICOMProcessRecycle::ProcessRecycled( [in] BSTR bstrAppID, [in] BSTR bstrInstanceID, [in] DWORD dRecycleReason)

  9. ICOMAdminCatalog2::RecycleProcess(…) COM+ System App If IsCallerInRole(“Administrator”){ CoRecycleThisDllHost(…) StartTimer(…) } OLE32 CoRecycleThisDllHost(…) { … FireProcessRecycledEvent(…) } DllHost.exe

  10. Configurable Isolation Level • Isolation level = The extent to which changes made outside a transaction are ‘visible’ to that transaction • ‘Visibility’ of external changes (isolation level) controlled using locks

  11. Configurable Isolation Level • Locks used to control… • Whether current TX can ‘see’ uncommitted data - Dirty Reads • Whether other TX’s can modify existing data before the current TX ends - Unrepeatable Reads • Whether other TX’s can add new data before the current TX ends - Phantom Reads

  12. Configurable Isolation Level Isolation Level Dirty Reads Unrepeatable Reads Phantom Reads • Lower Isolation level = Less locking, more concurrency, higher potential for incorrect data • Higher Isolation level = More locking, less concurrency, lower potential for incorrect data Read Uncommitted Yes Yes Yes Read Committed No Yes Yes Repeatable Read No No Yes Serializable No No No

  13. Configurable Isolation Level • Problem: COM+ 1.0 uses highest possible isolation level (SERIALIZABLE) to guaranteecorrect data • Overkill for some applications • Better to be safe the sorry  • Solution: Allow developers to choose the desired isolation level • Developer Benefit: Potential for increased concurrency, performance, and scalability

  14. Configurable Isolation Level • Root component determines the isolation level for the entire TX • CCI downstream component w/ isolation level higher than root = E_ISOLEVELMISMATCH • Component isolation level = ‘None’ means any isolation level ok • Isolation Level = ‘None’ on root component defaults to SERIALIZABLE • Better to be safe than sorry 

  15. Configurable Isolation Level • Configured using the COM+ Admin SDK • Component.IsolationLevel

  16. Agenda • Scalability Enhancements • Availability Enhancements • Manageability Enhancements

  17. Availability Enhancements • Applications as NT Services • Memory Gates

  18. Applications as NT Services • Problem: COM+ 1.0 Applications cannot run as NT services • Solution: Allow COM+ 1.x applications to run as NT services • Developer Benefit: • COM+ applications can be started at system boot or in order • COM+ applications can be run as LocalSystem • COM+ applications can be easily made Cluster-aware

  19. Applications as NT Services • Configured using the COM+ Admin SDK • Application.RunAsService

  20. Memory Gates • Problem: Creating components in low- memory situations • Enough memory to create component but not enough to actually use it • Low-memory error-handling code typically not well debugged • Solution: Don’t allow servers to be loaded or components to be created in low-memory situations • Developer Benefit: Increased reliability by avoiding not-so-well-debugged low- memory error-handling code

  21. Memory Gates • Process creation memory gate • E_OUTOFMEMORY if > 90% of virtual memory being used • Object creation memory gate • E_OUTOFMEMORY if > 95% of virtual memory being used • Both gates checked in Service Control Manager (SCM)

  22. Agenda • Scalability Enhancements • Availability Enhancements • Manageability Enhancements

  23. Manageability Enhancements • Pause/Disable Applications • Process Dump • Alias Components • Public/Private Components • Application Partitions

  24. Pause/Disable Applications • Problem: No way to control component activations • Solution: Allow administrative/programmatic control of component activation • Developer Benefit: COM+ applications more manageable

  25. Pause/Disable Applications • Pause – Prevents future activations • Existing component instances/references unaffected • CoCreateInstance & CoGetClassObject return E_APP_PAUSED for paused apps • Only works for COM+ Server applications • Does not work for COM+ library applications • Does not work for ‘classic’ COM components • ICOMAdminCatalog::PauseApplication • Resume – Allows future activations • ICOMAdminCatalog::ResumeApplication

  26. Pause/Disable Applications • Disable – Prevents future activations • Existing component instances/references unaffected • CoCreateInstance & CoGetClassObject return E_APP_DISABLED for disabled apps • Works for COM+ applications (server and library) and individual COM+ components • Does not work for ‘classic’ COM components • Enable – Allows future activations • Application::Enabled/Component::Enabled attribute in COM+ Catalog • Enabled status maintained between reboots

  27. Process Dump • Problem: Difficult to troubleshoot COM+ applications in production environment • Solution: Allow administrator to dump the entire state of a process without terminating it • Developer Benefit: COM+ applications much easier to troubleshoot

  28. Process Dump • Process dump generated using userdump.exe • User-mode process dump tool takes snapshots of running processes • Leaves target process virtually unscathed • Does not “invade” target process • Target process can continue to run after snapshot is taken • COM+ gives userdump.exe full pathname of dump file

  29. Process Dump • Dump file configured per COM+ application using the COM+ Admin SDK • Application.DumpFilePath • Path only (no filename) COM+ generates filename based on application name • MyApp001, MyApp002, etc. • Application.MaxDumpFiles • Avoids overwriting existing dump files • COM+ does NOT: • Install userdump.exe • Do dump file management (Deleting, archiving, etc.)

  30. Alias Components • CLSID = Implementation (code) + Configuration Requirements • Problem: Implementation sharing done at source code level • Solution: Allow implementation sharing to be done at binary COMponent level • Developer Benefits: • Less code to write, debug, maintain! • Lower development cost! • Faster time to market!

  31. CLSID1 CLSID4 CLSID3 CLSID2 CLSID1 Alias Components • Many CLSIDs sharing a single binary (DLL) implementation • Configurations may be different!

  32. Public/Private Components • Problem: All COM+ components are public • Solution: Allow both public and private components • Similar concept as public/private methods of VB or C++ • Public components can be activated from other applications • Private components can only be seen and activated from other components within the same application • Developer Benefit: More control of functionality exposure • Component-based application development is even easier

  33. Application Partitions • Problem: Only a single application/component configuration is allowed on a single machine • Solution: Allow multiple configurations of a single application/component on a single machine • Developer Benefit: Easier to manage a few large servers vs. many small servers

  34. Application Partitions • Partitions represent logical machine boundaries within a single physical machine • E.g. Test Partition, Production Partition, etc… • ‘Base Partition’ represents the actual physical machine • COM+ applications are installed into one or more partitions • Allows multiple COM+ application installations/configurations on a single machine!

  35. Application Partitions • Partitions are grouped into partition sets • Partition set represents a group of logical machines • One partition in the set is always marked as the ‘Default’ partition • Users/OUs are assigned to a single partition set • Users can only access components from partitions in their partition set • Everyone can access the base partition

  36. Active Directory Partition Set Org Unit Machine Partition User Application Application Partitions • Users/OUs bound to a partition set • Partition set composed of partitions

  37. Application Partitions • CCI behavior varies based on caller’s ‘partition context’ • If ‘partition context’ exists, CCI searches for: • Private component • Public component in ‘current’ partition • Public component in base partition • If ‘partition context’ does not exist… • CCI establishes it based on caller identity, then searches for: • Public component in ‘current’ partition • Public component in base partition

  38. App 3 App 2 App 1 App 1 CLSID5 CLSID2 CLSID3 CLSID1 CLSID5 CLSID4 CLSID1 CLSID1 Lib 1 Application Partitions COM+ Partition 1 Partition 2 Base Partition

  39. Demo Time!!!!!

  40. Summary • Build component-based applications using COM+ 1.0 today! • Microsoft will continue to provide new and innovate component services tomorrow and into the future! • Benefit: Cheaper/Easier to build scalable, reliable, manageable component-based applications!

  41. Additional COM+ Sessions • Monday • 1- 301COM+ 1.x Overview • 1- 404 Understanding COM+ Security Pt.1 • 1- 405 Understanding COM+ Security Pt.2 • Tuesday • 1- 306 Intro to COM+ Partitions • 1- 309 Using COM+ Queued Components • 1- 308 Using COM+ Events

  42. Additional COM+ Sessions • Wednesday • 1- 305 Increasing Your Windows DNA Application Scalability w/ Load Balancing • 1- 402 COM+ Internals • 1- 403 Maximizing COM+ Application Throughput • Thursday • 1- 401 COM+ Base Services • 1- 307 Measuring Windows DNA Application Performance • 1- 201 Understanding SOAP

  43. Additional Resources • Microsoft COM Website • http://www.microsoft.com/com • MSDN Website • http://msdn.microsoft.com • Microsoft Platform SDK • http://msdn.microsoft.com/developer/sdk/platform.asp • Platt, Understanding COM+. Microsoft Press, 1999. • DCOM mailing list • http://msdn.microsoft.com/workshop/essentials/mail.asp

More Related