Tuesday, July 19, 2005

Transaction Promotion and Delegation coming soon to ES Transaction in Whidbey

Many thanks to Mike Clake (a Lead SDE on the Indigo team), for following up in the comments, over on this entry.

In the comments, Mike mentions how there will be a QFE for Windows coming very soon that will enable Transaction delegation and promotion for Enterprise Services Transactions that involve SQL Server 2005. Very nice stuff indeed.

This is the same concepts as that provided by System.Transactions (i.e. the new assembly that is part of .NET v2.0) and is again a real good example of the great work in intergrating these 2 technologies together and making there use quite intuitive, seemless and powerful. Obviously kudos to the ADO.NET team as well.

In case you are not aware of what are the concepts of Transaction delegation and promotion, in relation to System.Transactions and obviously now Enterprise Services, the basic skinny is the following.

Within the Whidbey wave of technologies (specifically .NET 2.0 and SQL Server 2005), there is a new feature/concept of PSPE (Promotable Single Phase Enlistment). This occurs when the first enlistment of a durable resource manager takes place within the scope of a transaction and if the durable resource manager (SQL Server 2005 in this case) supports PSPE, the management of the Transaction will be delegated to the RM (which is SQL Server 2005 in this case). When this occurs, Microsoft’s DTC is not involved as the Transaction manager for the Transaction and hence maximimzing performance.

In the case that a second connection to a durable resource manager is created within the same scope/boundary for the Transaction, the Transaction will be promoted and its management will fallback to the fully featured distributed Transaction manager on the MS platform, which is the DTC. All of this occurs seemlessly and give you a “pay as you go performance” to the levels of Transaction management capabilities required to maintain the ACID properties of a Transaction.

While this is a quick intro./overview  to how Transaction promotion and delegation occurs, I better mention a few things. Firstly, PSPE is currently only support by SQL Server 2005.

Also, Transactions will be managed by the MSDTC in the following scenarios,
– The first durable resource manager enlisting in the Transaction does not support PSPE
– In the case where PSPE has taken place, but the Transaction is still active, Transaction promotion will occur when:
      – a second connection is made to a durable resource manager
      – When the Transaction is remoted into a different AppDomain. So this also obviously can mean across machines, which is quite an interesting scenario, in my opinion, but I still feel that ES/COM+ is a better option in the vast majority of scenarios.

Overall Transaction promotion and delegation coming to ES is a great addition to the stack in my opinion. I think it will ease some questions that folks have had about using ES, especially in the case of when you are using ES with only one durable store.

– Paul


 |  |  | 
Tuesday, July 19, 2005 7:35:16 PM UTC | # | Disclaimer | Comments [0] | Tracked by:
"Enterprise Services 2.0 and Transaction Promotion + Delegation" (Commonality) [Trackback]
"Going for a walkabout with - VB6, COM, COM+, Transactions and Indigo (Part 1 of... [Trackback]
"mbti training" (title) [Trackback]
Comments are closed.