
Transactional COM+
Building Scalable Applications
Tim Ewald(Author)
Addison Wesley (Publisher)
Published on 14. March 2001
Book
Paperback/Softback
464 pages
978-0-201-61594-4 (ISBN)
Description
Building enterprise-scale distributed applications is incredibly difficult. Microsoft built COM+ to help, but most developers don't understand it well enough to achieve their goals. In Transactional COM+, Tim Ewald gives developers the comprehensive foundation they need to build business-critical systems with COM+. Ewald explains exactly what problems COM+ aims to solve -- including why it is so difficult to build scalable systems using traditional object-oriented techniques, and how object-oriented style must change in order to build enterprise-scale distributed systems. Next, Ewald introduces COM+ in detail, explaining why COM+ works the way it does, and what the technology's behavior implies about designing effective systems with COM+. Understand how COM+ exposes runtime services to developers; how to leverage application server technologies in the COM+ environment; and the key up-front design decisions you need to make to achieve maximum performance and scalability. Throughout the book, Ewald presents concrete guidelines and best practices for COM+ development -- and shows exactly what common mistakes to avoid. For enterprise developers working on Windows 2000 platforms, there's never been a more valuable resource. For all enterprise developers and designers who are familiar with COM and are now seeking to build distributed systems with COM+ and Windows 2000.
More details
Language
English
Place of publication
Boston
United States
Publishing group
Pearson Education (US)
Target group
College/higher education
Dimensions
Height: 233 mm
Width: 186 mm
Thickness: 29 mm
Weight
910 gr
ISBN-13
978-0-201-61594-4 (9780201615944)
Schweitzer Classification
Person
Tim Ewald is a Director of Content at DevelopMentor, a premier developer services company. His research and development work focuses on the design and implementation of scalable systems using component technologies such as COM and Java. Tim has authored or co-authored several DevelopMentor courses, including the MTS and COM+ curriculum. He is also a co-author of Effective COM (Addison-Wesley), a former columnist for DOC and Application Strategies, and a frequent conference speaker. Before joining DevelopMentor, Tim worked as an independent consultant specializing in COM and related technologies.
0201615940AB04062001
0201615940AB04062001
Content
1. Scalability.
Scalability Basics.
Identity.
Identity in COM.
Sharing Identities.
Implementing Named Objects.
The Problem with Sharing COM Objects.
Identity Revisited.
Implementing Named Objects with Key-Based Logical Identity.
Implementing Named Objects on Top of a Database.
What Has Been Gained?
The Object-per-Client Model.
Transactions.
Enter Transactions.
Clients and TMs and RMs, Oh My!
Local Transactions and Distributed Transactions.
The Transactions and Scalability Paradox.
Integrating Objects and Transactions.
Using Transactions Explicitly.
Using Transactions Implicitly.
Applying Transactions.
Thinking about Roundtrips.
A Complex Problem.
A Possible Solution.
A Much Better Solution.
Thinking about Roundtrips Again.
Processor Objects.
Summary.
2. Atoms.
The Linker Switch Story.
An Experiment.
The Windows Process Loader.
How COM+ Works.
From Consoles to Contexts.
Cross-Context Calls.
Contexts as Objects.
Object Context Interfaces.
Using Object Context.
Where Do Contexts Come From?
The Catalog.
Applications.
Libraries and Servers.
Why Library Applications?
Configured Classes.
Custom Attributes.
Changing the Contents of the Catalog.
Context Flow.
Causality.
How Causality Works.
Causalities as Objects.
Call Context Interfaces.
Using Call Context.
Summary.
3. Mechanics.
Context Relativity.
The Problem.
Marshaling Interface Pointers.
The Global Interface Table.
Context Relativity in Day-to-Day Life.
The Cost of Contexts.
A Context for Every Object.
The Cost of Contexts in Time.
The Cost of Contexts in Space.
Are Contexts Worth the Price?
Limiting Context.
Nonconfigured Classes.
Raw-Configured Classes.
Context-Aware Code Revisited.
A Different Way of Looking at the World.
Subtle Complexities.
Custom Marshaling.
Some Other Observations.
Summary.
4. Threads.
Apartments.
Apartment Types.
Where Do Apartments Come From?
Threading Models.
Default Contexts.
Remote Object Creation.
Cross-Apartment Calls.
STA Complexities.
Cross-Apartment Call Overhead.
Apartment Guidelines.
Raw-Configured Classes Revisited.
Activities.
Enter Activities.
Where Do Activities Come From?
Detecting the Presence of an Activity.
Allocating STA Objects to Apartments.
Serializing Calls.
Activity Reentrancy.
Activity Deadlock.
Activity Guidelines.
Summary.
5. Objects.
Object Pooling.
Enabling Object Pooling.
Reusing Objects.
Controlling the Size of a Class's Pool.
Implementing Pooled Classes.
Accessing Context.
Managing Resources.
The GIT Trick (and Why It Doesn't Work).
An Exception to the Rules.
Object Pooling Guidelines.
Just-in-Time Activation.
Enabling JITA.
How JITA Works.
Flipping the Done Bit.
The AutoComplete Attribute.
JITA Notifications.
JITA Guidelines.
Lies, Damn Lies, and Statistics.
Summary.
6. Transactions.
Local Transactions.
OLE DB.
Higher Level APIs.
Distributed Transactions.
Enter the Distributed Transaction Coordinator.
Starting a Distributed Transaction.
Enlisting a Connection.
The Two-Phase Commit Protocol.
Distributed Transaction Complexities.
Distributed Transaction Propagation.
Connection Management.
A Race Condition.
Declarative Transactions.
Transactional Objects.
Enter Transaction Streams.
Where Do Transaction Streams Come From?
Detecting the Presence of a Transaction Stream.
Creating and Propagating a Distributed Transaction.
Autoenlisting Connections.
Controlling a Declarative Transaction's Outcome.
Flipping the Happy Bit.
The Four Possible States of a Transactional Object.
Root Objects and HRESULTs.
Transaction Stream Caveats.
Transaction Guidelines.
Summary.
7. Isolation.
Correctness versus Performance.
Five Degrees of Isolation.
Implementing Isolation Using Locks.
Implementing Isolation Using Versions.
Choosing an Isolation Level.
Isolation-Level Guidelines.
Specifying Isolation Levels.
Isolation Levels and OLE DB.
Isolation Levels and the DTC.
Isolation Levels and COM+.
Bring Your Own Transaction.
ISOFLAGs.
Deadlocks.
Avoiding Deadlocks.
Detecting Deadlocks.
Timeouts and the DTC.
Timeouts and COM+.
Timeouts and OLE DB.
Application-Level Isolation.
Optimistic Application-Level Locking.
Pessimistic Application-Level Locking.
Summary.
8. Protocols.
HTTP.
HTTP Messages.
HTTP Connection Management.
Internet Information Server.
Mapping Requests to Files.
Mapping Requests to Processes.
Mapping Requests to Contexts and Apartments.
Processing Requests in Parallel.
Active Server Pages.
Processing ASP Requests.
Transactional Pages.
Transaction Outcome Notifications.
Server.Execute and Server.Transfer.
ASP Pages and Raw-Configured Classes.
ASP Pages and Object Context.
HTTP + XML = RPC.
SOAP Messages.
SOAP and HTTP.
Applying SOAP.
Message Queuing.
Transactional Messaging.
Applying Message Queuing.
Summary.
9. Design.
Machines, Processes, and Protocols.
Machine Architecture.
Process Architecture.
Protocols.
Processors and Helpers.
A Simple Logical Model.
A Simple Physical Model.
Accessing Processors via HTTP.
Transactions and Data Access.
Accessing Data Efficiently.
Middle-Tier State.
Some Final Advice.
Appendix A: Toward .NET.
Appendix B: Building a Better Connection Pool.
An Example.
IObjectConstruct.
IObjectControl.
IConn.
Using a Pooled Connection.
Source Code.
Appendix C: Debugging.
Appendix D: Catalog Attributes and Component Services Explorer Property Pages.
Application Property Pages.
Class Property Pages.
Interface Property Pages.
Method Property Pages.
Rules.
Summary.
Index. 0201615940T04062001
Scalability Basics.
Identity.
Identity in COM.
Sharing Identities.
Implementing Named Objects.
The Problem with Sharing COM Objects.
Identity Revisited.
Implementing Named Objects with Key-Based Logical Identity.
Implementing Named Objects on Top of a Database.
What Has Been Gained?
The Object-per-Client Model.
Transactions.
Enter Transactions.
Clients and TMs and RMs, Oh My!
Local Transactions and Distributed Transactions.
The Transactions and Scalability Paradox.
Integrating Objects and Transactions.
Using Transactions Explicitly.
Using Transactions Implicitly.
Applying Transactions.
Thinking about Roundtrips.
A Complex Problem.
A Possible Solution.
A Much Better Solution.
Thinking about Roundtrips Again.
Processor Objects.
Summary.
2. Atoms.
The Linker Switch Story.
An Experiment.
The Windows Process Loader.
How COM+ Works.
From Consoles to Contexts.
Cross-Context Calls.
Contexts as Objects.
Object Context Interfaces.
Using Object Context.
Where Do Contexts Come From?
The Catalog.
Applications.
Libraries and Servers.
Why Library Applications?
Configured Classes.
Custom Attributes.
Changing the Contents of the Catalog.
Context Flow.
Causality.
How Causality Works.
Causalities as Objects.
Call Context Interfaces.
Using Call Context.
Summary.
3. Mechanics.
Context Relativity.
The Problem.
Marshaling Interface Pointers.
The Global Interface Table.
Context Relativity in Day-to-Day Life.
The Cost of Contexts.
A Context for Every Object.
The Cost of Contexts in Time.
The Cost of Contexts in Space.
Are Contexts Worth the Price?
Limiting Context.
Nonconfigured Classes.
Raw-Configured Classes.
Context-Aware Code Revisited.
A Different Way of Looking at the World.
Subtle Complexities.
Custom Marshaling.
Some Other Observations.
Summary.
4. Threads.
Apartments.
Apartment Types.
Where Do Apartments Come From?
Threading Models.
Default Contexts.
Remote Object Creation.
Cross-Apartment Calls.
STA Complexities.
Cross-Apartment Call Overhead.
Apartment Guidelines.
Raw-Configured Classes Revisited.
Activities.
Enter Activities.
Where Do Activities Come From?
Detecting the Presence of an Activity.
Allocating STA Objects to Apartments.
Serializing Calls.
Activity Reentrancy.
Activity Deadlock.
Activity Guidelines.
Summary.
5. Objects.
Object Pooling.
Enabling Object Pooling.
Reusing Objects.
Controlling the Size of a Class's Pool.
Implementing Pooled Classes.
Accessing Context.
Managing Resources.
The GIT Trick (and Why It Doesn't Work).
An Exception to the Rules.
Object Pooling Guidelines.
Just-in-Time Activation.
Enabling JITA.
How JITA Works.
Flipping the Done Bit.
The AutoComplete Attribute.
JITA Notifications.
JITA Guidelines.
Lies, Damn Lies, and Statistics.
Summary.
6. Transactions.
Local Transactions.
OLE DB.
Higher Level APIs.
Distributed Transactions.
Enter the Distributed Transaction Coordinator.
Starting a Distributed Transaction.
Enlisting a Connection.
The Two-Phase Commit Protocol.
Distributed Transaction Complexities.
Distributed Transaction Propagation.
Connection Management.
A Race Condition.
Declarative Transactions.
Transactional Objects.
Enter Transaction Streams.
Where Do Transaction Streams Come From?
Detecting the Presence of a Transaction Stream.
Creating and Propagating a Distributed Transaction.
Autoenlisting Connections.
Controlling a Declarative Transaction's Outcome.
Flipping the Happy Bit.
The Four Possible States of a Transactional Object.
Root Objects and HRESULTs.
Transaction Stream Caveats.
Transaction Guidelines.
Summary.
7. Isolation.
Correctness versus Performance.
Five Degrees of Isolation.
Implementing Isolation Using Locks.
Implementing Isolation Using Versions.
Choosing an Isolation Level.
Isolation-Level Guidelines.
Specifying Isolation Levels.
Isolation Levels and OLE DB.
Isolation Levels and the DTC.
Isolation Levels and COM+.
Bring Your Own Transaction.
ISOFLAGs.
Deadlocks.
Avoiding Deadlocks.
Detecting Deadlocks.
Timeouts and the DTC.
Timeouts and COM+.
Timeouts and OLE DB.
Application-Level Isolation.
Optimistic Application-Level Locking.
Pessimistic Application-Level Locking.
Summary.
8. Protocols.
HTTP.
HTTP Messages.
HTTP Connection Management.
Internet Information Server.
Mapping Requests to Files.
Mapping Requests to Processes.
Mapping Requests to Contexts and Apartments.
Processing Requests in Parallel.
Active Server Pages.
Processing ASP Requests.
Transactional Pages.
Transaction Outcome Notifications.
Server.Execute and Server.Transfer.
ASP Pages and Raw-Configured Classes.
ASP Pages and Object Context.
HTTP + XML = RPC.
SOAP Messages.
SOAP and HTTP.
Applying SOAP.
Message Queuing.
Transactional Messaging.
Applying Message Queuing.
Summary.
9. Design.
Machines, Processes, and Protocols.
Machine Architecture.
Process Architecture.
Protocols.
Processors and Helpers.
A Simple Logical Model.
A Simple Physical Model.
Accessing Processors via HTTP.
Transactions and Data Access.
Accessing Data Efficiently.
Middle-Tier State.
Some Final Advice.
Appendix A: Toward .NET.
Appendix B: Building a Better Connection Pool.
An Example.
IObjectConstruct.
IObjectControl.
IConn.
Using a Pooled Connection.
Source Code.
Appendix C: Debugging.
Appendix D: Catalog Attributes and Component Services Explorer Property Pages.
Application Property Pages.
Class Property Pages.
Interface Property Pages.
Method Property Pages.
Rules.
Summary.
Index. 0201615940T04062001