Presentation is loading. Please wait.

Presentation is loading. Please wait.

Transactional Programming In A Windows World

Similar presentations


Presentation on theme: "Transactional Programming In A Windows World"— Presentation transcript:

1 Transactional Programming In A Windows World
ARC303 Transactional Programming In A Windows World James Johnson and Don Box Architects, Indigo Microsoft Corporation © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

3 Why Transactions? Order vs. Chaos 7/22/2018 9:18 AM
© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

4 Why Not Transactions? Excuses and Issues 7/22/2018 9:18 AM
© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 Transactions And Windows
7/22/2018 9:18 AM Transactions And Windows Productivity, Scalability, Ubiquity © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

7 Transactions come to the CLR
7/22/2018 9:18 AM System.Transactions Transactions come to the CLR © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

8 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 System.Transactions Explicit/Manual Model
7/22/2018 9:18 AM System.Transactions Explicit/Manual Model © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 System.Transactions Kicking the tires… 7/22/2018 9:18 AM
© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

11 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 } © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

12 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; } } © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

13 Implicit scopes in Whidbey
7/22/2018 9:18 AM System.Transactions Implicit scopes in Whidbey © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 The Three Amigos of Transaction Management
LTM, KTM And DTC The Three Amigos of Transaction Management © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

15 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

16 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

17 Stupid transaction tricks…
7/22/2018 9:18 AM Agile Transactions Stupid transaction tricks… © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

18 Transactional Resources
7/22/2018 9:18 AM Transactional Resources Beyond the DBMS © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

19 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

20 System.Transaction And Enlistment
7/22/2018 9:18 AM System.Transaction And Enlistment © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

21 Volatile Enlistment Suffrage for VB… 7/22/2018 9:18 AM
© Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

22 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

23 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

24 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 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

25 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 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: © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

26 © 2003-2004 Microsoft Corporation. All rights reserved.
7/22/2018 9:18 AM © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

27 7/22/2018 9:18 AM © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Transactional Programming In A Windows World"

Similar presentations


Ads by Google