pushing the cap

11
CAP Theorem Proposed Approach Pushing the CAP Strategies for Consistency and Availability Muhammad Anis uddin Nasir FIB UPC April 12, 2012 Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Upload: anis-nasir

Post on 19-Aug-2015

685 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Pushing the cap

CAP TheoremProposed Approach

Pushing the CAPStrategies for Consistency and Availability

Muhammad Anis uddin Nasir

FIB UPC

April 12, 2012

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 2: Pushing the cap

CAP TheoremProposed Approach

1 CAP Theorem

2 Proposed Approach

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 3: Pushing the cap

CAP TheoremProposed Approach

CAP Theorem

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 4: Pushing the cap

CAP TheoremProposed Approach

WHY 2 OF 3 IS MISLEADING

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 5: Pushing the cap

CAP TheoremProposed Approach

CAP Theorem

Partitions are rare, there is little reason to forfeit C or A whenthe system is not partitioned

C and A can be variable throughout the life of the System

CAP is continuous

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 6: Pushing the cap

CAP TheoremProposed Approach

1 CAP Theorem

2 Proposed Approach

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 7: Pushing the cap

CAP TheoremProposed Approach

Proposed Approach

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 8: Pushing the cap

CAP TheoremProposed Approach

Partition Recovery

The state on both sides must become consistent

There must be compensation for the mistakes made duringpartition mode

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 9: Pushing the cap

CAP TheoremProposed Approach

Partition Recovery- Way out

Starting from the state at the time of the partition

Rolling Back

Constrain the use of certain operations during partitioning

Delaying risky operations

CRDT (commutative replicated data types)

Compensating mistakes

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 10: Pushing the cap

CAP TheoremProposed Approach

Conslusion

Consistency or Availability should not be blindly sacrificed

Careful management of invariants during partitions

Different solutions(CRDTs can be very useful for optimization)

Best solutions depends on details about the service’sinvariants and operations.

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability

Page 11: Pushing the cap

CAP TheoremProposed Approach

Pushing the CAPStrategies for Consistency and Availability

Muhammad Anis uddin Nasir

FIB UPC

April 12, 2012

Muhammad Anis uddin Nasir Pushing the CAP Strategies for Consistency and Availability