SlideShare a Scribd company logo
1 of 15
Data Replication in  Distributed System  Ehsan Hessami Islamic Azad University Of Qazvin
2 kind Data Replication 1- Synchronous Replication 2PC(Two Phase Commit Protocol)Exp:  2- Asynchronous Replication 1- Primary Site Asynchronous 2- Peer-Peer Asynchronous
Primary Site Asynchronous Client Secondary Copy  Primary Copy  a D b c Update and Read only  Translation Lazy Update  Propagation Forward Update  Transactions
Lazy master Framework Ownership ReplicaCopy 1- Primary Copy (denoted by capital Letters) Propagation 2- Secondary Copy (denoted by Lowercase Letters) Nodes 1- Master                        Save Primary Copy    Refreshment 2- Slave                          Save Secondary Copy 3- Master Slave               Save Primary & Secondary Copy    Configuration Transactions 1- Update Transactions (T)                                                          Update Primary Copy 2- Refresh Transactions (RT)                                                     Update Secondary Copy 3- Queries (Q)                              Read Operation From Secondary Copy
Lazy master Framework Ownership Defines When The Update Transaction  PrimaryCopy Must be Towards The Nodes Storing its SecondaryCopy Propagation Refreshment Type of Propagation 1-immediate Configuration 2- deferred
Lazy master Framework Ownership Defines When The Refresh Transaction  Must be Start on SecondaryCopy. (immediate , deferred , wait). Propagation Refreshment The Couple Formed by The  Propagation And The Trigger Mode   1-deferred-immediate Configuration 2- immediate-immediate 3- immediate-Wait
Lazy master Framework Ownership Defines The Component  node  of a Replication Schema .      EXP  1 Master , n Slave Propagation Refreshment Configuration
System architecture Each Node (Slave & Master) Support DB And 3 Component : 1 – Replication Module 1-1 – Log Monitor 1-2 – Propagator 1-3 – Receiver 2 – Refresher 3 – Network interface
System architecture Log Monitor Propagator Receiver Refresher   Used to extract changes to primary copy From History Log   IF Find Write Operation , write into Input Log for Propagator
System architecture Log Monitor Propagator Receiver Refresher Each Record Have 4 Parameter (Primary ID , Field ID , Operation , New_Value). Propagator have 2 State : immediate , deferred
System architecture Log Monitor Propagator Receiver Refresher  Each Message save in Reception Log  Receiver Read from Reception Log IF we have 1 Master Node then Queue is 1 .
System architecture Log Monitor Propagator Receiver Refresher Checking the Queue for new incoming Record . Refresher is 3 kind : deferred-immediate  , Immediate-immediate , Immediate_ wait
Connect  and Disconnect Each Connect and Disconnect save in Historylog . ConnectTable Showing the nodes are Connect .  Each node Have ConnectTable (Node_id,Replica_id , Status) . < “Connect” , Master_id , Slave_id , Replica_id > < “Disconnect” , Master_id , Slave_id , Replica_id >
Failure & Recovery Slave Failure : All the Connected Master Must Stop Sending Message To it Slave Recovery is Performed in 2 state : 1-   < “Reconnect” , Master_id , Slave_id , Replica_id ,     Message_id  > 2 – Searching in the Reception Log for all messages   received from Master_id but not yet Processed by the Refresher .
Failure & Recovery Master Failure :  The Slave Receiver a Fail Record : < “Fail” , Master_id > Master Recovery : < “Reconnect” , Master_id , Slave_id , Replica_id ,     Message_id  > * . Message_id is null

More Related Content

What's hot

What's hot (20)

distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
Address resolution protocol (ARP)
Address resolution protocol (ARP)Address resolution protocol (ARP)
Address resolution protocol (ARP)
 
Distributed System ppt
Distributed System pptDistributed System ppt
Distributed System ppt
 
Network security - OSI Security Architecture
Network security - OSI Security ArchitectureNetwork security - OSI Security Architecture
Network security - OSI Security Architecture
 
Security in distributed systems
Security in distributed systems Security in distributed systems
Security in distributed systems
 
ARP
ARPARP
ARP
 
C I D R
C I D RC I D R
C I D R
 
Dhcp ppt
Dhcp pptDhcp ppt
Dhcp ppt
 
Distributed Transaction
Distributed TransactionDistributed Transaction
Distributed Transaction
 
Directory and discovery services
Directory and discovery servicesDirectory and discovery services
Directory and discovery services
 
IPv4 Addressing
 IPv4 Addressing   IPv4 Addressing
IPv4 Addressing
 
Subnetting Presentation
Subnetting PresentationSubnetting Presentation
Subnetting Presentation
 
Synchronization in distributed systems
Synchronization in distributed systems Synchronization in distributed systems
Synchronization in distributed systems
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
 
Network security at_osi_layers
Network security at_osi_layersNetwork security at_osi_layers
Network security at_osi_layers
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
TCP/IP Protocols
TCP/IP ProtocolsTCP/IP Protocols
TCP/IP Protocols
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Distance vector routing
Distance vector routingDistance vector routing
Distance vector routing
 
Replication in Distributed Systems
Replication in Distributed SystemsReplication in Distributed Systems
Replication in Distributed Systems
 

Similar to Data Replication in Distributed System

Cruz: Application-Transparent Distributed Checkpoint-Restart on Standard Oper...
Cruz:Application-Transparent Distributed Checkpoint-Restart on Standard Oper...Cruz:Application-Transparent Distributed Checkpoint-Restart on Standard Oper...
Cruz: Application-Transparent Distributed Checkpoint-Restart on Standard Oper...Mark J. Feldman
 
How to shutdown and power up of the netapp cluster mode storage system
How to shutdown and power up of the netapp cluster mode storage systemHow to shutdown and power up of the netapp cluster mode storage system
How to shutdown and power up of the netapp cluster mode storage systemSaroj Sahu
 
SAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA MonitoringSAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA MonitoringLinh Nguyen
 
MPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicMPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicEricsson
 
Realtime olap architecture in apache kylin 3.0
Realtime olap architecture in apache kylin 3.0Realtime olap architecture in apache kylin 3.0
Realtime olap architecture in apache kylin 3.0Shi Shao Feng
 
Automating the Hunt for Non-Obvious Sources of Latency Spreads
Automating the Hunt for Non-Obvious Sources of Latency SpreadsAutomating the Hunt for Non-Obvious Sources of Latency Spreads
Automating the Hunt for Non-Obvious Sources of Latency SpreadsScyllaDB
 
Optimizing High Performance Big Data Cancer Workflows
Optimizing High Performance Big Data Cancer WorkflowsOptimizing High Performance Big Data Cancer Workflows
Optimizing High Performance Big Data Cancer WorkflowsIvan Jimenez
 
Buiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with AkkaBuiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with AkkaJohan Andrén
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorDileep Bhandarkar
 
Logging Last Resource Optimization for Distributed Transactions in Oracle…
Logging Last Resource Optimization for Distributed Transactions in  Oracle…Logging Last Resource Optimization for Distributed Transactions in  Oracle…
Logging Last Resource Optimization for Distributed Transactions in Oracle…Gera Shegalov
 
High available energy management system
High available energy management systemHigh available energy management system
High available energy management systemJo Ee Liew
 
Realtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQRealtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQXin Wang
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- MulticoreLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- MulticoreHsien-Hsin Sean Lee, Ph.D.
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Andriy Berestovskyy
 
Logging Last Resource Optimization for Distributed Transactions in Oracle We...
Logging Last Resource Optimization for Distributed Transactions in  Oracle We...Logging Last Resource Optimization for Distributed Transactions in  Oracle We...
Logging Last Resource Optimization for Distributed Transactions in Oracle We...Gera Shegalov
 
Apache Apex - BufferServer
Apache Apex - BufferServerApache Apex - BufferServer
Apache Apex - BufferServerPradeep Dalvi
 
Synchronization linux
Synchronization linuxSynchronization linux
Synchronization linuxSusant Sahani
 

Similar to Data Replication in Distributed System (20)

Cruz: Application-Transparent Distributed Checkpoint-Restart on Standard Oper...
Cruz:Application-Transparent Distributed Checkpoint-Restart on Standard Oper...Cruz:Application-Transparent Distributed Checkpoint-Restart on Standard Oper...
Cruz: Application-Transparent Distributed Checkpoint-Restart on Standard Oper...
 
How to shutdown and power up of the netapp cluster mode storage system
How to shutdown and power up of the netapp cluster mode storage systemHow to shutdown and power up of the netapp cluster mode storage system
How to shutdown and power up of the netapp cluster mode storage system
 
SAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA MonitoringSAP HANA System Replication - Setup, Operations and HANA Monitoring
SAP HANA System Replication - Setup, Operations and HANA Monitoring
 
MPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - BasicMPLS Deployment Chapter 1 - Basic
MPLS Deployment Chapter 1 - Basic
 
13 tm adv
13 tm adv13 tm adv
13 tm adv
 
Realtime olap architecture in apache kylin 3.0
Realtime olap architecture in apache kylin 3.0Realtime olap architecture in apache kylin 3.0
Realtime olap architecture in apache kylin 3.0
 
Automating the Hunt for Non-Obvious Sources of Latency Spreads
Automating the Hunt for Non-Obvious Sources of Latency SpreadsAutomating the Hunt for Non-Obvious Sources of Latency Spreads
Automating the Hunt for Non-Obvious Sources of Latency Spreads
 
Optimizing High Performance Big Data Cancer Workflows
Optimizing High Performance Big Data Cancer WorkflowsOptimizing High Performance Big Data Cancer Workflows
Optimizing High Performance Big Data Cancer Workflows
 
Ccna Imp Guide
Ccna Imp GuideCcna Imp Guide
Ccna Imp Guide
 
Buiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with AkkaBuiilding reactive distributed systems with Akka
Buiilding reactive distributed systems with Akka
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro Processor
 
Logging Last Resource Optimization for Distributed Transactions in Oracle…
Logging Last Resource Optimization for Distributed Transactions in  Oracle…Logging Last Resource Optimization for Distributed Transactions in  Oracle…
Logging Last Resource Optimization for Distributed Transactions in Oracle…
 
High available energy management system
High available energy management systemHigh available energy management system
High available energy management system
 
Realtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQRealtime Statistics based on Apache Storm and RocketMQ
Realtime Statistics based on Apache Storm and RocketMQ
 
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- MulticoreLec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
Lec13 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Multicore
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
Rtos
RtosRtos
Rtos
 
Logging Last Resource Optimization for Distributed Transactions in Oracle We...
Logging Last Resource Optimization for Distributed Transactions in  Oracle We...Logging Last Resource Optimization for Distributed Transactions in  Oracle We...
Logging Last Resource Optimization for Distributed Transactions in Oracle We...
 
Apache Apex - BufferServer
Apache Apex - BufferServerApache Apex - BufferServer
Apache Apex - BufferServer
 
Synchronization linux
Synchronization linuxSynchronization linux
Synchronization linux
 

Recently uploaded

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 

Recently uploaded (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Data Replication in Distributed System

  • 1. Data Replication in Distributed System Ehsan Hessami Islamic Azad University Of Qazvin
  • 2. 2 kind Data Replication 1- Synchronous Replication 2PC(Two Phase Commit Protocol)Exp: 2- Asynchronous Replication 1- Primary Site Asynchronous 2- Peer-Peer Asynchronous
  • 3. Primary Site Asynchronous Client Secondary Copy Primary Copy a D b c Update and Read only Translation Lazy Update Propagation Forward Update Transactions
  • 4. Lazy master Framework Ownership ReplicaCopy 1- Primary Copy (denoted by capital Letters) Propagation 2- Secondary Copy (denoted by Lowercase Letters) Nodes 1- Master Save Primary Copy Refreshment 2- Slave Save Secondary Copy 3- Master Slave Save Primary & Secondary Copy Configuration Transactions 1- Update Transactions (T) Update Primary Copy 2- Refresh Transactions (RT) Update Secondary Copy 3- Queries (Q) Read Operation From Secondary Copy
  • 5. Lazy master Framework Ownership Defines When The Update Transaction PrimaryCopy Must be Towards The Nodes Storing its SecondaryCopy Propagation Refreshment Type of Propagation 1-immediate Configuration 2- deferred
  • 6. Lazy master Framework Ownership Defines When The Refresh Transaction Must be Start on SecondaryCopy. (immediate , deferred , wait). Propagation Refreshment The Couple Formed by The Propagation And The Trigger Mode 1-deferred-immediate Configuration 2- immediate-immediate 3- immediate-Wait
  • 7. Lazy master Framework Ownership Defines The Component node of a Replication Schema . EXP 1 Master , n Slave Propagation Refreshment Configuration
  • 8. System architecture Each Node (Slave & Master) Support DB And 3 Component : 1 – Replication Module 1-1 – Log Monitor 1-2 – Propagator 1-3 – Receiver 2 – Refresher 3 – Network interface
  • 9. System architecture Log Monitor Propagator Receiver Refresher Used to extract changes to primary copy From History Log IF Find Write Operation , write into Input Log for Propagator
  • 10. System architecture Log Monitor Propagator Receiver Refresher Each Record Have 4 Parameter (Primary ID , Field ID , Operation , New_Value). Propagator have 2 State : immediate , deferred
  • 11. System architecture Log Monitor Propagator Receiver Refresher Each Message save in Reception Log Receiver Read from Reception Log IF we have 1 Master Node then Queue is 1 .
  • 12. System architecture Log Monitor Propagator Receiver Refresher Checking the Queue for new incoming Record . Refresher is 3 kind : deferred-immediate , Immediate-immediate , Immediate_ wait
  • 13. Connect and Disconnect Each Connect and Disconnect save in Historylog . ConnectTable Showing the nodes are Connect . Each node Have ConnectTable (Node_id,Replica_id , Status) . < “Connect” , Master_id , Slave_id , Replica_id > < “Disconnect” , Master_id , Slave_id , Replica_id >
  • 14. Failure & Recovery Slave Failure : All the Connected Master Must Stop Sending Message To it Slave Recovery is Performed in 2 state : 1- < “Reconnect” , Master_id , Slave_id , Replica_id , Message_id > 2 – Searching in the Reception Log for all messages received from Master_id but not yet Processed by the Refresher .
  • 15. Failure & Recovery Master Failure : The Slave Receiver a Fail Record : < “Fail” , Master_id > Master Recovery : < “Reconnect” , Master_id , Slave_id , Replica_id , Message_id > * . Message_id is null