SlideShare a Scribd company logo
1 of 10
Download to read offline
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

Чурюканов Вячеслав, “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
 
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
David Walker
 
SDN Control Plane scalability research proposal
SDN Control Plane scalability research proposalSDN Control Plane scalability research proposal
SDN Control Plane scalability research proposal
Yatindra shashi
 
Mso noc presentation
Mso noc presentationMso noc presentation
Mso noc presentation
Graeme Spice
 

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

The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 

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