1 / 29

c onsistency without borders

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

isaiah
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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. consistency without borders Peter Alvaro, Peter Bailis, Neil Conway, Joseph M. Hellerstein UC Berkeley

  2. 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;

  3. An application-level contract Transactions Application Write Read Opaque store

  4. Pervasive distribution asynchrony CAP partial failure

  5. 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)

  6. Meanwhile, in industry… (prayer) Assert: balance > 0 Custom solutions Application Write Read Opaque store

  7. 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

  8. Case study: a graph

  9. Partitioned, for scalability

  10. Replicated, for availability

  11. Problem: deadlock detection Task: Identify strongly-connected components Waits-for graph

  12. Problem: garbage collection Task: Identify nodes not reachable from Root. Root Refers-to graph

  13. 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

  14. Consistency at the extremes Custom solutions? Efficient Correct Linearizable key-value store?

  15. Consistency across the stack

  16. Object-level consistency Capture semanticsof data structures that • allow greater concurrency • maintain guarantees (e.g. convergence)

  17. Object-level consistency Reordering Batching Retry/duplication Commutativity Associativity Idempotence Tolerant to Insert Read Read Insert Convergent data structure (e.g., Set CRDT)

  18. Object-level consistency GC Assert: No live nodes are reclaimed Application ? ? Convergent data structures Assert: Graph replicas converge

  19. Flow-level consistency

  20. Flow-level consistency Capture semantics of datain motion • Asynchronous dataflow model • component properties  system-wide guarantees

  21. Flow-level consistency Order-insensitivity (confluence) output set = f(input set) { } = { }

  22. Flow-level consistency Confluence is compositional output set = f g(input set)

  23. Graph queries as dataflow Confluent Coordinate here

  24. Language-level consistency DSLs for distributed programming? • Capture consistency concerns in the type system

  25. Language-level consistency CALM Theorem: Monotonic  confluent Conservative, syntactic test for confluence

  26. Language-level consistency Deadlock detector Garbage collector nonmonotonic

  27. Where we’ve been;where we’re headed correct reusable efficient intuitive

  28. Remember • Consistency is an application-level property • Correctness and performance are compatible • Meet programmers on their home turf • Build bridges!

  29. Queries?

More Related