Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "COM+ 1.x Overview Frank E. Redmond III Program Manager COM+ Microsoft Corporation 1-301."— Presentation transcript:

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

2

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

4 Agenda Scalability Enhancements Scalability Enhancements Availability Enhancements Availability Enhancements Manageability Enhancements Manageability Enhancements

5 Scalability Enhancements Process Recycling Process Recycling Configurable Isolation Level Configurable Isolation Level

6 Process Recycling Problem: The performance of most applications degrades over time 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 Solution: Shut down and restart the application’s process Developer Benefit: A quick fix for known problems and a guard against unexpected ones Developer Benefit: A quick fix for known problems and a guard against unexpected ones

7 Process Recycling Configured using COM+ Admin SDK 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

8 Process Recycling Retrieve the InstanceID for the application Retrieve the InstanceID for the application  ICOMAdminCatalog2::GetInstanceIDFromAppID Recycle the process! 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

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

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

11 Configurable Isolation Level Isolation level = The extent to which changes made outside a transaction are ‘visible’ to that transaction 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 ‘Visibility’ of external changes (isolation level) controlled using locks

12 Configurable Isolation Level Locks used to control… 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

13 Configurable Isolation Level Lower Isolation level = Less locking, more concurrency, higher potential for incorrect data Lower Isolation level = Less locking, more concurrency, higher potential for incorrect data Higher Isolation level = More locking, less concurrency, lower potential for incorrect data Higher Isolation level = More locking, less concurrency, lower potential for incorrect data Isolation LevelDirty ReadsUnrepeatable ReadsPhantom Reads Read Uncommitted Read Committed Repeatable Read Serializable Yes No Yes No Yes No

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

15 Configurable Isolation Level Root component determines the isolation level for the entire TX 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 Component isolation level = ‘None’ means any isolation level ok  Isolation Level = ‘None’ on root component defaults to SERIALIZABLE  Better to be safe than sorry  Better to be safe than sorry

16 Configurable Isolation Level Configured using the COM+ Admin SDK Configured using the COM+ Admin SDK  Component.IsolationLevel

17 Agenda Scalability Enhancements Scalability Enhancements Availability Enhancements Availability Enhancements Manageability Enhancements Manageability Enhancements

18 Availability Enhancements Applications as NT Services Applications as NT Services Memory Gates Memory Gates

19 Applications as NT Services Problem: COM+ 1.0 Applications cannot run as NT services Problem: COM+ 1.0 Applications cannot run as NT services Solution: Allow COM+ 1.x applications to run as NT services Solution: Allow COM+ 1.x applications to run as NT services Developer Benefit: 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

20 Applications as NT Services Configured using the COM+ Admin SDK Configured using the COM+ Admin SDK  Application.RunAsService

21 Memory Gates Problem: Creating components in low- memory situations 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 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 Developer Benefit: Increased reliability by avoiding not-so-well-debugged low- memory error-handling code

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

23 Agenda Scalability Enhancements Scalability Enhancements Availability Enhancements Availability Enhancements Manageability Enhancements Manageability Enhancements

24 Manageability Enhancements Pause/Disable Applications Pause/Disable Applications Process Dump Process Dump Alias Components Alias Components Public/Private Components Public/Private Components Application Partitions Application Partitions

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

26 Pause/Disable Applications Pause – Prevents future activations 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 Resume – Allows future activations  ICOMAdminCatalog::ResumeApplication

27 Pause/Disable Applications Disable – Prevents future activations 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 Enable – Allows future activations Application::Enabled/Component::Enabled attribute in COM+ Catalog Application::Enabled/Component::Enabled attribute in COM+ Catalog  Enabled status maintained between reboots

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

29 Process Dump Process dump generated using userdump.exe Process dump generated using userdump.exe  User-mode process dump tool takes snapshots of running processes Leaves target process virtually unscathed 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 COM+ gives userdump.exe full pathname of dump file

30 Process Dump Dump file configured per COM+ application using the COM+ Admin SDK 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: COM+ does NOT:  Install userdump.exe  Do dump file management (Deleting, archiving, etc.)

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

32 Alias Components Many CLSIDs sharing a single binary (DLL) implementation Many CLSIDs sharing a single binary (DLL) implementation  Configurations may be different! CLSID1CLSID4CLSID3CLSID2 CLSID1

33 Public/Private Components Problem: All COM+ components are public Problem: All COM+ components are public Solution: Allow both public and private components 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 Developer Benefit: More control of functionality exposure  Component-based application development is even easier

34 Application Partitions Problem: Only a single application/component configuration is allowed on a single machine 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 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 Developer Benefit: Easier to manage a few large servers vs. many small servers

35 Application Partitions Partitions represent logical machine boundaries within a single physical machine 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 COM+ applications are installed into one or more partitions  Allows multiple COM+ application installations/configurations on a single machine!

36 Application Partitions Partitions are grouped into partition sets 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/OUs are assigned to a single partition set Users can only access components from partitions in their partition set Users can only access components from partitions in their partition set Everyone can access the base partition Everyone can access the base partition

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

38 Application Partitions CCI behavior varies based on caller’s ‘partition context’ 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

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

40 Demo Time!!!!!

41 Summary Build component-based applications using COM+ 1.0 today! Build component-based applications using COM+ 1.0 today! Microsoft will continue to provide new and innovate component services tomorrow and into the future! 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! Benefit: Cheaper/Easier to build scalable, reliable, manageable component-based applications!

42 Additional COM+ Sessions Monday Monday  COM+ 1.x Overview  Understanding COM+ Security Pt.1  Understanding COM+ Security Pt.2 Tuesday Tuesday  Intro to COM+ Partitions  Using COM+ Queued Components  Using COM+ Events

43 Additional COM+ Sessions Wednesday Wednesday  Increasing Your Windows DNA Application Scalability w/ Load Balancing  COM+ Internals  Maximizing COM+ Application Throughput Thursday Thursday  COM+ Base Services  Measuring Windows DNA Application Performance  Understanding SOAP

44 Additional Resources Microsoft COM Website Microsoft COM Website  MSDN Website MSDN Website  Microsoft Platform SDK Microsoft Platform SDK  Platt, Understanding COM+. Microsoft Press, Platt, Understanding COM+. Microsoft Press, DCOM mailing list DCOM mailing list 

45


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

Similar presentations


Ads by Google