200: What is LTM: Lightweight Transaction Manager, and how does that help

Posted by: Sahil Malik [MVP], on 27 May 2005 | View original | Bookmarked: 0 time(s)

(The below is covered in further depth in my upcoming book - Chapter #11)

So in my last blog post, I explained why MSDTC is sucky. If you haven't read that yet, I suggest you read that first. But anyway, so what is LTM

LTM is the Lightweight Transaction Manager. Well in short it is the coolest invention since the wheel. Okay maybe fire was the coolest invention. Anyway, so for transactions that don't need the full hoopla MSDTC provides, it is kinda unfair that those transactions should pay the price of a full fledged transaction. So LTM is the transaction manager that takes care of your transaction - provided your RM meets certain criteria. If in case the RM no longer meets that criteria, the transaction will then automatically be handed over to MSDTC.

The super ultra duper cool thing is, this escalation to MSDTC occurs behind the scenes - when you are using the RM - you are blissfully ignore of what is going on. As a matter of fact, thanks to the fantastic DataWorks team, SqlConnection supports this concept - this concept is called PROMOTABLE ENLISTMENT. (ooh the name sounds heavy duty doesn't it)

So what is the criteria for an RM to work under LTM It is almost easier to say what will get moved from LTM to MSDTC. So the escalation to MSDTC will happen if -

a) A durable RM shows up that doesn't support single phase notifications (another big name - hopefully I'll blog about it one day in the near future).
b) Two durable RMs show up in the same transaction.
c) The transaction spreads over multiple appdomains.

Again, the hella cool thing is - say when you are using SqlConnection, this escalation will happen behind the scenes, and you will remain blissfully ignorant. And say if you were writing an RM where performance was hella important - then you've gotta know how to create a promotable single phase enlistment - otherwise don't worry.

*WHEW*, so tonight, in the last 1/2 hour I quickly wrote up a good introduction to "Distributed Transactions in .NET 2.0". Trust me, there is tonnes more to say, but not blogging about it != don't wanna tell. Whenever I get time in the future, I will vomit more details. But for now, here is a quick TOC -

TOC

100: System.Transactions - and why should you care to know about it.

100: Important Players in Distributed TransactionsRMs and DTCs

100: Two phase commits - and distributed transactions

100: So Sahil, why does MSDTC suck

200: What is LTM: Lightweight Transaction Manager, and how does that help

Poor Sahil tired typing so much .. Until later .. adios folks :-)

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: Performance | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 998 | Hits: 113

Similar Posts

  • SOA patterns - Reservations more
  • Simpler Transactions more
  • Winforms Release History : Q2 2009 SP1 (version 2009.2.9.729) more
  • Streamlining the "ask Joe for help" process. more
  • Setting up Reporting Services on Windows Vista more
  • Stumbling Through: K2 Blackpearl Programmability more
  • The new LINQ to XML Bridge Classes to System.Xml more
  • SQLite, ADO.NET, Prepared Statements, Transactions and Enterprise Manager more
  • WCF Masterclass with Juval Lowy more
  • Write Atomic Transactions in .NET more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD