Mutual consistency, what for? Replication. Data replication, consistency models & protocols. Difficulties. Execution Model.

Similar documents
SCALABLE CONSISTENCY AND TRANSACTION MODELS

Replication in Distributed Systems

CS6450: Distributed Systems Lecture 11. Ryan Stutsman

殷亚凤. Consistency and Replication. Distributed Systems [7]

Lecture 6 Consistency and Replication

Computing Parable. The Archery Teacher. Courtesy: S. Keshav, U. Waterloo. Computer Science. Lecture 16, page 1

Data Modeling and Databases Ch 14: Data Replication. Gustavo Alonso, Ce Zhang Systems Group Department of Computer Science ETH Zürich

NoSQL systems: sharding, replication and consistency. Riccardo Torlone Università Roma Tre

Large-Scale Key-Value Stores Eventual Consistency Marco Serafini

CSE 5306 Distributed Systems. Consistency and Replication

Consistency and Replication

Consistency and Replication (part b)

11. Replication. Motivation

DISTRIBUTED COMPUTER SYSTEMS

Replication and Consistency. Fall 2010 Jussi Kangasharju

CONSISTENT FOCUS. Building reliable distributed systems at a worldwide scale demands trade-offs between consistency and availability.

Chapter 4: Distributed Systems: Replication and Consistency. Fall 2013 Jussi Kangasharju

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

Lecture XII: Replication

Google File System, Replication. Amin Vahdat CSE 123b May 23, 2006

Module 7 - Replication

4/9/2018 Week 13-A Sangmi Lee Pallickara. CS435 Introduction to Big Data Spring 2018 Colorado State University. FAQs. Architecture of GFS

CSE 444: Database Internals. Lecture 25 Replication

CSE 5306 Distributed Systems

Modern Database Concepts

Chapter 11 - Data Replication Middleware

Consistency and Replication

11/5/2018 Week 12-A Sangmi Lee Pallickara. CS435 Introduction to Big Data FALL 2018 Colorado State University

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Databases. Laboratorio de sistemas distribuidos. Universidad Politécnica de Madrid (UPM)

On the Study of Different Approaches to Database Replication in the Cloud

Building Consistent Transactions with Inconsistent Replication

10. Replication. CSEP 545 Transaction Processing Philip A. Bernstein Sameh Elnikety. Copyright 2012 Philip A. Bernstein

CSE 544 Principles of Database Management Systems. Alvin Cheung Fall 2015 Lecture 14 Distributed Transactions

Distributed Systems (5DV147)

10. Replication. CSEP 545 Transaction Processing Philip A. Bernstein. Copyright 2003 Philip A. Bernstein. Outline

CS Amazon Dynamo

Replication and Consistency

Important Lessons. Today's Lecture. Two Views of Distributed Systems

Coordination-Free Computations. Christopher Meiklejohn

Basic vs. Reliable Multicast

Chapter 7 Consistency And Replication

Report to Brewer s original presentation of his CAP Theorem at the Symposium on Principles of Distributed Computing (PODC) 2000

CS6450: Distributed Systems Lecture 15. Ryan Stutsman

Distributed Systems COMP 212. Revision 2 Othon Michail

Brewer's Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services

Distributed Systems. replication Johan Montelius ID2201. Distributed Systems ID2201

Consistency and Replication. Why replicate?

Strong Consistency & CAP Theorem

CS5412: ANATOMY OF A CLOUD

CSE 444: Database Internals. Section 9: 2-Phase Commit and Replication

Introduction to Database Replication

Consistency & Replication

The CAP theorem. The bad, the good and the ugly. Michael Pfeiffer Advanced Networking Technologies FG Telematik/Rechnernetze TU Ilmenau

Consistency and Replication

DISTRIBUTED EVENTUALLY CONSISTENT COMPUTATIONS

Consistency and Replication. Some slides are from Prof. Jalal Y. Kawash at Univ. of Calgary

Distributed Systems: Consistency and Replication

CISC 7610 Lecture 5 Distributed multimedia databases. Topics: Scaling up vs out Replication Partitioning CAP Theorem NoSQL NewSQL

SCALABLE CONSISTENCY AND TRANSACTION MODELS THANKS TO M. GROSSNIKLAUS

Important Lessons. A Distributed Algorithm (2) Today's Lecture - Replication

Strong Eventual Consistency and CRDTs

DrRobert N. M. Watson

Distributed KIDS Labs 1

Big Data Management and NoSQL Databases

Replica Placement. Replica Placement

Scaling Database Systems. COSC 404 Database System Implementation Scaling Databases Distribution, Parallelism, Virtualization

Distributed Data Management Replication

DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S. TANENBAUM MAARTEN VAN STEEN. Chapter 7 Consistency And Replication

Distributed Systems Principles and Paradigms. Chapter 07: Consistency & Replication

Dynamo: Amazon s Highly Available Key-value Store. ID2210-VT13 Slides by Tallat M. Shafaat

Consistency and Replication 1/62

Distributed Systems. Lec 10: Distributed File Systems GFS. Slide acks: Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung

Strong Eventual Consistency and CRDTs

Last Class: Web Caching. Today: More on Consistency

Database Replication: A Tutorial

Introduction to Distributed Data Systems

Transaction Management using Causal Snapshot Isolation in Partially Replicated Databases

CAP Theorem. March 26, Thanks to Arvind K., Dong W., and Mihir N. for slides.

Replication & Consistency Part II. CS403/534 Distributed Systems Erkay Savas Sabanci University

Outline. INF3190:Distributed Systems - Examples. Last week: Definitions Transparencies Challenges&pitfalls Architecturalstyles

Transaction Management using Causal Snapshot Isolation in Partially Replicated Databases. Technical Report

Data Consistency Now and Then

Cost Reduction of Replicated Data in Distributed Database System

10. Replication. Motivation

Database Replication

Conflict-free Replicated Data Types in Practice

Distributed Systems. Day 13: Distributed Transaction. To Be or Not to Be Distributed.. Transactions

Cache Coherence in Distributed and Replicated Transactional Memory Systems. Technical Report RT/4/2009

Transactions and ACID

The Replication Technology in E-learning Systems

MySQL Group Replication. Bogdan Kecman MySQL Principal Technical Engineer

There is a tempta7on to say it is really used, it must be good

CMU SCS CMU SCS Who: What: When: Where: Why: CMU SCS

Integrity in Distributed Databases

Last time. Distributed systems Lecture 6: Elections, distributed transactions, and replication. DrRobert N. M. Watson

CS-580K/480K Advanced Topics in Cloud Computing. NoSQL Database

CIT 668: System Architecture. Distributed Databases

TIBCO StreamBase 10 Distributed Computing and High Availability. November 2017

Transcription:

Replication Data replication, consistency models & protocols C. L. Roncancio - S. Drapeau Grenoble INP Ensimag / LIG - Obeo 1 Data and process Focus on data: several physical of one logical object What for? Performances, availability, reliability Scalability Application requirements @Drapeau & Roncancio 2 Execution Model There are physical of logical objects in the system. Operations are specified on logical objects, but translated to operate on physical objects. One-copy equivalence The effect of transactions performed by clients on replicated objects should be the same as if they had been performed on a single set of objects. Write(x) x Logical data item Write(x 1 ) Write(x 2 ) Write(x n ) Difficulties Transparency of replication Global coherency Mutual consistency among Transactional coherency Mutual consistency Cost Impact on the availability M. T. Özsu & P. Valduriez x 1 x 2 x n Physical data item (replicas, ) @Drapeau & Roncancio 4 Widely used! Distributed systems! Parallelism: fragmentation (sharding) & replication! Contexts with few conflicting updates! Data warehouses, read only systems.. Mutual consistency, what for? Weak High No Many protocols with different " performances " fault tolerance guaranties " transparency " Programming difficulties " Consistency Performance Availability/reliability Strong Medium Full @Drapeau & Roncancio 5 Drapeau & Roncancio, notes de cours 6 1

Several aspects Application Notions from distributed systems Consistency model Consistency perceived by the programmers/users Replication Replication Code Code non non fonctionnel fonctionnel Concurrency Duplication control Gestion Duplication de la concurrence Gestion Tolérance de la aux concurrence fautes Tolérance Etc. aux fautes Other aspects Etc. Fault tolerance @Drapeau & Roncancio 7 Consistency protocol How the system insures de consistency model Degree of synchronization of the Update propagation, invalidation @Drapeau & Roncancio 8 Types of replication Symmetric replication Symmetric Updates on any copy Asymmetric Updates on some selected Other are read-only Snapshots Materialized views Master1 u3(i) Master2 u3(i) Master3 u3(i) @Drapeau & Roncancio 9 @Drapeau & Roncancio 10 Asymmetric replication (1) Asymmetric replication (2) slave2 Slave1 master1 slave3 Master Slave2 master2 slave1 slave3 @Drapeau & Roncancio 11 temps @Drapeau & Roncancio 12 2

Update propagation (1) Update propagation (2) Eager Update of the in a single transaction Synchronous Lazy Update of the in separate transactions Asynchronous Eager Symmetric master1 master2 Asymmetric master slave Lazy master1 master2 master slave @Drapeau & Roncancio 13 @Drapeau & Roncancio 14 One-copy serializability (1SR) The execution of the transactions is equivalent to a sequential execution on non replicated data Eager and lazy strategies @Drapeau & Roncancio 15 Mutual consistency Strong consistency When reading any copy the user gets a value including all the preceding updates Weak consistency Copies may not have the last value but all updates will be eventually propagated to all the Eventual consistency: will converge to a single value in a finite time @Drapeau & Roncancio 16 Update propagation strategies Eager Full synchronization Synchronization of available Quorum Lazy Master / slaves Master / secondary Lazy asymmetric (independent) Full synchronization All the are updated in a synchronous way Atomic update of the 2PC, Concurrency control requirements @Drapeau & Roncancio 17 @Drapeau & Roncancio 18 3

Synchronization of available All the available are updated in a synchronous way Asynchronous update of the unavailable Invariant: available are up-to-date Use of 2PC Some are not up-to-date Quorum Synchronous update of a quorum of Other are updated in asynchronously QR + QW > N QW > N/2 Impatiente Invariant: a quorum of is up-to-date @Drapeau & Roncancio 19 @Drapeau & Roncancio 20 Master/slaves Updates on the master copy Asynchronous update of the slaves Invariant: master copy up-to-date Master/secondary Updates on the master copy Synchronous update of a secondary copy (fault tolerance of the master) Asynchronous update of the other slaves Static / dynamic @Drapeau & Roncancio 21 @Drapeau & Roncancio 22 Lazy asymmetric (independent) Updates everywhere Divergence of the Reconciliation algorithms Invariant no warranty on the value of the Applications in large scale and mobile systems Paresseuse Update detection Log based Analyzing the system logs Event based General approach Part of the transaction @Drapeau & Roncancio 23 @Drapeau & Roncancio 24 4

Update propagation Approaches Value: total, delta Transaction replication Initiative Push / Pull Replication & adaptation Applications Non functional context transactional, shared memory, cache, cloud Replication protocols Partial, full Static, dynamic @Drapeau & Roncancio 25 @Drapeau & Roncancio 26 Examples adapting consistency The price of the items (strong consistency) Data about the products sold (eventual with constraints) Credit card information (strong consistency) Data of customer profiles (eventual with constraints) Records on user s preferences (weak consistency) Logging information (weak consistency) Examples adapting consistency Time Policy Numeric Policies Demarcation policy Pay only when it matters @Drapeau & Roncancio 27 @Drapeau & Roncancio 28 CAP theorem CAP theorem (2) Brewer s conjencture, Symposium on Principles of Distributed Computing, PODC, 2000 Proved by Seth Gilbert & Nancy Lynch, 2002 Consistency: all nodes see the same data at the same time Availability: a guarantee that every request receives a response about whether it was successful or failed Partition Tolerance: the system continues to operate despite arbitrary message loss or failure of part of the system Distributed systems cannot satisfy all three of these guarantees at the same time. @Drapeau & Roncancio 29 @Drapeau & Roncancio 30 5

BASE Transactions Basically Available, Soft state, Eventual consistency Basically Available : response to any request but, that response could still be failure to obtain the requested data or the data may be in an inconsistent Soft state: the state of the system could change over time, so even during times without input there may be changes going on due to eventual consistency Eventual consistency: the system will eventually become consistent once it stops receiving input Eventual consistency If no new updates are made to the object, eventually all access will return the last updated value Read your writes Monotonic read & Monotonic write @Drapeau & Roncancio 32 Conclusion on replication Important issue Performances, availability, fault tolerance Transparency Main aspects of replication What, when, where Consistency model @Drapeau & Roncancio 34 6