C onsistency without borders
Download
1 / 29

c onsistency without borders - PowerPoint PPT Presentation


  • 85 Views
  • Uploaded on
  • Presentation posted in: General

c onsistency without borders. Peter Alvaro , Peter Bailis , Neil Conway, Joseph M. Hellerstein UC Berkeley. The transaction concept. DEBIT_CREDIT: BEGIN_TRANSACTION; GET MESSAGE; EXTRACT ACCOUT_NUMBER, DELTA, TELLER, BRANCH

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

Download Presentation

c onsistency without borders

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


C onsistency without borders
consistency without borders

Peter Alvaro, Peter Bailis,

Neil Conway, Joseph M. Hellerstein

UC Berkeley


The transaction concept
The transaction concept

DEBIT_CREDIT:

BEGIN_TRANSACTION;

GET MESSAGE;

EXTRACT ACCOUT_NUMBER, DELTA, TELLER, BRANCH

FROM MESSAGE;

FIND ACCOUNT(ACCOUT_NUMBER) IN DATA BASE;

IF NOT_FOUND | ACCOUNT_BALANCE + DELTA < 0 THEN

PUT NEGATIVE RESPONSE;

ELSE DO;

ACCOUNT_BALANCE = ACCOUNT_BALANCE + DELTA;

POST HISTORY RECORD ON ACCOUNT (DELTA);

CASH_DRAWER(TELLER) = CASH_DRAWER(TELLER) + DELTA;

BRANCH_BALANCE(BRANCH) = BRANCH_BALANCE(BRANCH) + DELTA;

PUT MESSAGE ('NEW BALANCE =' ACCOUNT_BALANCE);

END;

COMMIT;


An application level contract
An application-level contract

Transactions

Application

Write

Read

Opaque

store


Pervasive distribution
Pervasive distribution

asynchrony

CAP

partial failure


Research on consistency
Research on consistency

(translation)

Assert:

balance > 0

Application

causal?

PRAM?

delta?

fork/join?

red/blue?

release?

SC?

Consistency

models

Write

Read

Opaque

store

R1(X=1) R2(X=1) W1(X=2) W2(X=0)

W1(X=1) W1(Y=2) R2(Y=2) R2(X=0)


Meanwhile in industry
Meanwhile, in industry…

(prayer)

Assert:

balance > 0

Custom solutions

Application

Write

Read

Opaque

store


Distributed consistency staying relevant
Distributed consistency: staying relevant

  • Is this an important problem?

  • Is academia disconnected from reality?

  • OK, what now?

Goal: help programmers write correct applications.

Today: some promising approaches





Problem deadlock detection
Problem: deadlock detection

Task: Identify strongly-connected components

Waits-for graph


Problem garbage collection
Problem: garbage collection

Task: Identify nodes not reachable

from Root.

Root

Refers-to graph


Correctness
Correctness

Deadlock detection

  • Safety:No false positives-

  • Liveness:Identify all deadlocks

    Garbage collection

  • Safety:Never GC live memory!

  • Liveness: GC all orphaned memory

Root

Partition


Consistency at the extremes
Consistency at the extremes

Custom solutions?

Efficient

Correct

Linearizable

key-value store?



Object level consistency
Object-level consistency

Capture semanticsof data structures that

  • allow greater concurrency

  • maintain guarantees (e.g. convergence)


C onsistency without borders

Object-level consistency

Reordering

Batching

Retry/duplication

Commutativity

Associativity

Idempotence

Tolerant to

Insert

Read

Read

Insert

Convergent

data structure

(e.g., Set CRDT)


C onsistency without borders

Object-level consistency

GC Assert:

No live nodes are reclaimed

Application

?

?

Convergent

data structures

Assert:

Graph replicas

converge



Flow level consistency1
Flow-level consistency

Capture semantics of datain motion

  • Asynchronous dataflow model

  • component properties  system-wide guarantees


Flow level consistency2
Flow-level consistency

Order-insensitivity (confluence)

output set = f(input set)

{ }

=

{ }


Flow level consistency3
Flow-level consistency

Confluence is compositional

output set = f g(input set)


Graph queries as dataflow
Graph queries as dataflow

Confluent

Coordinate here


Language level consistency
Language-level consistency

DSLs for distributed programming?

  • Capture consistency concerns in the type system


Language level consistency1
Language-level consistency

CALM Theorem:

Monotonic  confluent

Conservative, syntactic test for confluence


Language level consistency2
Language-level consistency

Deadlock detector

Garbage collector

nonmonotonic


Where we ve been where we re headed
Where we’ve been;where we’re headed

correct

reusable

efficient

intuitive


Remember
Remember

  • Consistency is an application-level property

  • Correctness and performance are compatible

  • Meet programmers on their home turf

  • Build bridges!



ad
  • Login