2. CONTENTS
Introduction
Distributed Real Time Database
Replication
Why do we need it?
Replication Model
Replication Strategies
Replication Protocols
Advantages
3. INTRODUCTION
• In real-time distributed database
systems, timeliness of results can be as
important as their correctness.
• The objective is to provide a high degree
of concurrency and thus faster average
response time without violating data
consistency
4. Distributed Real Time
Database
• Database is a collection of data items controlled
by Database Management System.
• A Distributed database is a database allocated
to multiple nodes in a distributed system, where
the database is the object of distribution.
• A Real-time database is a database system
which uses real-time processing to handle
workloads whose state is constantly changing.
5. 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.
6. Why do we need it ?
• Availability
• Performance
Middleware
Architecture
Site 1 File X
Site 2 File X
User 1
User 2
User 3Site 3 File X
Site n File X
7. Replication Model
Replication model can be described using five generic phases
• Request (RE): The client submits an operation to one (or
more) replicas.
• Server Coordination (SC): The replica servers coordinate
with each other to synchronise the execution of the
operation
• Execution (EX): The operation is executed on the replica
servers.
• Agreement Coordination (AC): The replica servers agree
on the result of the execution.
• Response (END): The outcome of the operation is
transmitted back to the client.
8. Replication Strategies
• Grey et al have categorized database replication
protocols using two parameters :
When update propagation takes place?
Who can perform updates?
9. When update propagation takes
place ?
Synchronous (Eager) Replication
It keeps all replicas exactly synchronized at all nodes
by updating all the replicas as part of one transaction
Write A
Write B
Write C
Commit
Write A
Write A
Write A
Write B
Write B
Write B
Write C
Write C
Write C
Commit
Commit
Commit
Single Node
Transaction
Three Node Eager
Transaction
10. • Asynchronous (Lazy) Replication
Each transaction updates a replica and the
update is propagated to other replicas
Write A
Write B
Write C
Commit
Write A
Write B
Write C
Commit
Write A
Write B
Write C
Commit
Write A
Write B
Write C
Commit
Single Node
Transaction
Three Node Lazy
Transaction
11. Who Can perform updates ?
Group
Any node with a copy of data item can update it, this is
often called update anywhere.
Object Group
12. • Master
Each object has a master node . Only
master can update the primary copy of the
object. All other replicas are read only.
Object
Master
Object Master
15. 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.