Relaxed Currency Serializability for Middle-Tier Caching and Replication Philip A. Bernstein, Alan Fekete, Hongfei Guo, Raghu Ramakrishnan, Pradeep Tamma.

Slides:



Advertisements
Similar presentations
Serializability in Multidatabases Ramon Lawrence Dept. of Computer Science
Advertisements

Database Systems (資料庫系統)
Unit 9 Concurrency Control. 9-2 Wei-Pang Yang, Information Management, NDHU Content  9.1 Introduction  9.2 Locking Technique  9.3 Optimistic Concurrency.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Transaction Management Overview Chapter 16.
1 Concurrency Control Chapter Conflict Serializable Schedules  Two actions are in conflict if  they operate on the same DB item,  they belong.
1 Lecture 11: Transactions: Concurrency. 2 Overview Transactions Concurrency Control Locking Transactions in SQL.
Transaction Management: Concurrency Control CS634 Class 17, Apr 7, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Chapter 15: Transactions Transaction Concept Transaction Concept Concurrent Executions Concurrent Executions Serializability Serializability Testing for.
Principles of Transaction Management. Outline Transaction concepts & protocols Performance impact of concurrency control Performance tuning.
School of Information Technologies Hyungsoo Jung (presenter) Hyuck Han* Alan Fekete Uwe Röhm Serializable Snapshot Isolation for Replicated Databases in.
Cs4432concurrency control1 CS4432: Database Systems II Lecture #22 Concurrency Control: Locking-based Protocols Professor Elke A. Rundensteiner.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Concurrency Control Chapter 17 Sections
Serializable Isolation for Snapshot Databases Michael J. Cahill, Uwe Röhm, and Alan D. Fekete University of Sydney ACM Transactions on Database Systems.
1 CS216 Advanced Database Systems Shivnath Babu Notes 11: Concurrency Control.
(c) Oded Shmueli Transactions Lecture 1: Introduction (Chapter 1, BHG) Modeling DB Systems.
Lecture 11 Recoverability. 2 Serializability identifies schedules that maintain database consistency, assuming no transaction fails. Could also examine.
Concurrency Control Nate Nystrom CS 632 February 6, 2001.
©Silberschatz, Korth and Sudarshan16.1Database System Concepts 3 rd Edition Chapter 16: Concurrency Control Lock-Based Protocols Timestamp-Based Protocols.
CS 582 / CMPE 481 Distributed Systems
Session - 14 CONCURRENCY CONTROL CONCURRENCY TECHNIQUES Matakuliah: M0184 / Pengolahan Data Distribusi Tahun: 2005 Versi:
Transaction Processing: Concurrency and Serializability 10/4/05.
Transactions or Concurrency Control. Introduction A program which operates on a DB performs 2 kinds of operations: –Access to the Database (Read/Write)
CS4432transaction management1 CS4432: Database Systems II Lecture #23 Transaction Management Professor Elke A. Rundensteiner.
System Catalogue v Stores data that describes each database v meta-data: – conceptual, logical, physical schema – mapping between schemata – info for query.
Alternative Concurrency Control Methods R&G - Chapter 17.
CS 603 Data Replication February 25, Data Replication: Why? Fault Tolerance –Hot backup –Catastrophic failure Performance –Parallelism –Decreased.
Concurrency Control In Dynamic Database Systems Laurel Jones.
AN OPTIMISTIC CONCURRENCY CONTROL ALGORITHM FOR MOBILE AD-HOC NETWORK DATABASES Brendan Walker.
Concurrency Control in Distributed Databases. By :- Rishikesh Mandvikar rmandvik[at]engr.smu.edu May 1, 2004.
School of Information Technologies Michael Cahill 1, Uwe Röhm and Alan Fekete School of IT, University of Sydney {mjc, roehm, Serializable.
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
1 Transactions Chapter Transactions A transaction is: a logical unit of work a sequence of steps to accomplish a single task Can have multiple.
Replicated Databases. Reading Textbook: Ch.13 Textbook: Ch.13 FarkasCSCE Spring
1 Concurrency Control II: Locking and Isolation Levels.
Transactions. What is it? Transaction - a logical unit of database processing Motivation - want consistent change of state in data Transactions developed.
1 Concurrency Control Chapter Conflict Serializable Schedules  Two schedules are conflict equivalent if:  Involve the same actions of the same.
Concurrency Control in Distributed Database Systems with Read-Only replication Anne Denton and Vijayakumar Shanmugasundaram.
1 Multiversion Reconciliation for Mobile Databases Shirish Hemanath Phatak & B.R.Badrinath Presented By Presented By Md. Abdur Rahman Md. Abdur Rahman.
Transactions and Concurrency Control. Concurrent Accesses to an Object Multiple threads Atomic operations Thread communication Fairness.
Page 1 Concurrency Control Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
1 Concurrency Control Lecture 22 Ramakrishnan - Chapter 19.
Transaction Management Overview. Transactions Concurrent execution of user programs is essential for good DBMS performance. – Because disk accesses are.
Concurrency Control Introduction Lock-Based Protocols
9/27/05© 2005 Microsoft Corporation1 Relaxed-Currency Serializability Philip A. Bernstein, Microsoft Research Alan Fekete, Univ. of Sydney Raghu Ramakrishnan,
1 Advanced Database Concepts Transaction Management and Concurrency Control.
Timestamp-based Concurrency Control
1 Controlled concurrency Now we start looking at what kind of concurrency we should allow We first look at uncontrolled concurrency and see what happens.
Database Isolation Levels. Reading Database Isolation Levels, lecture notes by Dr. A. Fekete, resentation/AustralianComputer.
Jinze Liu. ACID Atomicity: TX’s are either completely done or not done at all Consistency: TX’s should leave the database in a consistent state Isolation:
1 Concurrency Control. 2 Why Have Concurrent Processes? v Better transaction throughput, response time v Done via better utilization of resources: –While.
Database Transaction Abstraction I
Concurrency Control Techniques
Real-Time Databases and Data Services
CS216: Data-Intensive Computing Systems
Transaction Management
Outline Introduction Background Distributed DBMS Architecture
Transaction Management
Concurrency Control II (OCC, MVCC)
Concurrency Control Chapter 17
Lecture 21: Concurrency & Locking
Concurrency Control WXES 2103 Database.
Distributed Database Management Systems
Distributed Transactions
Concurrency Control Chapter 17
Lecture 22: Intro to Transactions & Logging IV
Transaction Management
Submitted to Dr. Badie Sartawi Submitted by Nizar Handal Course
Concurrency control (OCC and MVCC)
Database Systems (資料庫系統)
Database Systems (資料庫系統)
Presentation transcript:

Relaxed Currency Serializability for Middle-Tier Caching and Replication Philip A. Bernstein, Alan Fekete, Hongfei Guo, Raghu Ramakrishnan, Pradeep Tamma Presented by Hawk Lin, 林宗立, D Gerome Wu, 吳文傑, R Date: 2014/06/03

Overview Introduction RC Serializability BSA model Correctness Performance model Experiments Conclusion

Objective Heuristic caching strategies can help for performance enhancement but not in sync with DB in time. The algorithm of concurrency control introduced by the paper using “freshness constraint” information for read operation to specify how fresh a copy must be in order to be read. Defining the model for the algorithms to ensure several of the most interesting freshness constraints.

Background Copies vs. freshness vs. consistent Example: One-copy serializability

Proof Relaxed Currency Serializability that accounts for out-of- date reads that are justified by user-specified freshness constraints. Freshness constraint: up-to-date a copy must be in order to be read. Up-to-date-ness may be relative to read-time, reader’s commit-time, or freshness of copies of other items that are read Novel concurrency control protocols accumulate constraints on the updater’s time, which can be checked at read-time or as part of commit processing. A detailed simulation study of the protocols shows that performance is similar to the weakest protocol used in practice, read-committed, which offers no freshness guarantee.

RC Serializability Serializability Theory –An execution is correct if and only if it is equivalent to some serial execution of the transactions. –Requires a weaker correctness property when it reads stale values. Relaxed-currency (RC) serializable –one-copy multiversion database –correct execution of the ideal system to be a serial multiversion execution

The physical system model Read Write Commit Abort

Freshness constraints B. Time-Bound and Value-Bound Constraints –B1. Time-Bound Constraints. bound(x:10) –B2. Value-Bound Constraints. bound(x:10%) D. “Drift” Constraints on multiple data items. –D1. Snapshot consistency. snapshot(S) –D2. Limited Time-Drift. drift(S, b) –D3. Limited Aggregate Value Drift. drift(S, AGG, b%, w) M. Multi-statement Constraints –session level

Enforcing RC serializability Enforcing RC-serializability: serializable and satisfy freshness constraints Enforcing RC-serializabiity is not trivial because constraints is not independent and hard to proof. Need prove for RC-serializability can adopt to have same behavior of multiversion system and replicated data system.

Baseline Synchronization Algorithm

Algorithms for Ensuring Freshness Algorithm BSA-FC –Property VT The valid interval of the value held in a copy xA must include the closed interval [last- modified t, valid-till t’’]. t’>t’’>t –Valid interval: half-open [last-modified t, next larger last-modified t’) –Time Bound bound(x:b): Add the constraint “ts(Ti) ≤ vt+b” –Limited Time-Drift Bound drift(S, b):Add the constraint “max(last-modified(S)) < min(valid-till(S))+b”

Algorithms for Ensuring Freshness Variants of BSA-FC –constraint vt+b replaced by [xA, lm, b] where lm is last-modified(xA) of the value read, vt=lm(xA) –Or using vt(xM) for last-modified(xA), if last- modified(xM)=last-modified(xA). –Two phase commit: check if modifed(xA) and valid- till(xA) be changed, if yes, update new value, if not, go to next phase.

Correctness Prove that BSA-FC is both correct the following in an equivalent ideal system –timestamp assignment –freshness constraint

Correctness(cont.) Bare-RCSR: A physical history H that is equivalent to some serial ideal history H’ RCSG: RC serialization graph

Correctness(cont.) Theorem 1: For any primary-copy physical history H, if RCSG(H) is acyclic then H is bare-RCSR. Theorem 2: For every physical history H produced by BSA, RCSG(H) is acyclic. Theorem 3: BSA-FC is RCSR.

Correctness(cont.) Combine 1&2, every physical history H produced by BSA is bare-RCSR, then a valid timestamp assignment for H is also valid for an ideal history equivalent to H

Correctness(cont.) Time-bound constraints: for read op. r[x], let a be the next version, if a is the last version, satisfied. If not, ts(T) < ts(a)+b must be true. by Property VT, vt <= ts(a), as ts(T) < vt+b is satisfied, ts(T) < ts(a)+b

Correctness(cont.) Time-drift constraint: |tx’’ – ty’| <= b need to be satisfied

Performance Model Single-site logical queuing model –Closed queuing model Master-cache logical queuing model –One master and multiple caches

Performance Model(cont.)

Experiments Single-site experiments –Comparing different protocols with respect to data and resource contention Master-cache experiments –Evaluate the performance gains due to cache RW Scalability experiments –Scale-out and scale-up Master-Cache vs Single Site –Caching configurations vs single-site configurations

Experiments(cont.) Strict 2PL –For read & write, obtain locks –Hold all locks until end of transaction. –Guarantees serializability and recoverable schedule. Read Committed –Only keeps write lock until the end of transaction.

Single-site

Master-cache RO-2PL: Strict 2PL at master, BSA-FC at cache, cache handles read-only Xactn. RW-2PL: cache also handles reads in read-write Xactn RO-BSAFC/RW-BSAFC: BSAFC at master

Master-cache(b=0)

Master-cache(b=5)

Master-cache(b=10)

Refresh Int. vs Currency Bound

Scalibility

Master-cache vs Single-site

Conclusion RC-serializability, which requires an execution to be equivalent to a serial execution on a multiversion database where the freshness constraints of reads are satisfied. Simulation study that shows the new algorithms perform like Read Committed for reasonable freshness levels.