m t v c
play

M T V C Matthew Sackman - PowerPoint PPT Presentation

M T V C Matthew Sackman matthew@goshawkdb.io https://goshawkdb.io/ 1. Have you played with a NoSQL or NewSQL store? 1. Have you played with a NoSQL or NewSQL store? 2. Have


  1. L   • Strong serializability requires Consistency, so must sacrifice Availability • To achieve Consistency, only accept operations if connected to majority • If cluster size is 2 F + 1 then we can withstand no more than F failures

  2. M  V  C  I  E   T  W 

  3. M  V  C  I  E   T  W 

  4. M  V  C  I  E   T  W 

  5. M  V  C  I  E   T  W 

  6. M  V  C  I  E   T  W 

  7. M  V  C  I  E   T  W 

  8. L   • Strong serializability requires Consistency, so must sacrifice Availability • To achieve Consistency, only accept operations if connected to majority • If cluster size is 2 F + 1 then we can withstand no more than F failures • Writes must go to F + 1 nodes

  9. R  V  C  I  E   T  W 

  10. R  V  C  I  E   T  W 

  11. R  V  C  I  E   T  W 

  12. R  V  C  I  E   T  W 

  13. R  V  C  I  E   T  W 

  14. R  V  C  I  E   T  W 

  15. L   • Strong serializability requires Consistency, so must sacrifice Availability • To achieve Consistency, only accept operations if connected to majority • If cluster size is 2 F + 1 then we can withstand no more than F failures • Writes must go to F + 1 nodes • Reads must read from F + 1 nodes and be able to order results

  16. T  P   D  D  1. Client submits txn

  17. T  P   D  D  1. Client submits txn 2. Node(s) vote on txn

  18. T  P   D  D  1. Client submits txn 2. Node(s) vote on txn 3. Node(s) reach consensus on txn outcome

  19. T  P   D  D  1. Client submits txn 2. Node(s) vote on txn 3. Node(s) reach consensus on txn outcome 4. Client is informed of outcome

  20. T  P   D  D  1. Client submits txn 2. Node(s) vote on txn 3. Node(s) reach consensus on txn outcome 4. Client is informed of outcome Most important thing is all nodes agree on the order of transactions

  21. T  P   D  D  1. Client submits txn 2. Node(s) vote on txn 3. Node(s) reach consensus on txn outcome 4. Client is informed of outcome Most important thing is all nodes agree on the order of transactions (focus for the rest of this talk!)

  22. L  B  O 

  23. L  B  O 

  24. L  B  O 

  25. L  B  O  • Only leader votes on whether txn commits or aborts

  26. L  B  O  • Only leader votes on whether txn commits or aborts • Therefore leader must know everything

  27. L  B  O  • Only leader votes on whether txn commits or aborts • Therefore leader must know everything • If leader fails, a new leader will be elected from remaining nodes

  28. L  B  O  • Only leader votes on whether txn commits or aborts • Therefore leader must know everything • If leader fails, a new leader will be elected from remaining nodes • Therefore all nodes must know everything

  29. L  B  O  • Only leader votes on whether txn commits or aborts • Therefore leader must know everything • If leader fails, a new leader will be elected from remaining nodes • Therefore all nodes must know everything • Fine for small clusters, but scaling issues when clusters get big

  30. C  C  B  O 

  31. C  C  B  O 

  32. C  C  B  O 

  33. C  C  B  O  • Nodes receive txns and must vote on txn outcome and then consensus must be reached (not shown)

  34. C  C  B  O  • Nodes receive txns and must vote on txn outcome and then consensus must be reached (not shown) • Clients are responsible for applying an increasing clock value to txns

  35. C  C  B  O  • Nodes receive txns and must vote on txn outcome and then consensus must be reached (not shown) • Clients are responsible for applying an increasing clock value to txns • If a client’s clock races then it can prevent other clients from getting txns submitted

  36. C  C  B  O  • Nodes receive txns and must vote on txn outcome and then consensus must be reached (not shown) • Clients are responsible for applying an increasing clock value to txns • If a client’s clock races then it can prevent other clients from getting txns submitted • So must be very careful to try and keep clocks running at the same rate

  37. C  C  B  O  • Nodes receive txns and must vote on txn outcome and then consensus must be reached (not shown) • Clients are responsible for applying an increasing clock value to txns • If a client’s clock races then it can prevent other clients from getting txns submitted • So must be very careful to try and keep clocks running at the same rate • No possibility to reorder transactions at all to maximise commits

  38. S  V 1 < V 2 � ∀ x ∈ dom ( V 1 ∪ V 2 ) : V 1 [ x ] ≤ V 2 [ x ] ∧∃ y ∈ dom ( V 1 ∪ V 2 ) : V 1 [ y ] < V 2 [ y ]

  39. S  T 

  40. S  T 

  41. S  T 

  42. S  T 

  43. S  T 

  44. S  T 

  45. S  T 

  46. S  T 

  47. T  W 

  48. T  W 

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend