16
A Seminar on Replication in Distributed Real Time Database Presented By Ashish Upadhyay, CSE,III Yr.

Replication in Distributed Real Time Database

Embed Size (px)

Citation preview

Page 1: Replication in Distributed Real Time Database

A Seminar on

Replication in Distributed Real Time Database

Presented By

Ashish Upadhyay, CSE,III Yr.

Page 2: Replication in Distributed Real Time Database

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

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

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

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

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

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

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

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

• 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

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

• 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

Replication Protocols

• Eager Primary Key Replication

• Eager Update Everywhere Replication

• Lazy Primary Key

• Lazy Update Everywhere

Page 14: Replication in Distributed Real Time Database

Advantages

• Availability

• Increased parallelism

• Less Data Movement over Network

Page 15: Replication in Distributed Real Time Database

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

THANK YOU

QUERY?