Transactional Programming In A Windows World ARC303 Transactional Programming In A Windows World James Johnson and Don Box Architects, Indigo Microsoft Corporation {jimjohn,dbox}@microsoft.com © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
7/22/2018 9:18 AM Tools Client Application Model Web & Service Application Model Data Systems Application Model Mobile PC & Devices Application Model Command Line Compact Framework Avalon Windows Forms ASP.NET / Indigo Win FS Yukon System.Console Mobile PC Optimized System.Web System.Storage System.Data.SqlServer System.Windows.Forms System.Windows NT Service System.Windows System.Windows.Forms System.ServiceProcess Presentation Data Communication System.Windows System.Search System.Data System.Messaging System. Discovery System.Collaboration UI Element Explorer Media Annotations SqlClient DataSet System.DirectoryServices RealTimeEndpoint Documents Controls Animation SqlTypes Mapping Active Directory TransientDataSession Monitoring System.Remoting Text Element Dialogs Controls SqlXML ObjectSpaces SignalingSession Logging System.Runtime.Remoting Uddi Shapes SideBar Control OdbcClient ObjectSpace Media Shape Notification Panel Relevance OleDbClient Query Activities Ink Navigation Design OracleClient Schema System.Web.Services System.MessageBus Transport Queue System.Storage Web.Service System.Windows.Forms System.Web.UI Item Core Description Port PubSub Forms Page WebControls Relationship Contact Discovery Channel Router Control Control Adaptors Service Policy Media Location Protocols Print Dialog HtmlControls Design Peer Group Audio Message Design MobileControls Video Document System.Net Images Event System.Web System.Help System.Speech HttpWebRequest NetworkInformation System.Xml Personalization FtpWebListener Sockets System.Drawing Recognition Synthesis Caching Schema Xpath SslClientStream Cache System.NaturalLanguageServices Serialization Query SessionState WebClient Fundamentals Base & Application Services Security Configuration Deployment/Management System.Timers System.Text System.Collections System.Windows. TrustManagement System.Web.Configuration System.Web System.Globalization System.Design System.Security Generic System.MessageBus.Configuration Administration System.Serialization System.IO System.Web. Security Authorization Permissions System.ComponentModel System.Configuration Management System.Threading Ports AccessControl Policy System.CodeDom System.Resources System.Message Bus.Security Credentials Principal System.Management System.Runtime System.Reflection Cryptography Token System.Deployment Serialization InteropServices System.EnterpriseServices System.Diagnostics CompilerServices System.Transactions System.Transactions © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Why Transactions? Order vs. Chaos 7/22/2018 9:18 AM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Why Not Transactions? Excuses and Issues 7/22/2018 9:18 AM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transactions And Windows 7/22/2018 9:18 AM Transactions And Windows Productivity, Scalability, Ubiquity © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transactions And Windows 7/22/2018 9:18 AM Transactions And Windows System.Transactions Declarative Transactions ([Transaction]) Implicit Transactions (Tx.Current, TxScope) Lightweight Transaction Manager (LTM) System.Transaction.Log System.Tx.Isolation Manual Transactions (ITransaction) Distributed Transaction Coordinator WS-Atomic Transaction OLE Transaction XA LU6.2 Windows Kernel Kernel Transaction Manager (KTM) Windows Logging System (WinLS) Transactional NTFS Transactional Registry © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transactions come to the CLR 7/22/2018 9:18 AM System.Transactions Transactions come to the CLR © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
System.Transactions System.Transactions Declarative Transactions 7/22/2018 9:18 AM System.Transactions System.Transactions Declarative Transactions ([Transaction]) Implicit Transactions (Tx.Current, TxScope) Lightweight Transaction Manager (LTM) System.Transaction.Log System.Tx.Isolation Manual Transactions (ITransaction) Distributed Transaction Coordinator WS-Atomic Transaction OLE Transaction XA LU6.2 Windows Kernel Kernel Transaction Manager (KTM) Windows Logging System (WinLS) Transactional NTFS Transactional Registry © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
System.Transactions Explicit/Manual Model 7/22/2018 9:18 AM System.Transactions Explicit/Manual Model © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
System.Transactions Kicking the tires… 7/22/2018 9:18 AM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
System.Transactions Implicit Model 7/22/2018 9:18 AM System.Transactions Implicit Model public class TransactionScope : IDisposable { public TransactionScope(TransactionScopeOptions opts); public TransactionScope(ITransaction tx); public bool Consistent { get; set; } public ITransaction Detach(); } [Flags] public enum TransactionScopeOptions { TransactionNeeded = 0, NoTransactionNeeded = 1, TransactionOptional = 2, ImportOptional = 0, ImportIgnored = 16, NotSupported = ImportIgnored | NoTransactionNeeded, Supported = ImportOptional | TransactionOptional, Required = ImportOptional | TransactionNeeded, RequiresNew = ImportIgnored | TransactionNeeded } © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
System.Transactions Declarative Model 7/22/2018 9:18 AM System.Transactions Declarative Model public class TransactionScopeAttribute : Attribute { public UsageMode Usage { get; set; } } public class ContextPropagationAttribute : Attribute { public UsageMode Inbound { get; set; } public UsageMode Outbound { get; set; } public Type ContextType { get; set; } } © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Implicit scopes in Whidbey 7/22/2018 9:18 AM System.Transactions Implicit scopes in Whidbey © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
The Three Amigos of Transaction Management LTM, KTM And DTC The Three Amigos of Transaction Management © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
LTM,KTM,DTC System.Transactions Declarative Transactions 7/22/2018 9:18 AM LTM,KTM,DTC System.Transactions Declarative Transactions ([Transaction]) Implicit Transactions (Tx.Current, TxScope) Lightweight Transaction Manager (LTM) System.Transaction.Log System.Tx.Isolation Manual Transactions (ITransaction) Distributed Transaction Coordinator WS-Atomic Transaction OLE Transaction XA LU6.2 Windows Kernel Kernel Transaction Manager (KTM) Windows Logging System (WinLS) Transactional NTFS Transactional Registry © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transaction Agility App Tx.Create LTM Single Phase Delegation VEnlist 7/22/2018 9:18 AM Transaction Agility App Tx.Create LTM Single Phase Delegation VEnlist LTM Conn.Enlist ADO.NET SQL Server Tx.Marshal LTM DTC Transaction Promotion © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Stupid transaction tricks… 7/22/2018 9:18 AM Agile Transactions Stupid transaction tricks… © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transactional Resources 7/22/2018 9:18 AM Transactional Resources Beyond the DBMS © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transactional Resources 7/22/2018 9:18 AM Transactional Resources System.Transactions Declarative Transactions ([Transaction]) Implicit Transactions (Tx.Current, TxScope) Lightweight Transaction Manager (LTM) System.Transaction.Log System.Tx.Isolation Manual Transactions (ITransaction) Distributed Transaction Coordinator WS-Atomic Transaction OLE Transaction XA LU6.2 Windows Kernel Kernel Transaction Manager (KTM) Windows Logging System (WinLS) Transactional NTFS Transactional Registry © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
System.Transaction And Enlistment 7/22/2018 9:18 AM System.Transaction And Enlistment © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Volatile Enlistment Suffrage for VB… 7/22/2018 9:18 AM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transactions And Durability 7/22/2018 9:18 AM Transactions And Durability Durable resources typically rely on a log System.Transactions.Log provides a unified transaction-aware log Uses Windows Logging System (WinLS) Implements ARIES protocol for undo/compensate Savepoints allow checkpointing work Common log reduces I/O costs for all participants © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
Transactions And Isolation 7/22/2018 9:18 AM Transactions And Isolation Transaction resources typically use locks to enforce isolation System.Transaction.Isolation provides an app-level lock for internal use by RM Implements read/update/write semantics Implements two-phase locking protocol Allows arbitrary correlation for reentrancy © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
7/22/2018 9:18 AM Where Are We? System.Transactions makes transactions broadly accessible in Whidbey The LTM and KTM improve transaction scalability based on the needs of the application, not the infrastructure We’re making it much easier to build transactional resources © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
For More Information Come see us 7/22/2018 9:18 AM For More Information Come see us Immediately after this session Web/Services Lounge: 309 Foyer MSDN “Longhorn” DevCenter http://msdn.microsoft.com/longhorn Newsgroup microsoft.public.windows.developer.winfx.fundamentals At PDC Hands on labs: On-site or download from CommNet Ask The Experts: Tuesday 7 PM – 9 PM Hall G, H PDC Weblogs: http://pdcbloggers.net © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
© 2003-2004 Microsoft Corporation. All rights reserved. 7/22/2018 9:18 AM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
7/22/2018 9:18 AM © 2003-2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.