SlideShare a Scribd company logo
Research .NET Transaction
Freddy Munandar
on Aug 2014
Background
• Transaction is the most crucial feature for data
integrity
• Control the application flow when transaction
is throw an exception (i.e. Showing friendly
message)
Objective
• As decision support to choose the right
technology or right concept for handle
transaction process in .NET stack based on our
environment
.NET Transaction Architecture
Based on my environment i’m just do
an atomic transaction which is there
are no multiple open connection or
connect into third party database
(i.e.Java-Tomcat) in single transaction.
The red boundary mean focus on
atomic transaction
Technology Options
• TransactionScope
– Not part of ADO.NET
– Developed by the Enterprise Service team at
Microsoft
– Available in System.Transactions
– Called Ambient Transaction is not tied just to a
database, any transaction aware provider can be used
• SqlTransaction
– Part of ADO.NET
– Called Connection Transaction because is tied directly
with a database connection
Matrix Comparison
Concern TransactionScope SqlTransaction
Performance Good (local transaction) Good
Flexibility Good, cover Automatic
Distribution Transaction Handling
Ordinary
Maintainability More simple, when dealing
with multi database
Simple
Ease of use Simple Simple
Hint Loose-coupling
Its like a Jacket or Cloak
support any RDBMS and
non-database process like
rollback creational of
directory inside the
transaction (Ambient
Transaction)
Tighly-coupling with the
specific RDBMS
Transaction Behaviors
Concern TransactionScope SqlTransaction
Rollback inserted data.
Is the auto increment id
can be reused?
NO NO
Rollback updated data.
Is the auto increment id
can be reused?
YES YES
Rollback deleted data.
Is the auto increment id
can be reused?
YES YES
Common behavior:
1. Row Locking will be used for operation UPDATE and DELETE but SQL
may decide to escalate it if it runs low on resources, can be
depending on the indexes and load on the server it may end up
escalating to a Page Lock or Table Locking
2. Table Locking will used for operation INSERT
Suggestion
• Use the TransactionScope is better than the
SqlTransaction in term of Flexibility
• Flexibility is good investment, it’s like the
system can be more adaptive for changes
• The flexibility, will make it easier in the future
to include things other than ADO.NET calls
into a transaction.
What we choose?
• To Team leader
– you can decide by your own
– or you can discuss with the team member and do
a vote for choose the options
• To deep dive understanding about Transaction
beside the architecture, we must know about
the SQL Server 2008 R2 transaction behaviors
References
• Pluralsight – Understanding .NET and WCF Transaction
• Pluralsight – ADO.NET Fundamentals
• http://www.codeproject.com/Articles/522039/A-Beginners-
Tutorial-for-Understanding-Transaction
• http://www.codeproject.com/Articles/690136/All-About-
TransactionScope
• http://stackoverflow.com/questions/3114826/is-it-possible-to-
force-row-level-locking-in-sql-server
• http://stackoverflow.com/questions/21386765/locking-single-row-
row-level-when-inserting-data-via-transactionscope-entity
• http://stackoverflow.com/questions/11292763/why-is-system-
transactions-transactionscope-default-isolationlevel-serializable
• Google Search

More Related Content

Similar to Research .NET Transaction

Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
VMware Tanzu
 
Training - What is Performance ?
Training  - What is Performance ?Training  - What is Performance ?
Training - What is Performance ?
Betclic Everest Group Tech Team
 
Megastore by Google
Megastore by GoogleMegastore by Google
Megastore by Google
Ankita Kapratwar
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”EPAM Systems
 
Enabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data VirtualizationEnabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data Virtualization
Denodo
 
Simplifying Cloud Architectures with Data Virtualization
Simplifying Cloud Architectures with Data VirtualizationSimplifying Cloud Architectures with Data Virtualization
Simplifying Cloud Architectures with Data Virtualization
Denodo
 
EOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - PaperEOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - PaperDavid Walker
 
Key factors for successful NAS data migration!.ppt
Key factors for successful NAS data migration!.pptKey factors for successful NAS data migration!.ppt
Key factors for successful NAS data migration!.ppt
Reciprocal Group
 
I pushed in production :). Have a nice weekend
I pushed in production :). Have a nice weekendI pushed in production :). Have a nice weekend
I pushed in production :). Have a nice weekend
Nicolas Carlier
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
Chinh Ngo Nguyen
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Srinivasan Nanduri
 
A Successful Journey to the Cloud with Data Virtualization
A Successful Journey to the Cloud with Data VirtualizationA Successful Journey to the Cloud with Data Virtualization
A Successful Journey to the Cloud with Data Virtualization
Denodo
 
Software Defined Networking (SDN)
Software Defined Networking (SDN)Software Defined Networking (SDN)
Software Defined Networking (SDN)
Aalok Shah
 
SDN Control Plane scalability research proposal
SDN Control Plane scalability research proposalSDN Control Plane scalability research proposal
SDN Control Plane scalability research proposalYatindra shashi
 
Telco Cloud 03 - Introduction to SDN
Telco Cloud 03 - Introduction to SDNTelco Cloud 03 - Introduction to SDN
Telco Cloud 03 - Introduction to SDN
Vikas Shokeen
 
Mso noc presentation
Mso noc presentationMso noc presentation
Mso noc presentationGraeme Spice
 
Design and Deploy Secure Clouds for Financial Services Use Cases
Design and Deploy Secure Clouds for Financial Services Use CasesDesign and Deploy Secure Clouds for Financial Services Use Cases
Design and Deploy Secure Clouds for Financial Services Use Cases
PLUMgrid
 
Network Analysis & Design
Network Analysis & DesignNetwork Analysis & Design
Network Analysis & Design
ErmanHamid3
 
Spring Transaction Management
Spring Transaction ManagementSpring Transaction Management
Spring Transaction Management
Ye Win
 
Transaction conccurency
Transaction conccurencyTransaction conccurency
Transaction conccurency
Esraa Farrag
 

Similar to Research .NET Transaction (20)

Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Training - What is Performance ?
Training  - What is Performance ?Training  - What is Performance ?
Training - What is Performance ?
 
Megastore by Google
Megastore by GoogleMegastore by Google
Megastore by Google
 
Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”Чурюканов Вячеслав, “Code simple, but not simpler”
Чурюканов Вячеслав, “Code simple, but not simpler”
 
Enabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data VirtualizationEnabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data Virtualization
 
Simplifying Cloud Architectures with Data Virtualization
Simplifying Cloud Architectures with Data VirtualizationSimplifying Cloud Architectures with Data Virtualization
Simplifying Cloud Architectures with Data Virtualization
 
EOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - PaperEOUG95 - Client Server Very Large Databases - Paper
EOUG95 - Client Server Very Large Databases - Paper
 
Key factors for successful NAS data migration!.ppt
Key factors for successful NAS data migration!.pptKey factors for successful NAS data migration!.ppt
Key factors for successful NAS data migration!.ppt
 
I pushed in production :). Have a nice weekend
I pushed in production :). Have a nice weekendI pushed in production :). Have a nice weekend
I pushed in production :). Have a nice weekend
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
A Successful Journey to the Cloud with Data Virtualization
A Successful Journey to the Cloud with Data VirtualizationA Successful Journey to the Cloud with Data Virtualization
A Successful Journey to the Cloud with Data Virtualization
 
Software Defined Networking (SDN)
Software Defined Networking (SDN)Software Defined Networking (SDN)
Software Defined Networking (SDN)
 
SDN Control Plane scalability research proposal
SDN Control Plane scalability research proposalSDN Control Plane scalability research proposal
SDN Control Plane scalability research proposal
 
Telco Cloud 03 - Introduction to SDN
Telco Cloud 03 - Introduction to SDNTelco Cloud 03 - Introduction to SDN
Telco Cloud 03 - Introduction to SDN
 
Mso noc presentation
Mso noc presentationMso noc presentation
Mso noc presentation
 
Design and Deploy Secure Clouds for Financial Services Use Cases
Design and Deploy Secure Clouds for Financial Services Use CasesDesign and Deploy Secure Clouds for Financial Services Use Cases
Design and Deploy Secure Clouds for Financial Services Use Cases
 
Network Analysis & Design
Network Analysis & DesignNetwork Analysis & Design
Network Analysis & Design
 
Spring Transaction Management
Spring Transaction ManagementSpring Transaction Management
Spring Transaction Management
 
Transaction conccurency
Transaction conccurencyTransaction conccurency
Transaction conccurency
 

Recently uploaded

Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 

Recently uploaded (20)

Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 

Research .NET Transaction

  • 1. Research .NET Transaction Freddy Munandar on Aug 2014
  • 2. Background • Transaction is the most crucial feature for data integrity • Control the application flow when transaction is throw an exception (i.e. Showing friendly message)
  • 3. Objective • As decision support to choose the right technology or right concept for handle transaction process in .NET stack based on our environment
  • 4. .NET Transaction Architecture Based on my environment i’m just do an atomic transaction which is there are no multiple open connection or connect into third party database (i.e.Java-Tomcat) in single transaction. The red boundary mean focus on atomic transaction
  • 5. Technology Options • TransactionScope – Not part of ADO.NET – Developed by the Enterprise Service team at Microsoft – Available in System.Transactions – Called Ambient Transaction is not tied just to a database, any transaction aware provider can be used • SqlTransaction – Part of ADO.NET – Called Connection Transaction because is tied directly with a database connection
  • 6. Matrix Comparison Concern TransactionScope SqlTransaction Performance Good (local transaction) Good Flexibility Good, cover Automatic Distribution Transaction Handling Ordinary Maintainability More simple, when dealing with multi database Simple Ease of use Simple Simple Hint Loose-coupling Its like a Jacket or Cloak support any RDBMS and non-database process like rollback creational of directory inside the transaction (Ambient Transaction) Tighly-coupling with the specific RDBMS
  • 7. Transaction Behaviors Concern TransactionScope SqlTransaction Rollback inserted data. Is the auto increment id can be reused? NO NO Rollback updated data. Is the auto increment id can be reused? YES YES Rollback deleted data. Is the auto increment id can be reused? YES YES Common behavior: 1. Row Locking will be used for operation UPDATE and DELETE but SQL may decide to escalate it if it runs low on resources, can be depending on the indexes and load on the server it may end up escalating to a Page Lock or Table Locking 2. Table Locking will used for operation INSERT
  • 8. Suggestion • Use the TransactionScope is better than the SqlTransaction in term of Flexibility • Flexibility is good investment, it’s like the system can be more adaptive for changes • The flexibility, will make it easier in the future to include things other than ADO.NET calls into a transaction.
  • 9. What we choose? • To Team leader – you can decide by your own – or you can discuss with the team member and do a vote for choose the options • To deep dive understanding about Transaction beside the architecture, we must know about the SQL Server 2008 R2 transaction behaviors
  • 10. References • Pluralsight – Understanding .NET and WCF Transaction • Pluralsight – ADO.NET Fundamentals • http://www.codeproject.com/Articles/522039/A-Beginners- Tutorial-for-Understanding-Transaction • http://www.codeproject.com/Articles/690136/All-About- TransactionScope • http://stackoverflow.com/questions/3114826/is-it-possible-to- force-row-level-locking-in-sql-server • http://stackoverflow.com/questions/21386765/locking-single-row- row-level-when-inserting-data-via-transactionscope-entity • http://stackoverflow.com/questions/11292763/why-is-system- transactions-transactionscope-default-isolationlevel-serializable • Google Search