incremental consistency guarantees
play

Incremental Consistency Guarantees For Replicated Objects Rachid - PowerPoint PPT Presentation

Incremental Consistency Guarantees For Replicated Objects Rachid Guerraoui, Matej Pavlovic, Dragos-Adrian Seredinschi SOCIAL MEDIA APPLICATION replicate Incremental Consistency Guarantees Incremental Consistency Guarantees 2 Dragos-Adrian


  1. Incremental Consistency Guarantees For Replicated Objects Rachid Guerraoui, Matej Pavlovic, Dragos-Adrian Seredinschi

  2. SOCIAL MEDIA APPLICATION replicate Incremental Consistency Guarantees Incremental Consistency Guarantees 2 Dragos-Adrian Seredinschi Dragos-Adrian Seredinschi

  3. SOCIAL MEDIA APPLICATION 20 Number of recent events 
 22 17 on the user’s timeline replicate Incremental Consistency Guarantees Incremental Consistency Guarantees 2 Dragos-Adrian Seredinschi Dragos-Adrian Seredinschi

  4. SOCIAL MEDIA APPLICATION 20 Number of recent events 
 22 17 on the user’s timeline replicate Strong Consistency • Returns the correct data 22 • Latency: ~200 ms • Can become unavailable [CAP], [PACELC] Incremental Consistency Guarantees Incremental Consistency Guarantees 2 Dragos-Adrian Seredinschi Dragos-Adrian Seredinschi

  5. SOCIAL MEDIA APPLICATION 20 Number of recent events 
 22 17 on the user’s timeline replicate Strong Consistency Weak Consistency • Returns the correct data • Latency: ~100 ms 22 • Latency: ~200 ms • High availability • Can become unavailable • Allows inconsistencies: can return [CAP], [PACELC] or or 20 17 22 Incremental Consistency Guarantees Incremental Consistency Guarantees 2 Dragos-Adrian Seredinschi Dragos-Adrian Seredinschi

  6. SOCIAL MEDIA APPLICATION 20 Number of recent events 
 22 17 on the user’s timeline replicate Strong Consistency Weak Consistency • Returns the correct data • Latency: ~100 ms 22 Neither model is ideal! • Latency: ~200 ms • High availability • Can become unavailable • Allows inconsistencies: can return [CAP], [PACELC] or or 20 17 22 Incremental Consistency Guarantees Incremental Consistency Guarantees 2 Dragos-Adrian Seredinschi Dragos-Adrian Seredinschi

  7. SOCIAL MEDIA APPLICATION 20 Number of recent events 
 22 17 on the user’s timeline replicate Strong Consistency Weak Consistency • Returns the correct data • Latency: ~100 ms 22 Neither model is ideal! • Latency: ~200 ms • High availability • Can become unavailable • Allows inconsistencies: can return We use both models. [CAP], [PACELC] or or 20 17 22 Incremental Consistency Guarantees Incremental Consistency Guarantees 2 Dragos-Adrian Seredinschi Dragos-Adrian Seredinschi

  8. Multiple models 1. Weak consistency 
 100ms 20 2. Strong consistency 
 300ms 22 Incremental Consistency Guarantees 3 Dragos-Adrian Seredinschi

  9. Increasingly many systems expose 
 Multiple models multiple consistency models: 1. Weak consistency 
 Dynamo 
 100ms 20 [SOSP’07] Pileus 
 2. Strong consistency 
 [SOSP’13] 300ms 22 Incremental Consistency Guarantees 3 Dragos-Adrian Seredinschi

  10. Increasingly many systems expose 
 Multiple models multiple consistency models: 1. Weak consistency 
 Dynamo 
 100ms 20 [SOSP’07] Pileus 
 2. Strong consistency 
 [SOSP’13] 300ms 22 Issues 1. Send multiple requests? 2. How to leverage individual responses? 3. Semantics? 4. … Incremental Consistency Guarantees 3 Dragos-Adrian Seredinschi

  11. Increasingly many systems expose 
 Multiple models multiple consistency models: 1. Weak consistency 
 Dynamo 
 100ms 20 [SOSP’07] Pileus 
 2. Strong consistency 
 [SOSP’13] 300ms 22 Issues Problem 1. Send multiple requests? How do you program with 2. How to leverage individual responses? ★ inconsistencies? 3. Semantics? ★ multiple values? 4. … Incremental Consistency Guarantees 3 Dragos-Adrian Seredinschi

  12. SOCIAL MEDIA APPLICATION ABSTRACTION 
 FOR REPLICATED OBJECTS Consistency Consistency Strong 
 Consistency ???? 
 Weak 
 … … 20 22 17 Incremental Consistency Guarantees 4 Dragos-Adrian Seredinschi

  13. SOCIAL MEDIA APPLICATION ABSTRACTION 
 FOR REPLICATED OBJECTS Consistency Consistency Strong 
 Consistency ???? 
 Weak 
 … … CORRECTABLE 20 22 17 Incremental Consistency Guarantees 4 Dragos-Adrian Seredinschi

  14. Incremental 
 SOCIAL MEDIA APPLICATION Consistency 
 Guarantees (ICG) ABSTRACTION 
 FOR REPLICATED OBJECTS provides Consistency Consistency Strong 
 Consistency ???? 
 Weak 
 … … CORRECTABLE 20 22 17 Incremental Consistency Guarantees 4 Dragos-Adrian Seredinschi

  15. Correctables / Design ➤ Starting point: Promises ➤ Placeholders for values ➤ Becoming mainstream value resolve 
 asynchronously PROMISE Incremental Consistency Guarantees 5 Dragos-Adrian Seredinschi

  16. Correctables / Design ➤ Starting point: Promises ➤ Placeholders for values ➤ Becoming mainstream value 1 value 2 value resolve 
 asynchronously value n CORRECTABLE PROMISE Incremental Consistency Guarantees 5 Dragos-Adrian Seredinschi

  17. Correctables / Design ➤ Starting point: Promises ➤ Placeholders for values ➤ Becoming mainstream PROGRESSIVELY 
 value 1 STRONGER CONSISTENCY (INCREMENTAL) value 2 value resolve 
 PROGRESSIVELY asynchronously value n HIGHER LATENCY CORRECTABLE PROMISE Incremental Consistency Guarantees 5 Dragos-Adrian Seredinschi

  18. Consistency Models are Complementary Strong (Ideal protocol) L A T Consistency N Linearizable E Weak consistency: Strong consistency: M E R C Strong 
 N I Sequential Consistency ★ Fast ★ Slower Causal ★ (Often correct) ★ (Correct with certainty) (Worst protocol) Weak 
 Eventual Consistency Weak Low High Performance Incremental Consistency Guarantees 6 Dragos-Adrian Seredinschi

  19. Consistency Models are Complementary Strong (Ideal protocol) L A T Consistency N Linearizable E Weak consistency: Strong consistency: M E R C Strong 
 N I Sequential Consistency ★ Fast ★ Slower Causal ★ (Often correct) ★ (Correct with certainty) (Worst protocol) Weak 
 Eventual Consistency Weak Low High Performance So what? Incremental Consistency Guarantees 6 Dragos-Adrian Seredinschi

  20. Consistency Models are Complementary Strong (Ideal protocol) L A T Consistency N Linearizable E Weak consistency: Strong consistency: M E R C Strong 
 N I Sequential Consistency ★ Fast ★ Slower Causal ★ (Often correct) ★ (Correct with certainty) (Worst protocol) Weak 
 Eventual Consistency Weak Low High Performance So what? Latency optimizations Incremental Consistency Guarantees 6 Dragos-Adrian Seredinschi

  21. Speculating with Correctables SOCIAL MEDIA APPLICATION read 
 timeline CORRECTABLE Lower latency of strong consistency Incremental Consistency Guarantees 7 Dragos-Adrian Seredinschi

  22. Speculating with Correctables SOCIAL MEDIA APPLICATION value 1 value 2 read 
 Latency gap: ~100 ms Consistency Consistency Strong 
 Weak 
 timeline CORRECTABLE Lower latency of strong consistency Incremental Consistency Guarantees 7 Dragos-Adrian Seredinschi

  23. Speculating with Correctables SOCIAL MEDIA APPLICATION Speculative 
 value 1 value 2 execution read 
 Latency gap: ~100 ms Consistency Consistency Strong 
 Weak 
 timeline • value 1 is often correct 
 Verify based on [Existential Consistency. SOSP’15] 
 value 2 [PBS. VLDB 5(8)’12] • Speculatively execute any further steps 
 e.g., prefetch dependent data CORRECTABLE Lower latency of strong consistency Incremental Consistency Guarantees 7 Dragos-Adrian Seredinschi

  24. Speculating with Correctables SOCIAL MEDIA APPLICATION Speculative 
 value 1 value 2 execution read 
 Latency gap: ~100 ms Consistency Consistency Strong 
 Weak 
 timeline • value 1 is often correct 
 Verify based on [Existential Consistency. SOSP’15] 
 value 2 [PBS. VLDB 5(8)’12] • Speculatively execute any further steps 
 e.g., prefetch dependent data CORRECTABLE Lower latency of strong consistency Incremental Consistency Guarantees 7 Dragos-Adrian Seredinschi

  25. Traditional operation: Strongly-consistent timeline 200 ms Fetch timeline items 300ms 100 ms Incremental Consistency Guarantees 8 Dragos-Adrian Seredinschi

  26. Traditional operation: Strongly-consistent timeline 200 ms Fetch timeline items 300ms 100 ms Speculative operation with ICG: value 1 value 2 100 ms 100 ms Fetch timeline items 100 ms Incremental Consistency Guarantees 8 Dragos-Adrian Seredinschi

  27. Traditional operation: Strongly-consistent timeline 200 ms Fetch timeline items 300ms 100 ms Speculative operation with ICG: value 1 
 yes 200ms matches 
 value 1 value 2 value 2 100 ms 100 ms Fetch timeline items 100 ms Incremental Consistency Guarantees 8 Dragos-Adrian Seredinschi

  28. Traditional operation: Strongly-consistent timeline 200 ms Fetch timeline items 300ms 100 ms Speculative operation with ICG: value 1 
 yes 200ms matches 
 value 1 value 2 value 2 100 ms 100 ms no Fetch timeline items Re-fetch 100 ms 300ms 100 ms Incremental Consistency Guarantees 8 Dragos-Adrian Seredinschi

  29. Speculation case-study ➤ Application: Twissandra ➤ Workload generated via YCSB ➤ Clients in Ireland ➤ Geo-replication on Amazon’s EC2 G R O G R V L A C Incremental Consistency Guarantees 9 Dragos-Adrian Seredinschi

Recommend


More recommend