Consistent and Efficient Database Replication based on Group Communication Bettina Kemme School of Computer Science McGill University, Montreal.

Slides:



Advertisements
Similar presentations
Types of Distributed Database Systems
Advertisements

Serializability in Multidatabases Ramon Lawrence Dept. of Computer Science
Distributed Processing, Client/Server and Clusters
Database Replication in WAN Yi Lin McGill University Distributed Information Systems.
Exploiting Distributed Version Concurrency in a Transactional Memory Cluster Kaloian Manassiev, Madalin Mihailescu and Cristiana Amza University of Toronto,
CSE 486/586, Spring 2014 CSE 486/586 Distributed Systems Reliable Multicast Steve Ko Computer Sciences and Engineering University at Buffalo.
Concurrency Control Part 2 R&G - Chapter 17 The sequel was far better than the original! -- Nobody.
Replication. Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Distributed Databases John Ortiz. Lecture 24Distributed Databases2  Distributed Database (DDB) is a collection of interrelated databases interconnected.
Middleware based Data Replication providing Snapshot Isolation Yi Lin Bettina Kemme Marta Patiño-Martínez Ricardo Jiménez-Peris June 15, 2005.
Computer Science Lecture 18, page 1 CS677: Distributed OS Last Class: Fault Tolerance Basic concepts and failure models Failure masking using redundancy.
Distributed Systems Fall 2010 Replication Fall 20105DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Replicating Basic Components Bettina Kemme McGill University, Montreal, Canada.
Virtual Synchrony Jared Cantwell. Review Multicast Causal and total ordering Consistent Cuts Synchronized clocks Impossibility of consensus Distributed.
Database Replication techniques: a Three Parameter Classification Authors : Database Replication techniques: a Three Parameter Classification Authors :
Computer Science Lecture 14, page 1 CS677: Distributed OS Consistency and Replication Today: –Introduction –Consistency models Data-centric consistency.
CS 582 / CMPE 481 Distributed Systems
CMPT 431 Dr. Alexandra Fedorova Lecture XII: Replication.
Distributed Database Management Systems
Overview Distributed vs. decentralized Why distributed databases
Understanding Replication in Database & Distributed Systems SRDS’ Database Replication Techniques: A Three Parameter Classification M. Wiesmann F.
Transactional Services Ricardo Jiménez-Peris Marta Patiño-Martínez Technical University of Madrid 1 st Adapt Workshop 23 rd -24 th September 2002 Madrid,
Page 1 Simulating MDBS Transaction Management Protocols Ramon Lawrence, Ken Barker, Aruna Adil Simulating MDBS Transaction Management Protocols Ramon Lawrence,
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Real-Time Distributed Databases By: Chris Scardino CSC536 Monday, May 2, 2005.
Chapter 12 Distributed Database Management Systems
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 17 Client-Server Processing, Parallel Database Processing,
CMPT 401 Summer 2007 Dr. Alexandra Fedorova Lecture XII: Replication.
Distributed Systems: Client/Server Computing
Distributed Databases
Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Google∗
6.4 Data And File Replication Presenter : Jing He Instructor: Dr. Yanqing Zhang.
Replication and Consistency. Reference The Dangers of Replication and a Solution, Jim Gray, Pat Helland, Patrick O'Neil, and Dennis Shasha. In Proceedings.
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
Presented by Dr. Greg Speegle April 12,  Two-phase commit slow relative to local transaction processing  CAP Theorem  Option 1: Reduce availability.
Transaction Communications Yi Sun. Outline Transaction ACID Property Distributed transaction Two phase commit protocol Nested transaction.
Session-8 Data Management for Decision Support
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 12 Distributed Database Management Systems.
Week 5 Lecture Distributed Database Management Systems Samuel ConnSamuel Conn, Asst Professor Suggestions for using the Lecture Slides.
Distributed File System By Manshu Zhang. Outline Basic Concepts Current project Hadoop Distributed File System Future work Reference.
Distributed Database Systems Overview
Concurrency Control in Distributed Databases Gul Sabah Arif.
Preventive Replication in Database Cluster Esther Pacitti, Cedric Coulon, Patrick Valduriez, M. Tamer Özsu* LINA / INRIA – Atlas Group University of Nantes.
Applying Database Replication to Multi-player Online Games Yi Lin Bettina Kemme Marta Patiño-Martínez Ricardo Jiménez-Peris Oct 30, 2006.
Chapter 6.5 Distributed File Systems Summary Junfei Wen Fall 2013.
Databases Illuminated
1 Multiversion Reconciliation for Mobile Databases Shirish Hemanath Phatak & B.R.Badrinath Presented By Presented By Md. Abdur Rahman Md. Abdur Rahman.
Database Replication in WAN Yi Lin Supervised by: Prof. Kemme April 8, 2005.
Replication (1). Topics r Why Replication? r System Model r Consistency Models r One approach to consistency management and dealing with failures.
Ben Vandiver, Hari Balakrishnan, Barbara Liskov, and Sam Madden CSAIL, MIT Tolerating Byzantine Faults in Database Systems using Commit Barrier Scheduling.
Revisiting failure detectors Some of you asked questions about implementing consensus using S - how does it differ from reaching consensus using P. Here.
Introduction to Distributed Databases Yiwei Wu. Introduction A distributed database is a database in which portions of the database are stored on multiple.
Distributed DBMS, Query Processing and Optimization
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Highly Available Services and Transactions with Replicated Data Jason Lenthe.
Distributed File System. Outline Basic Concepts Current project Hadoop Distributed File System Future work Reference.
Topics in Distributed Databases Database System Implementation CSE 507 Some slides adapted from Navathe et. Al and Silberchatz et. Al.
Don’t be lazy, be consistent: Postgres-R, A new way to implement Database Replication Paper by Bettina Kemme and Gustavo Alonso, VLDB 2000 Presentation.
Concurrency Control A database must provide a mechanism that will ensure that all possible schedules are either conflict or view serializable, and are.
6.4 Data and File Replication
Chapter 10 Transaction Management and Concurrency Control
Outline Introduction Background Distributed DBMS Architecture
Introduction of Week 13 Return assignment 11-1 and 3-1-5
Distributed Transactions
Distributed Database Management Systems
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Last Class: Fault Tolerance
Distributed Databases
Presentation transcript:

Consistent and Efficient Database Replication based on Group Communication Bettina Kemme School of Computer Science McGill University, Montreal

Database Replication, Bettina Kemme, Feb Outline q State of the Art in Database Replication q Key Points of our Approach q Overview of the Algorithms q Implementation Issues q Performance Results q Ongoing Work

Database Replication, Bettina Kemme, Feb Replication -- Why? Fault-Tolerance: Take-Over Scale-Up: cluster instead of bigger mainframe

Database Replication, Bettina Kemme, Feb Replica Control: Research and Reality Eager Lazy Primary Copy Update Everywhere Globally correct Too expensive Deadlocks Inconsistent reads Configuration Restrictions Feasible Inconsistent reads Reconciliation Feasible in some applications UPDATE WHEN UPDATE WHERE Quorum/ROWA Oracle Synchr. Repl Placement Strat. Sybase/IBM/Oracle Placement Strategies Weak Consistency Sybase/IBM/Oracle

Database Replication, Bettina Kemme, Feb Requirements q Develop and apply appropriate techniques in order to avoid current limitations of eager update everywhere approaches I Keep flexibility of update everywhere l no restrictions on type of transactions and where to execute them I Consistency and fault-tolerance of eager replication I Good Performance l response time + throughput q Straightforward, Implementable Solution I Easy integration in existing systems

Database Replication, Bettina Kemme, Feb Response Time and Message Overhead q Goal: Reduce number of messages per transaction I reduce response time I reduce message overhead q Solution I local execution of transaction I bundle writes and send them in a single message at the end of the transaction (as done in lazy schemes) transaction with local execution and write set propagation at the end transaction with individual remote writes Write Read central transaction

Database Replication, Bettina Kemme, Feb Ordering Transactions q Before: uncoordinated message delivery; danger of deadlocks q Now: pre-order txns by using total order multicast of Group Communication q Before: 2-phase- commit q Now: Independent execution at the different sites Total Order

Database Replication, Bettina Kemme, Feb Group Communication Systems q Group Communication: I Multicast I Delivery order (FIFO, causal, total, etc.) I Reliable delivery: on all nodes vs. on all available nodes I Membership control I ISIS, Totem, Transis, Phoenix, Horus, Ensemble,... q Goal: Exploit rich semantics of group communication on a low level of the software hierarchy

Database Replication, Bettina Kemme, Feb Replica Control based on 2Phase Locking Node 1 Local Transaction Write Phase commit write set Node 2 Remote Transaction Node 3 Remote Transaction Lock Phase Local Phase Commit Send Phase Phase Write Phase Lock Phase q Transaction is first performed locally at a single site. q Writes are sent in one message to all sites at the end of transaction. q Write messages are totally ordered. q Serialization order obeys total order. Local Phase Send Phase WS

Database Replication, Bettina Kemme, Feb Concurrency Control q One possible Solution: Given a transaction T I Local Phase: T acquires standard local read and write locks I Send Phase: Send write set using total order multicast I Upon reception of write set of T on local node l Commit Phase: multicast commit message I Upon reception of write set of T on remote node l Lock Phase: request all write locks in a single step; if there is a local transaction T’ with conflicting lock and T’ is still in local phase or send phase, abort T’. If T’ in send phase, multicast abort l Write Phase: apply updates of T I Upon reception of commit/abort message of T on remote node, terminate T accordingly q For two transactions of same node: 2 phase locking. q For concurrent transactions of different nodes: optimistic scheme with early conflict detection: when write set of one transaction is delivered the conflict is detected. q Adjustment to other concurrency control schemes possible

Database Replication, Bettina Kemme, Feb Message Delivery Guarantees q Uniform-Reliable Delivery I If a site delivers a message, all non-faulty sites deliver the message I Correctness on all sites (faulty or non-faulty): when a transaction commits at any site then it commits at all non-faulty sites I High message delay q Reliable Delivery I If a non-faulty site (non-faulty for a sufficiently long time) delivers a message it is delivered at all non-faulty sites. I Correctness in the failure-free case I In case of failures: l all non-faulty sites commit the same set of transactions l a transaction might be committed at a faulty site (shortly before failure) and it is not committed at the other sites. I Low message delay

Database Replication, Bettina Kemme, Feb A Suite of Replication Protocols Uniform ReliableReliable Serializability Cursor Stability Snapshot Isolation Hybrid SER-UR CS-UR SI-UR HYB-UR SER - R CS - R SI - R HYB - R q The solutions provide I flexibility I accepted correctness criteria

Database Replication, Bettina Kemme, Feb Implementation q Integration of our replica control approach into the database system PostgreSQL q Purpose - We wanted to answer the following questions I Can the abstract protocols really be mapped to concrete algorithms in a relational database? I How difficult is it to integrate the replication tool into a real database system? I What is the performance in a real cluster environment?

Database Replication, Bettina Kemme, Feb Architecture of Postgres-R Group Communication: Ensemble Client Postmaster Local Txn Replication Mgr Remote Txn Server original PostgreSQL Remote Txn Remote Txn

Database Replication, Bettina Kemme, Feb Write Set Messages UPDATE employee SET salary = salary+100 WHERE salary < 2000 Parser/ Optimizer Executor SQL- Statement Set of physical records q Send SQL statements and reexecute at all sites I Simple I Small message size I High execution overhead on all site I Problem with locks for implicit reads in statement q Send physical updates and only apply changes I Opposite characteristics than sending statements

Database Replication, Bettina Kemme, Feb Gain of sending and applying physical changes

Database Replication, Bettina Kemme, Feb Comparison with standard distr. locking q Workload: 10 transactions per second q 5 concurrent clients (each submitting a transaction each 500 milliseconds) q For all experiments: I Database: 10 relations a 1000 tuples I Transactions: 10 updates per transaction

Database Replication, Bettina Kemme, Feb Response Time vs. Throughput

Database Replication, Bettina Kemme, Feb Scalability with fixed workload q Workload: I 1 update transaction per second per server I 14 queries per second per server q 3 clients per server

Database Replication, Bettina Kemme, Feb Differently loaded Nodes q Nodes: 10 nodes q 15 clients in total

Database Replication, Bettina Kemme, Feb Conclusions q Eager, update everywhere replication is feasible (at least in clusters) by using adequate techniques I As few messages as possible within transaction boundaries I As few synchronization points as possible I Complete transaction execution only at one site I Simple to adjust to existing concurrency control mechanisms

Database Replication, Bettina Kemme, Feb Current Work q Recovery under various failure models q Development of a middleware replication tool q Development of group communication protocols that better support the needs of the database system I Ordering semantics I Failure models q Building a complete system I Adding other replica control protocols I System administration I Partial replication functionality