SlideShare a Scribd company logo
Distributed Data
Management
Challenges
Bond Trading
ACID
(Atomicity,
Consistency,
Isolation,
Durability)
A
• Each transaction is "all or nothing".
C
• Data should be valid according to all defined
rules.
I
• Transactions do not affect each other.
D
• Committed data would not be lost, even after
power failure.
Monitor
object pattern
Monitor object: This component exposes
the methods that are synchronized to the
clients
Synchronized methods: The thread-safe
functions that are exported by the
interface of the object are implemented
by these methods
Monitor conditions: This component along
with the monitor lock decides whether the
synchronized method should resume its
processing or suspend it
Monitor
object pattern
Sagas
Sagas
Sagas
Sagas
 Order Service— Create an Order in an APPROVAL_PENDING state.
 Consumer Service— Verify that the consumer can place an order.
 Kitchen Service— Validate order details and create a Ticket in
the CREATE_PENDING state.
 Accounting Service— Authorize consumer’s credit card, which fails.
 Kitchen Service— Change the state of the Ticket to CREATE_REJECTED.
 Order Service— Change the state of the Order to REJECTED.
Choreography-
based sagas
Orchestration-
based sagas
The lack of isolation
 Lost updates— One saga overwrites without reading changes made by
another saga.
 Dirty reads— A transaction or a saga reads the updates made by a saga that
has not yet completed those updates.
 Fuzzy/nonrepeatable reads— Two different steps of a saga read the same
data and get different results because another saga has made updates.
Countermeasures for handling the lack
of isolation
 Semantic lock— An application-level lock.
 Commutative updates— Design update operations to be executable in any
order.
 Pessimistic view— Reorder the steps of a saga to minimize business risk.
 Reread value— Prevent dirty writes by rereading data to verify that it’s
unchanged before overwriting it.
 Version file— Record the updates to a record so that they can be reordered.
 By value— Use each request’s business risk to dynamically select the
concurrency mechanism.
Order service

More Related Content

Similar to Distributed data management challenges (20)

PDF
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
Chris Richardson
 
PPTX
Microservices Coordination using Saga
Eran Levy
 
PPTX
Software architecture for data applications
Ding Li
 
PPTX
Lost with data consistency
Michał Gryglicki
 
PDF
microXchg: Managing data consistency in a microservice architecture using Sagas
Chris Richardson
 
PDF
Data Consitency Patterns in Cloud Native Applications
Ryan Knight
 
PDF
Saga transactions msa_ architecture
Mauro Vocale
 
PDF
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Mydbops
 
PDF
Navigating Transactions: ACID Complexity in Modern Databases
Shivji Kumar Jha
 
PPTX
Introduction to Microservices Patterns
arconsis
 
PPTX
Introduction to Microservices Patterns
Dimosthenis Botsaris
 
PDF
Database Consistency Models
Simon Ouellette
 
PDF
Reactive Design Patterns: a talk by Typesafe's Dr. Roland Kuhn
Zalando Technology
 
PDF
w-jax 2022: Keeping CALM – Konsistenz in verteilten Systemen leichtgemacht
Susanne Braun
 
PDF
Konsistenz-in-verteilten-Systemen-leichtgemacht-wjax.pdf
Susanne Braun
 
PDF
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
Chris Richardson
 
PDF
Konsistenz-in-verteilten-Systemen-leichtgemacht.pdf
Susanne Braun
 
PDF
Data Patterns
Ryan Knight
 
PPTX
Transactions and Concurrency Control
Dilum Bandara
 
ODP
Distributed systems and consistency
seldo
 
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
Chris Richardson
 
Microservices Coordination using Saga
Eran Levy
 
Software architecture for data applications
Ding Li
 
Lost with data consistency
Michał Gryglicki
 
microXchg: Managing data consistency in a microservice architecture using Sagas
Chris Richardson
 
Data Consitency Patterns in Cloud Native Applications
Ryan Knight
 
Saga transactions msa_ architecture
Mauro Vocale
 
Navigating Transactions: ACID Complexity in Modern Databases- Mydbops Open So...
Mydbops
 
Navigating Transactions: ACID Complexity in Modern Databases
Shivji Kumar Jha
 
Introduction to Microservices Patterns
arconsis
 
Introduction to Microservices Patterns
Dimosthenis Botsaris
 
Database Consistency Models
Simon Ouellette
 
Reactive Design Patterns: a talk by Typesafe's Dr. Roland Kuhn
Zalando Technology
 
w-jax 2022: Keeping CALM – Konsistenz in verteilten Systemen leichtgemacht
Susanne Braun
 
Konsistenz-in-verteilten-Systemen-leichtgemacht-wjax.pdf
Susanne Braun
 
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
Chris Richardson
 
Konsistenz-in-verteilten-Systemen-leichtgemacht.pdf
Susanne Braun
 
Data Patterns
Ryan Knight
 
Transactions and Concurrency Control
Dilum Bandara
 
Distributed systems and consistency
seldo
 

More from sang nguyen (8)

PDF
AMM, How it works.pdf
sang nguyen
 
PPTX
Uml 2.x
sang nguyen
 
PPTX
Reactive programming
sang nguyen
 
PPTX
Spring from a to Z
sang nguyen
 
PPTX
Finding use case
sang nguyen
 
PPTX
Software - Information gathering
sang nguyen
 
PPTX
Business analysis-Software
sang nguyen
 
PPTX
Alfresco overview EDM
sang nguyen
 
AMM, How it works.pdf
sang nguyen
 
Uml 2.x
sang nguyen
 
Reactive programming
sang nguyen
 
Spring from a to Z
sang nguyen
 
Finding use case
sang nguyen
 
Software - Information gathering
sang nguyen
 
Business analysis-Software
sang nguyen
 
Alfresco overview EDM
sang nguyen
 
Ad

Recently uploaded (20)

PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
Thread In Android-Mastering Concurrency for Responsive Apps.pdf
Nabin Dhakal
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
In From the Cold: Open Source as Part of Mainstream Software Asset Management
Shane Coughlan
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Ad

Distributed data management challenges

  • 3. ACID (Atomicity, Consistency, Isolation, Durability) A • Each transaction is "all or nothing". C • Data should be valid according to all defined rules. I • Transactions do not affect each other. D • Committed data would not be lost, even after power failure.
  • 4. Monitor object pattern Monitor object: This component exposes the methods that are synchronized to the clients Synchronized methods: The thread-safe functions that are exported by the interface of the object are implemented by these methods Monitor conditions: This component along with the monitor lock decides whether the synchronized method should resume its processing or suspend it
  • 9. Sagas  Order Service— Create an Order in an APPROVAL_PENDING state.  Consumer Service— Verify that the consumer can place an order.  Kitchen Service— Validate order details and create a Ticket in the CREATE_PENDING state.  Accounting Service— Authorize consumer’s credit card, which fails.  Kitchen Service— Change the state of the Ticket to CREATE_REJECTED.  Order Service— Change the state of the Order to REJECTED.
  • 12. The lack of isolation  Lost updates— One saga overwrites without reading changes made by another saga.  Dirty reads— A transaction or a saga reads the updates made by a saga that has not yet completed those updates.  Fuzzy/nonrepeatable reads— Two different steps of a saga read the same data and get different results because another saga has made updates.
  • 13. Countermeasures for handling the lack of isolation  Semantic lock— An application-level lock.  Commutative updates— Design update operations to be executable in any order.  Pessimistic view— Reorder the steps of a saga to minimize business risk.  Reread value— Prevent dirty writes by rereading data to verify that it’s unchanged before overwriting it.  Version file— Record the updates to a record so that they can be reordered.  By value— Use each request’s business risk to dynamically select the concurrency mechanism.