Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Non-uniform replication for replicated objects (Thesis defense)

Non-uniform replication for replicated objects (Thesis defense)

Gonçalo Cabrita

April 27, 2017
Tweet

More Decks by Gonçalo Cabrita

Other Decks in Research

Transcript

  1. 2 Context • User activity has forced services to find

    new ways to scale • Services store their data in geo-replicated key-value stores • These data stores sacrifice consistency for higher availability • Some of these data stores have adopted CRDTs to solve the problem of data convergence
  2. 3 Problem • Information maintained by these data stores increases

    rapidly • Often impossible to keep all data in all replicas • Some systems adopt a partial replication model ◦ Queries may need to contact more than one replica to provide a response
  3. 4 Can we create a replication model where any single

    replica can answer all reads without storing all the data?
  4. 12 Road Map • Non-uniform replication • NuCRDTs • Simulation

    • Integration in AntidoteDB • Evaluation • Conclusion and Future Work
  5. 13 Non-uniform replication • A replication model where all replicas

    can answer all queries, while maintaining only a subset of the data • Replicas of the same object are not required to have equivalent states, instead they are required to have observable equivalent states • For two states to be observable equivalent a read operation must return the same value for both
  6. 17 Eventual consistency A replicated system provides eventual consistency in

    a quiescent state iff: 1. Every replica executed all operations 2. The state of any pair of replicas is equivalent
  7. 18 Non-uniform eventual consistency A replicated system provides non-uniform eventual

    consistency in a quiescent state iff: 1. Every replica executed a set of operations that impact the final observable state 2. The state of any pair of replicas is observable equivalent
  8. 19 Conditions for NuEC Having: • Core, the subset of

    essential operations in some execution. • Masked, the subset of operations in some execution that are irrelevant to the final state of the replica Theorem (Sufficient conditions for NuEC). A replication system provides non-uniform eventual consistency (NuEC) if, for the set of operations O, in their execution the following conditions hold: • every replica executes a set of core operations of O and • all operations commute.
  9. Primary goal is to divide operations into 4 groups: 1.

    Operations that are core 2. Operations that are forever masked 3. Operations that are masked but can become core 4. Operations that are masked but in the context of the entire system would be considered core 20 Algorithm for NuEC
  10. 21 Road Map • Non-uniform replication • NuCRDTs • Simulation

    • Integration in AntidoteDB • Evaluation • Conclusion and Future Work
  11. 23 Top-K • Set of tuples (id, score) • Single

    write operation ◦ ADD(id, score)
  12. 29 Top-K with removals • More complicated than regular Top-K

    • Two write operations ◦ ADD(id, score) ◦ RMV(id)
  13. 41 Road Map • Non-uniform replication • NuCRDTs • Simulations

    • Integration in AntidoteDB • Evaluation • Conclusion and Future Work
  14. 42 Simulations • Simulation of 5 replicas for each data

    type • Up to 500,000 operations are generated and executed • Values used are randomly selected using uniform distribution • Comparison with Delta CRDTs and Computational CRDTs
  15. 47 Road Map • Non-uniform replication • NuCRDTs • Simulations

    • Integration in AntidoteDB • Evaluation • Conclusion and Future Work
  16. 48 AntidoteDB Architecture DC2 DC3 Client Client Node3 Node2 Transaction

    Manager Materializer InterDC Replication Log DC1 Client Client Node1
  17. 49 AntidoteDB Architecture DC2 DC3 Client Client Node3 Node2 Transaction

    Manager Materializer InterDC Replication Log DC1 Client Client Node1
  18. 50 AntidoteDB Architecture DC2 DC3 Client Client Node3 Node2 Transaction

    Manager Materializer InterDC Replication Log DC1 Client Client Node1
  19. 51 AntidoteDB Architecture DC2 DC3 Client Client Node3 Node2 Transaction

    Manager Materializer InterDC Replication Log DC1 Client Client Node1
  20. 52 AntidoteDB Architecture DC2 DC3 Client Client Node3 Node2 Transaction

    Manager Materializer InterDC Replication Log DC1 Client Client Node1
  21. 53 AntidoteDB Architecture DC2 DC3 Client Client Node3 Node2 Transaction

    Manager Materializer InterDC Replication Log DC1 Client Client Node1
  22. 54 Implemented data types • Among the data types we

    implement: ◦ Top-K ◦ Top-K with removals • To use these data types in AntidoteDB we had to apply some changes
  23. 55 Discarding no-ops Problem: AntidoteDB assumes operations always have effects

    Solution: Return a no-op effect by the data type and discard this operation in the Materializer and Log
  24. 56 Support for compaction Problem: Transactions are immediately propagated once

    they commit Solution: Buffer transactions for a short duration and then compact them
  25. 57 Durability of Masked ops Problem: Masked operations are only

    kept in a single data center Solution: Create two versions of the transaction before propagating, one with all the operations and one with only core operations
  26. 58 Masked ops that turn Core Problem: When an operation

    executes it may cause other operations to become core, how do we propagate these? Solution: Once the operation is executed in the Materializer we send the new operations to the InterDC replication for propagation
  27. 59 Road Map • Non-uniform replication • NuCRDTs • Simulations

    • Integration in AntidoteDB • Evaluation • Conclusion and Future Work
  28. 68 Road Map • Non-uniform replication • NuCRDTs • Simulations

    • Integration in AntidoteDB • Evaluation • Conclusion and Future Work
  29. 69 Conclusion • Introduced the non-uniform replication model and formalized

    its semantics for an eventually consistent system • Showed how the model is applied to different data type designs • Implemented our designs in the AntidoteDB key-value store
  30. 70 Future Work • Evaluate the usefulness of non-uniform replication

    for other consistency models, such as linearizability and serializability • Design more useful data types, particularly for Big Data and Machine Learning environments • Cleanup and merge our changes into AntidoteDB’s main branch