distributed system upto 3Module
distributed system upto 3Module
Perfect, Amarnath! Go ahead and send me the topics from your Distributed Systems
syllabus, and I’ll give you:
Great! Here's a concise and clear explanation of the "Introduction – Distributed Data
Processing" topic for your Distributed Systems notes:
🔹 Key Characteristics
Multiple nodes: Processing tasks are shared across different machines.
🔹 Advantages
1/47
Improved performance: Tasks executed in parallel reduce processing time.
Geographic distribution: Data and processing can occur close to the source.
🔹 Challenges
Data consistency: Keeping data synchronized across nodes.
Hadoop MapReduce
2/47
A Distributed Database System (DDBS) is a collection of logically interrelated
databases distributed across multiple locations connected via a network.
Each site (node) is autonomous, but the system appears to users as a single database.
🔹 Key Features
Data Distribution: Data is stored across multiple sites.
🔹 Types of DDBS
1. Homogeneous DDBS:
2. Heterogeneous DDBS:
🔹 Advantages
Improved reliability & availability
3/47
Reduced communication cost
🔹 Disadvantages
Complex management
Challenge: Deciding how to split (fragment) and place data across sites for optimal
performance and availability.
Key Point: Poor fragmentation can lead to excessive cross-site queries and high
network cost.
Challenge: Generating efficient execution plans that minimize data transfer and
response time.
Key Point: Involves cost estimation of data shipping, local processing, and remote
joins.
4/47
Challenge: Ensuring atomicity, consistency, isolation, and durability (ACID) across
multiple sites.
Key Point: Two-phase commit (2PC) and distributed locking can incur high latency
and blocking.
Challenge: Detecting node or network failures and recovering without data loss or
inconsistency.
Key Point: Catalog must be consistent and highly available for query planning.
Key Point: Must handle authentication, encryption, and fine-grained access control
in a heterogeneous environment.
8. Heterogeneity
Challenge: Integrating sites running different DBMS software, hardware, and data
models.
Key Point: Requires schema mapping, protocol translation, and middleware layers.
Challenge: Variable delays and limited throughput impact query response and
transaction times.
Key Point: System design should minimize cross-site communication and exploit
locality.
Key Point: Dynamic data and request redistribution may be needed to adapt to
changing loads.
5/47
These points cover the primary problem areas you’ll encounter in designing, implementing, or
maintaining a Distributed Database System. Let me know the next topic!
Here’s a concise yet comprehensive overview organized into clear sections for your notes,
with key points and definitions—each statement backed by high-quality citations.
Summary
This overview covers fundamental database and computer network concepts, the
architecture of Distributed Database Management Systems (DDBMS), and the various
transparencies that make a DDBMS appear as a single database to users. You’ll find
definitions, classification of architectures, and the core transparencies (location, replication,
fragmentation, etc.) laid out in bullet-friendly form for easy note-making.
Network topologies (bus, star, ring, mesh) determine how nodes are connected and
impact fault tolerance and performance Wikipedia .
The OSI model (7 layers) and TCP/IP stack (4 layers) define protocols and functions for
reliable, end-to-end communication Wikipedia .
6/47
## Distributed Database Management System Architecture
Definition & Goals
A Distributed Database System (DDBS) consists of multiple, logically interrelated
databases distributed over a network, appearing as a single database to users
GeeksforGeeks Wikipedia .
Client/Server Model
Uses a client/server architecture where clients submit queries and servers manage
local data and execute requests Oracle Documentation .
Any node can act as a client, server, or both, depending on the operation
Oracle Documentation .
Architecture Types
Shared-Nothing: Each node has its own CPU, memory, and disk; data is partitioned
across nodes. It offers high scalability and fault isolation Wikipedia .
Shared-Disk: All nodes share common storage but have private memory; coordination is
needed to manage concurrent access Wikipedia .
Shared-Memory: Nodes share memory, requiring tight coupling; rarely used in large-
scale DDBS Wikipedia .
7/47
1. Location Transparency
Users issue queries without knowing on which site data resides GeeksforGeeks .
2. Replication Transparency
Multiple copies of data can exist without user awareness; the system ensures
consistency across replicas GeeksforGeeks .
3. Fragmentation Transparency
Data fragmentation (horizontal, vertical, hybrid) is hidden; queries access fragmented
data seamlessly GeeksforGeeks .
4. Transaction Transparency
Distributed transactions maintain ACID properties (atomicity, consistency, isolation,
durability) across sites, often via two-phase commit TutorialsPoint .
5. Performance Transparency
The system optimizes query execution plans to minimize network transfer and balance
load without user intervention TutorialsPoint .
6. Failure Transparency
Mask node or communication failures, providing automatic recovery mechanisms so
users see uninterrupted service TutorialsPoint .
These concise points give you a structured foundation for your Distributed Systems notes. Let me
know if you need elaboration on any section!
Sources
1. Distribution Model – how control and data are spread (Client/Server vs. Peer‐to‐Peer).
8/47
2. Hardware/Storage Model – how resources are shared (Shared‐Nothing, Shared‐Disk,
Shared‐Memory, Shared‐Everything).
## 1. Distribution Models
### 1.1 Client/Server
Definition: A central server hosts the database; clients send requests and receive results
Purdue Computer Science .
Characteristics:
Characteristics:
Better resilience and scalability, but more complex metadata and catalog
management.
## 2. Hardware/Storage Models
### 2.1 Shared‐Nothing
9/47
Definition: Each node has its own CPU, memory, and disk; nodes communicate only via
the network phoenixNAP | Global IT Services CMU 15-445/645 .
Advantages:
Drawbacks:
Advantages:
Easier to redistribute load—any node can access any data page on shared storage.
Drawbacks:
Usage:
Trade‐Off:
10/47
Simplifies data visibility and caching.
Component Function
Transaction Manager Coordinates distributed transactions, ensuring ACID via protocols like Two‐
Phase Commit drbtaneja.com .
Storage Manager Manages local data storage, buffer pools, and index access.
Concurrency Control Enforces isolation across sites using distributed locking or timestamp
ordering.
Recovery Manager Provides fault tolerance via logging, checkpointing, and coordinated
rollback/roll‐forward.
Communication Handles messaging, marshalling, and remote procedure calls among sites.
Subsystem
Client Interface Presents a unified view to applications, hiding the distribution and
replication details.
This architecture overview should give you a clear framework for your notes—defining each model,
its trade‐offs, and the internal building blocks of a Distributed DBMS.
Sources
11/47
🔹 Global Directory Issues
1. Single Point of Failure
If the central directory goes down, the entire distributed DBMS can become
inoperative.
2. Scalability Bottleneck
Every query may need a lookup in the global directory, adding network round-trips.
4. Consistency Maintenance
6. Synchronization Overhead
12/47
The directory contains critical metadata; unauthorized access can compromise the
entire system.
Mitigation: maintain robust logging and checkpointing mechanisms for the directory
state.
9. Load Imbalance
These points highlight the core challenges you’ll face in managing a global directory within a
distributed DBMS. Let me know if you need deeper explanations or examples!
Here’s a concise set of alternative design strategies for distributed database design,
organized for easy note‐taking and each point backed by citations.
## A. Data-Placement Alternatives
1. Centralized
13/47
All data resides on a single site; simple to manage but poor scalability and fault
tolerance www.slideshare.net .
2. Replicated
3. Partitioned (Fragmented)
Database split into disjoint fragments (horizontal, vertical, hybrid) stored at different
sites; balances load and reduces network traffic www.slideshare.net .
4. Hybrid
## B. Design-Methodology Approaches
1. Top-Down
Start from a global conceptual schema, then refine into fragments, allocate to sites
for optimal distribution; yields homogeneous systems ie.utcluj.ro Google Groups .
2. Bottom-Up
Integrate existing local schemas into a global schema; suits systems where
databases already exist at sites ie.utcluj.ro Google Groups .
3. Mixed (Hybrid)
4. Backward-Forward (Output-Driven)
5. Activity-Analysis (Process-Driven)
Analyze business processes to derive data allocation needs; fragments and replicas
are allocated based on workflow and transaction patterns NIST Publications .
14/47
## C. Data-Allocation Strategies
1. Fragmentation
2. Replication
Copies of data maintained at multiple sites for fault tolerance and reduced access
latency
3. Combined Strategies
Most real systems use fragmentation for data locality plus selective replication for
critical fragments, balancing performance and update cost TutorialsPoint .
These strategies provide a toolkit for designing scalable, reliable distributed databases—select and
tailor them based on workload, network topology, and administrative autonomy.
Sources
2/2
The user asked about distributed database design issues, so I should
highlight key concerns like fragmentation, data distribution,
heterogeneity, and performance. Since it’s a relatively broad topic, I think
I’ll provide concise notes. Given the guidelines, it's recommended to
include at least 10 citations, though the user didn't ask for deep analysis.
I'll look up relevant details on distributed database design issues and
make sure to cover factors like security, transaction management, and
complexity. Let's proceed with finding sources for the appropriate
citations.
8 more
15/47
concurrency control, reliability, global directory, network performance,
scalability, and synchronization overhead.
I'll need to gather relevant sources to make sure I have the right citations
for all these components, including factors like heterogeneity, security,
scalability, and replication. I'll go through my sources now and make sure
to cite appropriately!
Done
Here’s a concise overview of the key design issues you’ll face when architecting a distributed
database, organized for your notes:
Distributed database design must reconcile heterogeneity and openness in hardware, OS,
and software interfaces; strategize data placement via fragmentation and replication;
optimize query processing across sites; enforce transactional consistency and deadlock
control; manage network communication overhead; and guarantee scalability, fault‐
tolerance and security throughout the system basiccomputerscience.softecks.in ResearchGate Scribd
GeeksforGeeks ds.cs.luc.edu .
Allocation Strategy: Deciding which fragments live on which sites determines load
balance and response time.
16/47
Consistency Models: Trade‐offs between strong (synchronous) and eventual
(asynchronous) consistency affect availability and performance.
Cost Estimation: Must account for local CPU, I/O, and inter‐site transfer costs when
choosing join orders and data shipping strategies Scribd .
Protocol Choice: Synchronous vs. asynchronous message passing impacts reliability and
performance.
Failure Masking: Replication, checkpointing, and recovery protocols hide node or link
failures from users ds.cs.luc.edu .
Authorization: Fine‐grained access control must span multiple DBMS products and sites.
17/47
These distilled points will help you structure your notes on distributed database design
challenges—feel free to ask for deeper examples or clarifications on any item!
Sources
Summary:
Fragmentation divides relations into smaller pieces to improve query performance and data
locality, with three main types—horizontal, vertical, and hybrid—each offering trade-offs in
complexity and efficiency GeeksforGeeks BINUS Student Information System . Data allocation then decides
where to place these fragments (or full/partial replicas) across sites, using centralized,
partitioned, replicated, or hybrid strategies to balance performance, availability, and update
costs TutorialsPoint ScienceDirect . Optimal designs consider workload patterns, network costs, and
site capacities, often combining fragmentation with selective replication for critical data
Hevo Data Vaia .
## A. Fragmentation
1. Definition
Fragmentation is the process of breaking a global relation into smaller, disjoint pieces
(fragments) that can be stored at different sites GeeksforGeeks .
2. Types of Fragmentation
1. Horizontal Fragmentation
Divides a relation into subsets of rows based on a predicate (e.g., region = “Asia”)
GeeksforGeeks .
2. Vertical Fragmentation
Splits a relation into subsets of columns, ensuring each fragment retains the
primary key to allow reconstruction via join BINUS Student Information System .
18/47
Use-case: Isolate frequently accessed attributes or sensitive data.
Combines horizontal and vertical fragmentation for fine-grained control (e.g., first
horizontal by region, then vertical on each) GeeksforGeeks .
Improves data locality and reduces query response time by accessing only relevant
fragments GeeksforGeeks .
Disadvantages:
May incur complex reconstruction overhead when queries span multiple fragments
GeeksforGeeks .
Recursive fragmentation can lead to high management cost and network traffic
GeeksforGeeks .
## B. Data Allocation
1. Definition
Data Allocation is the process of deciding which fragments (or full/partial replicas) are
stored at which sites in the network TutorialsPoint .
2. Allocation Strategies
1. Centralized Allocation
All data stored at a single site; simplest but poor scalability and fault tolerance
TutorialsPoint .
Each fragment stored at exactly one site, leveraging fragmentation for load
distribution and reduced inter-site traffic TutorialsPoint .
3. Replicated Allocation
19/47
Copies of (full or partial) data stored at multiple sites to improve availability and
read performance, at the cost of update synchronization overhead TutorialsPoint .
4. Hybrid Allocation
Site Capabilities: CPU, storage, and network bandwidth of each site Vaia .
Network Topology & Latency: Place data close to the dominant user group to minimize
access delays ScienceDirect .
Reliability Requirements: Critical data may need more replicas for fault tolerance
ScienceDirect .
4. Combined Approaches
Fragment-then-Replicate: First apply fragmentation to localize data, then replicate hot
fragments to multiple sites for load balancing Hevo Data .
Dynamic Allocation: Adjust allocation at runtime based on monitoring (e.g., via mobile
agents or learning-based models) to adapt to changing workloads www2.math.ethz.ch .
These bullet-points should serve as a solid foundation for your notes on fragmentation and data
allocation in distributed databases.
Sources
Semantic data control in a distributed DBMS encompasses the mechanisms that enforce the
meaning, integrity, and access rights of data across multiple sites. It includes functions
such as view management, security control, and semantic integrity control, all aimed at
ensuring that authorized users perform correct operations on consistent data despite
distribution SpringerLink .
20/47
## 1. Semantics (Semantic Data Models)
A Semantic Data Model (SDM) is a high-level, meaning-oriented database description
formalism that captures entities, their classifications, and interconnections to reflect
real-world application semantics Wikipedia .
In a distributed environment, semantic models guide how global schemas relate to local
schemas, ensuring that data fragments at different sites maintain consistent
interpretations of entities and relationships GoodData .
## 2. Data Control
Data control refers to enforcing regulations—such as integrity constraints,
authorization, and privacy rules—so that only correct and permitted data is available to
authenticated users and applications TutorialsPoint .
Integrity constraints (e.g., key, domain, and referential constraints) must be checked
across sites, requiring coordination protocols to prevent anomalies during distributed
updates Purdue Computer Science .
Privacy and security controls screen sensitive data from unauthorized sites and encrypt
communications to protect against eavesdropping in untrusted networks TutorialsPoint .
## 3. View Management
A view is a virtual relation defined by a query over base relations, providing logical data
independence and tailored representations for different users prezi.com .
Distributed view processing involves two main tasks: (1) query decomposition, where a
global view query is broken into subqueries for relevant fragments, and (2)
21/47
reconstruction, where results from local subqueries are integrated to form the final view
answer ResearchGate .
Challenges include ensuring up-to-date view contents under data replication, optimizing
view query plans to minimize cross-site data transfer, and enforcing view-specific
security policies consistently across replicas Medium .
Protection views add an extra layer of security by exposing only a filtered subset of
attributes or tuples to certain users, enforcing both read and write restrictions
transparently VLDB .
These concise points cover the semantic foundations, data control mechanisms, and view
management strategies essential for maintaining correct, secure, and meaningful data access in
distributed database systems.
Sources
Integrity guarantees that data cannot be altered undetectedly, enforced via checksums,
digital signatures, and transactional controls Informa TechTarget .
22/47
Availability ensures reliable access to data and services despite failures or attacks,
achieved through replication, fault-tolerant architectures, and rapid recovery
mechanisms Informa TechTarget .
Authorization determines what authenticated entities may do, using models such as
Role-Based Access Control (RBAC), Mandatory Access Control (MAC), and Discretionary
Access Control (DAC) Delinea .
## 3. Encryption Techniques
Data-in-Transit Encryption employs protocols like TLS/SSL or IPSec to prevent
eavesdropping on network links GeeksforGeeks .
Queryable Encryption enables search and query operations over encrypted data
without decryption, reducing exposure risks during processing WIRED .
23/47
Discretionary Access Control (DAC) allows data owners to grant permissions, offering
flexibility but requiring careful governance Delinea .
Continuous Monitoring tracks system events and configurations, triggering alerts for
anomalous activity and policy violations Liquid Web .
## 6. Intrusion Detection
Network-Based IDS (NIDS) inspects traffic between sites for known attack signatures or
anomalies GeeksforGeeks .
Host-Based IDS (HIDS) monitors individual database servers for suspicious processes,
file changes, or policy breaches GeeksforGeeks .
Replication across multiple sites provides high availability and quick failover; must be
coordinated to maintain consistency Daily.dev .
Disaster Recovery Plans define RPOs (Recovery Point Objectives) and RTOs (Recovery
Time Objectives) to meet business requirements Daily.dev .
24/47
Regulatory Frameworks such as GDPR, HIPAA, and PCI DSS mandate specific security
controls (encryption, access logs, breach notification) for distributed data BlueXP .
Data Residency Laws may restrict where certain data can be stored or processed,
influencing data placement and replication strategies TiDB .
## 9. Network Security
Secure Communication Channels (VPNs, dedicated lines) protect data flows between
distributed nodes GeeksforGeeks .
Firewalls & Network Segmentation isolate database servers from untrusted networks
and limit attack surface GeeksforGeeks .
These concise points cover the critical aspects of data security in Distributed DBMS
environments, balancing technical controls with operational considerations to safeguard
data across dispersed systems.
Sources
25/47
Semantic integrity control ensures that data not only meets syntactic rules (e.g., type,
format) but also business‐level meaning and inter‐entity relationships, even when data is
distributed across multiple sites.
Key Constraints
Referential Integrity
Complex predicates (e.g., “order total must not exceed credit limit”) that reflect
organizational policies.
Check constraints that reference only locally stored data at each site.
Global Enforcement
Collect updates and validate semantic rules at transaction end, reducing interim
communication.
Predicate‐Based Partitioning
26/47
Fragment relations such that semantically related tuples reside together, minimizing
cross‐site checks.
3. Coordination Protocols
Two‐Phase Commit (2PC)
For less critical rules, allow temporary violations and run compensating transactions
later.
4. Design Considerations
Minimize Cross‐Site Dependencies
Fragment and allocate data to reduce the number of global constraint checks.
Immediate (eager) checks increase correctness but add latency; deferred checks
improve throughput but risk temporary inconsistencies.
Metadata Management
Store semantic‐constraint definitions in the global directory, accessible to all sites for
enforcement.
These points outline how semantic integrity control is defined and enforced in a distributed
database environment, helping you capture both the types of constraints and the mechanisms for
maintaining them across multiple sites.
Summary
Query processing transforms high-level user queries into efficient execution plans, aiming to
minimize overall resource consumption (CPU, I/O, network) while ensuring correctness and
reusability. The main objectives include (1) translating queries into algebraic operations; (2)
27/47
decomposing and localizing subqueries; (3) choosing optimal execution strategies globally
and locally; (4) minimizing costs via optimization; and (5) generating and caching execution
plans for reuse.
2. Query Decomposition
3. Data Localization
4. Global Optimization
Explore and select among alternative global execution strategies (e.g., join ordering,
semijoin usage) to minimize distributed costs DSpace .
5. Local Optimization
For each site, apply cost-based optimization (e.g., index selection, join methods) to
subqueries before execution Purdue Computer Science .
6. Cost Minimization
Use a cost model combining CPU, I/O, and communication costs to guide
optimization decisions, aiming to produce plans with minimal expected execution
time www.slideshare.net Wikipedia .
Ensure the chosen plan is semantically equivalent to the original query by applying
equivalence-preserving transformation rules (e.g., commutativity, associativity of
joins) SpringerLink .
28/47
Construct a detailed query execution plan (QEP) that specifies operators, data flows,
and site assignments Wikipedia .
10. Adaptivity
These objectives together ensure that distributed query processing is both efficient and correct,
delivering fast responses while minimizing resource usage and adapting to evolving system
conditions.
Sources
Overview
A query processor translates high-level queries into low-level operations and executes them
efficiently. Its architecture is typically modular, separating compilation, optimization, and
execution. Key characterizations include the processing layers, the phases each query
undergoes, and quality metrics (like performance and extensibility).
1. Architectural Layers
1. Query Parser / DDL Compiler
29/47
Converts the parse tree into a logical algebra expression.
3. Query Optimizer
Physical Optimization: Chooses algorithms (e.g., nested-loop vs. hash join) and
access paths (indexes vs. full scans).
2. Processing Phases
1. Parsing & Validation
4. Plan Selection
30/47
3. Classification of Query Processors
Static vs. Adaptive
4. Quality Metrics
Performance: Throughput and response time under typical workloads.
Scalability: Ability to maintain performance as data size and user concurrency grow.
These points give you a clear framework for how query processors are structured, operate, and are
evaluated—ideal for concise note-making.
31/47
Global Query Optimization, and Distributed Execution Ques10 www.slideshare.net . Each layer
plays a distinct role, from rewriting the query at the global schema level to orchestrating
parallel execution across multiple sites sungsoo.github.io www.slideshare.net . This layered approach
helps manage complexity and optimize performance in distributed environments Ques10
sungsoo.github.io .
1. Query Decomposition
Decomposes the original query on global (distributed) relations into an equivalent algebraic
query over those global relations, applying transformations such as predicate push-down
and view expansion Ques10 www.slideshare.net .
2. Data Localization
Maps the algebraic query on global relations to algebraic queries on local fragments by
determining which data fragments or replicas each subquery must access, thereby
minimizing unnecessary data transfer Ques10 www.slideshare.net .
4. Distributed Execution
Executes the chosen distributed query plan by coordinating subqueries at each site,
managing inter-site communication, buffering, and result assembly to produce the final
answer to the user’s query www.slideshare.net sungsoo.github.io .
Sources
32/47
1. Purpose
Transform a high-level global query into an equivalent algebraic form over global
relations.
Prepare the query for localization and optimization by simplifying and normalizing it.
2. Steps in Decomposition
1. View Expansion
Replace any view names in the query with their defining expressions.
2. Predicate Push-Down
Convert nested subqueries (e.g., IN, EXISTS) into joins or semijoins where feasible.
4. Query Rewriting
5. Fragment-Aware Rewriting
3. Output of Decomposition
33/47
An algebraic query expressed over the set of fragments (and replicas) rather than over
monolithic relations.
Ready for the next layer—Data Localization—where each fragment reference is mapped
to its storing site.
This gives you the precise sequence and rationale for decomposing queries in a distributed
DBMS. Let me know if you need examples or further details!
Summary
Data localization is the process in distributed query processing that maps an algebraic
query over global relations onto site-specific subqueries by using metadata on
fragmentation and replication, with the primary goal of minimizing inter-site data transfer
and network latency Dimi Uniud Users Scribd .
Purpose
Minimize Data Movement: Restrict data access to only those fragments that satisfy
query predicates, thereby reducing network costs GeeksforGeeks .
Prepare for Optimization: Produce localized subqueries that can be further optimized
both globally and locally.
Use the global directory to determine which data fragments (horizontal/vertical) are
needed for each relation in the query www.slideshare.net .
34/47
2. Determine Fragment-Site Mapping
Look up the location of each fragment (or its replicas) to know which site(s) should
execute the subquery Dimi Uniud Users .
Rewrite the global algebraic query into subqueries that reference only the local
fragments, applying selection and projection early Scribd .
Insert UNION (for horizontal fragments) or JOIN (for vertical fragments) operators to
recompose the global relation from local results Purdue Computer Science .
Join Shipping vs. Data Shipping: Decide between moving data fragments to the site of
the join or moving the join operation to data sites based on cost estimates infolab.usc.edu .
Predicate Pushdown: Apply selection predicates at the fragment level to reduce tuple
counts early.
Load Imbalance: Skewed fragment distribution may overload certain sites; adaptive
reallocation or replication can help YouTube .
35/47
These concise points outline how distributed data localization transforms global queries into
efficient, site-specific operations, forming a critical foundation for subsequent optimization and
execution.
Sources
2. Key Concepts
Transaction: A sequence of read/write operations treated as a single logical unit.
Conflict: Occurs when two transactions access the same data item and at least one
writes it.
A. Lock-Based Protocols
36/47
Shrinking phase: release locks; no new locks acquired.
B. Time-Stamp Ordering
Read/write rules:
A transaction’s read/write is allowed only if its timestamp ordering does not violate
serial order.
Phases:
Maintain multiple versions of each data item, each annotated with a timestamp.
Readers see the version matching their start time, writers create new versions.
Resolution: Abort one or more transactions to break the cycle (victim selection by
cost/age).
5. Performance Considerations
Lock Granularity: Table-, page-, or row-level locks balance concurrency vs. overhead.
37/47
Isolation Levels:
These points cover the essentials of designing and understanding concurrency control in a
centralized DBMS, suitable for concise exam notes.
Summary
Concurrency control in Distributed Database Management Systems (DDBMSs) extends
centralized techniques to ensure global serializability and ACID properties across multiple
sites. It must coordinate sub-transactions, manage distributed locks or timestamps, and
integrate with atomic commitment protocols (e.g., Two-Phase Commit) to handle failures.
Key goals are to prevent conflicts, avoid deadlocks, and minimize communication
overhead, while ensuring correctness through global serialization.
Conflict Detection & Resolution: Coordinate conflicting operations on the same data
item held at different replicas or fragments GeeksforGeeks .
Deadlock Management: Detect and resolve deadlocks that may involve locks spanning
multiple sites TutorialsPoint .
Fault Tolerance: Integrate with atomic commitment (e.g., 2PC) so that in the event of
node or network failure, either all sub-transactions commit or none do Wikipedia .
38/47
2. Lock-Based Protocols
2.1 Strong Strict Two-Phase Locking (SS2PL)
Acquire all needed S/X locks before any release (growing phase), release locks only after
transaction end (shrinking phase).
Distributed DLM: Lock managers at each site coordinate via message passing; reduces
bottlenecks but increases protocol complexity and latency TutorialsPoint .
3. Timestamp-Based Protocols
Global Timestamps: Assign each transaction a unique timestamp at start; ensure
operations follow timestamp order.
Read/Write Rules: A read or write is allowed only if it does not violate the timestamp
order; otherwise, the transaction is aborted and restarted TutorialsPoint .
Drawbacks: High abort rate under contention; requires synchronized clocks or logical
clock algorithms (e.g., Lamport clocks).
Validation Phase: At commit, check for conflicts with overlapping transactions across
sites.
Write Phase: If validation succeeds, changes are applied; otherwise, abort and retry
GeeksforGeeks .
39/47
Use Case: Suitable when conflicts are rare and transaction loads are light.
2. Commit Phase: If all vote “yes,” coordinator instructs commit; otherwise, abort
everywhere.
Role in Concurrency Control: Ensures that lock releases (2PL) or timestamp updates
occur only after a unanimous commit decision, preserving global consistency Wikipedia .
Detection Algorithms:
Distributed: Sites circulate probe messages along wait-for chains to detect cycles
TutorialsPoint .
Resolution: Abort one or more transactions (victim selection based on cost or age) to
break the cycle.
40/47
8. Summary of Trade-offs
Protocol Type Deadlock Risk Blocking Abort Rate Coordination Cost
These key points cover the spectrum of concurrency control mechanisms in distributed DBMSs,
highlighting how each balances correctness, performance, and complexity in a networked
environment.
Sources
41/47
A Distributed Lock Manager (DLM) can be implemented centrally (single lock server) or
hierarchically/distributed (lock managers at each site coordinate via messages) to track
S/X locks across nodes GeeksforGeeks .
Centralized DLM simplifies deadlock detection but is a bottleneck and single point of
failure; distributed DLM avoids that but incurs higher protocol complexity and latency
VLDB .
2. Timestamp-Ordering Protocols
Each transaction receives a global timestamp (e.g., via synchronized clocks or logical
Lamport clocks) and all reads/writes are ordered to respect timestamp order, aborting
transactions that would violate it Wikipedia .
Wound–Wait and Wait–Die are deadlock-free timestamp variants that use timestamp
comparisons to decide whether an older transaction preempts a younger or vice versa
VLDB .
Time-stamp protocols are non-blocking (no locks), but under high contention they incur
high abort rates and require clock synchronization or reliable logical clocks VLDB .
In distributed OCC, validation must coordinate among all sites holding touched data,
typically via a prepare-and-validate sub-protocol before the two-phase commit
People at EECS Berkeley .
OCC excels when workloads are read-dominated with few conflicts, reducing lock-
management overhead but suffering high aborts under contention Medium .
42/47
consensus on safe timestamps People at EECS Berkeley .
Victim Selection for aborts typically favors younger or low-cost transactions to break
deadlocks with minimal work loss VLDB .
Key Trade-offs:
2PL yields low abort rates but high blocking and coordination cost.
Timestamp methods avoid blocking but suffer abort storms and require clock
management.
Choosing the right protocol depends on your workload’s read/write mix, network
characteristics, and tolerable abort vs. latency profile.
Sources
43/47
Distributed deadlock management encompasses techniques to prevent, detect, and resolve
cycles of waiting transactions across multiple sites, ensuring global serializability and system
liveness. Below is a structured overview:
Summary
In distributed DBMSs, deadlocks arise when transactions on different nodes form a circular
wait for locks on each other’s resources. Unlike centralized systems, distributed deadlock
management must contend with no global clock, partial information, and network latency.
The primary approaches are:
2. Hold and Wait: Transactions hold at least one resource while waiting for others.
4. Circular Wait: A cycle of transactions exists, each waiting on the next GeeksforGeeks .
44/47
2. Deadlock Prevention and Avoidance
Prevention: Impose ordering on resource requests; e.g., require transactions to lock
resources in a globally agreed sequence GeeksforGeeks .
Trade-off: These methods reduce deadlock risk but constrain concurrency and can
increase abort rates.
3. Deadlock Detection
3.1 Centralized Detection
A single site gathers local wait-for edges from all nodes to build a global waits-for
graph; cycles indicate deadlocks SpringerLink .
4. Deadlock Resolution
Victim Selection: Abort one or more transactions in the cycle, chosen based on criteria
such as:
45/47
Rollback Cost (least work lost)
5. Practical Considerations
Partial Knowledge: Sites may lack complete waits-for information, necessitating
conservative detection that risks false positives (unnecessary aborts).
Integration with 2PC: Coordinate deadlock resolution with the two-phase commit
protocol to ensure atomicity and consistency Citus Data .
References:
46/47
Chandy-Misra-Haas in computing surveys CMI
Sources
47/47