slide1 l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolation without Modification of Database Server PowerPoint Presentation
Download Presentation
Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolation without Modification of Database Server

Loading in 2 Seconds...

play fullscreen
1 / 21

Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolation without Modification of Database Server - PowerPoint PPT Presentation


  • 148 Views
  • Uploaded on

Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolation without Modification of Database Servers. 2009.8.27 The University of Tokyo Takeshi MISHIMA and Hiroshi NAKAMURA. Introduction. Several database replication approaches have been proposed

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolation without Modification of Database Server' - markku


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Pangea: An Eager Database Replication Middleware guaranteeing Snapshot Isolationwithout Modification of Database Servers

2009.8.27

The University of Tokyo

Takeshi MISHIMA and Hiroshi NAKAMURA

introduction
Introduction
  • Several database replication approaches have been proposed
  • Is database replication a solved problem?
    • No! Few approaches are cost-effective
  • Most database replication approaches need to modify database servers
    • The code is large and complex: too expensive

replication functionalities

database servers (replicas)

introduction3
Introduction
  • Several database replication approaches have been proposed
  • Is database replication a solved problem?
    • No! Few approaches are cost-effective
  • Most database replication approaches need to modify database servers
    • The code is large and complex: too expensive

replication functionalities

low cost

middleware

flexibility

maintenancability

database servers (replicas)

disadvantages of existing eager replication middlewares
Disadvantages of existing eager replication middlewares

Non-conflicting write operation

cannot be executed concurrently

Table-level

lock

Wk

Wi

Wi

Wi

middleware

Table-level locking decreases the performance

our proposal
Our proposal
  • Pangea: a new eager replication middleware
    • Guarantees snapshot isolation (SI)
    • Provides tuple-level concurrency control

Assumption

Wi and Wj conflict

Wk does not conflict

Wj

Wj

Wj

Wi

Wi

Wi

Wk

Wk

Wk

Wi

Wi

Wi

Wj

Wj

Wj

sequentially

sequentially

sequentially

Creates the same snapshot

Wi, Wk

Wi, Wk

Wi, Wk

Pangea

concurrently

concurrently

concurrently

Challenge 1

Challenge 2

challenge 1 creation of the same snapshot
Challenge 1: creation of the same snapshot
  • Database servers do not have the functionalityto create the same snapshot in a synchronized fashion.

Challenge 1: How can Pangea create the same snapshot?

Different snapshot

Consistency is destroyed

Pangea

recap snapshot creation
Recap: snapshot creation
  • When is a snapshot created?
  • When is a database changed?

Ti: Ri Wi Ci

Ti’s snapshot

recap snapshot creation9
Recap: snapshot creation
  • When is a snapshot created?
    • When the first operation is executed
  • When is a database changed?
    • When the transaction commits

Ti: Ri Wi Ci

Ti’s snapshot

recap a version of a snapshot
Recap: a version of a snapshot

Ci

F

F

F

F

F

F

Ci → F

F → Ci

same

same

If the relative order of the first and commit operations is the same,

we get the same snapshot.

time

D1

D2

database

snapshot

algorithm 1 the same snapshot creation
Algorithm 1: the same snapshot creation

Pangea regulates the relative order of

the first and commit operations

Cm

Cm

Cm

Cm

Fk

Fk

Fk

Cj

Cj

Cj

Ci

Ci

Ci

Pangea

ack

ack

ack

ack

ack

ack

ack

ack

ack

challenge 2 execution of non conflicting and conflicting writes
Challenge 2: execution of non-conflicting and conflicting writes
  • To provide high performance with keeping consistency
    • Conflicting write operation
      • Executed in the same order serially (to keep consistency)
    • Non-conflicting write operation
      • Executed concurrently (to provide higher performance)
    • ex.
      • UPDATE table SET a = 1 WHERE b=1
      • UPDATE table SET a = 2 WHERE c=2

Challenge 2: How can Pangea distinguish

non-conflicting writes from conflicting ones?

※All existing eager replication middlewares

can not distinguish them, and

all writes must be executed serially.

Conflict or non-conflict?

recap the first updater wins rule

Blocked

Recap: the first updater wins rule

The first updater can progress, but the others have to wait

for completion of the first updater’s transaction

Wj

Wi

Assumption

Wi and Wj conflict

ack

Execution order

Wj

Wi

algorithm 2 execution of non conflicting and conflicting writes
Algorithm 2: execution of non-conflicting and conflicting writes

Wj

Wj

Wj

Wi

Wi

Wi

Pangea

Wk

Wk

Wk

Assumption

Wi and Wj conflict

Wk does not conflict

Wi

Wi

Wi

Wj

Wj

Wj

sequentially

sequentially

sequentially

ack

ack

follower

leader

follower

Wi, Wk

Wi, Wk

Wi, Wk

concurrently

concurrently

concurrently

summary pangea protocol

simple

Higher performance

Avoids a bottleneck

Guarantees SI

Summary: Pangea protocol
  • The first operation, commit operation (Algorithm 1)
    • Mutual exclusion

(This guarantees all replicas create the same snapshot)

  • Write operation (Algorithm 2)
    • Sends it only to the leader
    • sends it to all followers after receiving an ack

(This provides tuple-level concurrency control)

  • Read operation
    • Sends it to any slave replica unlike lazy replication

(This reduces the load of the leader)

※See the proof in our paper

evaluation
Evaluation
  • TPC-W benchmark
    • Scaling parameters: 1 million items and 2.88 million customers
  • Comparing
    • Pangea
    • LRM (Lazy Replication Middleware)

Implemented the algorithm of Ganymed [17]

  • Prototype
    • Less than 2000 lines in C language
  • PostgreSQL servers: version 8.3.7
  • Tomcat: version 6.0.18
conclusions
Conclusions
  • Pangea, a new eager database replication middleware
    • Guarantees SI
    • Provides tuple-level concurrency control
    • Need not modify existing database servers
  • Prototype: The code size is very small
  • Experimental results
    • Provides higher performance
  • Practical, effective middleware