![Page 1: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/1.jpg)
A Seminar on
Replication in Distributed Real Time Database
Presented By
Ashish Upadhyay, CSE,III Yr.
![Page 2: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/2.jpg)
CONTENTS
Introduction
Distributed Real Time Database
Replication
Why do we need it?
Replication Model
Replication Strategies
Replication Protocols
Advantages
![Page 3: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/3.jpg)
INTRODUCTION
• In real-time distributed databasesystems, timeliness of results can be asimportant as their correctness.
• The objective is to provide a high degreeof concurrency and thus faster averageresponse time without violating dataconsistency
![Page 4: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/4.jpg)
Distributed Real Time Database
• Database is a collection of data items controlledby Database Management System.
• A Distributed database is a database allocatedto multiple nodes in a distributed system, wherethe database is the object of distribution.
• A Real-time database is a database systemwhich uses real-time processing to handleworkloads whose state is constantly changing.
![Page 5: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/5.jpg)
Data Replication
•A strategy in which multiple copies of some data are stored at multiple sites.
•A technique by which database can meet the demand of real time application.
![Page 6: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/6.jpg)
Why do we need it ?
• Availability
• Performance
Middleware Architecture
Site 1 File XSite 2 File X
User 1User 2
User 3Site 3 File XSite n File X
![Page 7: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/7.jpg)
Replication ModelReplication model can be described using five generic phases
• Request (RE): The client submits an operation to one (ormore) replicas.
• Server Coordination (SC): The replica servers coordinatewith each other to synchronise the execution of theoperation
• Execution (EX): The operation is executed on the replicaservers.
• Agreement Coordination (AC): The replica servers agreeon the result of the execution.
• Response (END): The outcome of the operation istransmitted back to the client.
![Page 8: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/8.jpg)
Replication Strategies
• Grey et al have categorized database replicationprotocols using two parameters :
When update propagation takes place?
Who can perform updates?
![Page 9: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/9.jpg)
When update propagation takes place ?Synchronous (Eager) Replication
It keeps all replicas exactly synchronized at all nodesby updating all the replicas as part of one transaction
Write AWrite BWrite CCommit
Write AWrite A
Write AWrite B
Write BWrite B
Write CWrite C
Write CCommit
CommitCommit
Single NodeTransaction
Three Node EagerTransaction
![Page 10: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/10.jpg)
• Asynchronous (Lazy) Replication
Each transaction updates a replica and the update is propagated to other replicas
Write AWrite BWrite CCommit
Write AWrite BWrite CCommit
Write AWrite BWrite CCommit
Write AWrite BWrite CCommit
Single NodeTransaction
Three Node LazyTransaction
![Page 11: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/11.jpg)
Who Can perform updates ?Group
Any node with a copy of data item can update it, this is often called update anywhere.
Object Group
![Page 12: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/12.jpg)
• Master
Each object has a master node . Only master can update the primary copy of the object. All other replicas are read only.
ObjectMaster
Object Master
![Page 13: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/13.jpg)
Replication Protocols
• Eager Primary Key Replication
• Eager Update Everywhere Replication
• Lazy Primary Key
• Lazy Update Everywhere
![Page 14: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/14.jpg)
Advantages
• Availability
• Increased parallelism
• Less Data Movement over Network
![Page 15: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/15.jpg)
Conclusion
• Replication is need of hour.
• We can achieve replication in real time distributed database using any of the discussed protocols.
• Each protocol is differentiated on behalf of time execution and consistency in transaction.
• Area of active research.
![Page 16: Replication in Distributed Real Time Database](https://reader031.vdocuments.us/reader031/viewer/2022020218/55a619341a28abd1098b4584/html5/thumbnails/16.jpg)
THANK YOU
QUERY?