SlideShare a Scribd company logo
1 of 22
Tuples, LWTs and UDTs
S 301
Paxos, Tuples and User Defined Types
Shameless Plug
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
From humble beginnings
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
CAP Theorem Refresher
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Planning your Data Model
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Start with Queries
Denormalize to Optimize
Planning for Concurrent Writes
Who is jbellis a subscriber of?
Blog entry will have a body, user and category.
From humble beginnings
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
What about transactions?
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
What about transactions?
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Why not transactions?
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Enter Paxos
Light Weight Transactions
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Prepares a proposal that is sent to a number of Acceptors.
Waits on a an acknowledgement (in form of promise) from
Acceptors.
Sends accept message to Quorum of Acceptors with new value
to commit.
Returns success? completion to client.
Determines if proposal is newer than what it has seen.
Acknowledges/agree with its own highest proposal value seen
AND the current value (of what is to be set).
Receive message to commit new value.
Accept and return on successful commit of value.
Paxos… (in Cassandra)
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Practical LWTs in C*
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Space-time
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Enter Tuples
Cartesian co-ordinates
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Tracking the drone in real-time
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Embedding metadata
Complex Data Types & JSON
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
{
"mls_number": "C1818310",
"address": {
"street_number": 44,
"street_name": "kennedy road",
"unit": ""
},
"listing_price": 459999,
"description": "Victorian house set on the gorgeous park...",
"date_listed": "2013-06-21",
"rooms": {
{
"room": "kitchen",
"dimensions": {
"width": "14.2",
"length": "16.8",
"units": "feet"
}
},
{
"room": "bedroom",
"dimensions": {
"width": "13.2",
"length": "19.6",
"units": "feet"
}
}
}
}
CREATE TABLE listings (
mls_number text,
address text,
listing_price double,
description text,
date_listed timestamp,
PRIMARY KEY (mls_number)
);
CREATE TABLE room_data (
mls_number text,
room_id uuid,
room_name text,
PRIMARY KEY (mls_number, room_id)
);
CREATE TABLE room_dimensions (
room_id uuid,
width double,
length double,
units text,
PRIMARY KEY (room_id)
);
User Defined Types cont...
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
{
"mls_number": "C1818310",
"address": {
"street_number": 44,
"street_name": "kennedy road",
"unit": ""
},
"listing_price": 459999,
"description": "Victorian house set on the gorgeous park...",
"date_listed": "2013-06-21",
"rooms": {
{
"room": "kitchen",
"dimensions": {
"width": "14.2",
"length": "16.8",
"units": "feet"
}
},
{
"room": "bedroom",
"dimensions": {
"width": "13.2",
"length": "19.6",
"units": "feet"
}
}
}
}
{
"mls_number": "C1818310",
"address": {
"street_number": 44,
"street_name": "kennedy road",
"unit": ""
},
"listing_price": 459999,
"description": "Victorian house set on the gorgeous park...",
"date_listed": "2013-06-21",
"rooms": {
{
"room": "kitchen",
"dimensions": {
"width": "14.2",
"length": "16.8",
"units": "feet"
}
},
{
"room": "bedroom",
"dimensions": {
"width": "13.2",
"length": "19.6",
"units": "feet"
}
}
}
}
CREATE TYPE room_dimensions (
width double,
length double,
units text
);
{
"mls_number": "C1818310",
"address": {
"street_number": 44,
"street_name": "kennedy road",
"unit": ""
},
"listing_price": 459999,
"description": "Victorian house set on the gorgeous park...",
"date_listed": "2013-06-21",
"rooms": {
{
"room": "kitchen",
"dimensions": {
"width": "14.2",
"length": "16.8",
"units": "feet"
}
},
{
"room": "bedroom",
"dimensions": {
"width": "13.2",
"length": "19.6",
"units": "feet"
}
}
}
}
CREATE TYPE mls_address (
street_number int,
street_name text,
unit text
);
CREATE TABLE listings (
mls_number text,
address frozen <mls_address>,
listing_price double,
description text,
date_listed timestamp,
rooms map <text, frozen <room_dimensions>>,
PRIMARY KEY (mls_number)
);
{
"mls_number": "C1818310",
"address": {
"street_number": 44,
"street_name": "kennedy road",
"unit": ""
},
"listing_price": 459999,
"description": "Victorian house set on the gorgeous park...",
"date_listed": "2013-06-21",
"rooms": {
{
"room": "kitchen",
"dimensions": {
"width": "14.2",
"length": "16.8",
"units": "feet"
}
},
{
"room": "bedroom",
"dimensions": {
"width": "13.2",
"length": "19.6",
"units": "feet"
}
}
}
}
Pre 2.1.3 - there’s a catch
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
User Defined Types cont...
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
INSERT INTO listings (mls_number, listing_price, date_listed, description, address, rooms)
VALUES (‘C1818310’,459999, ‘2013-06-21’, 'Victorian house set on the gorgeous park...',
{
street_number: 44,
street_name: ‘Kennedy Road’,
unit: ‘’
},
{
‘kitchen’: {
width: 14.2,
length: 16.8,
unit: ‘feet’,
},
‘bedroom’: {
width: 13.2,
length: 19.6,
unit: ‘feet’,
}
}
);
address frozen <mls_address>,
rooms map <text, frozen <room_dimensions>>
Selecting UDTs
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
cqlsh:msl_test>SELECT kitchen.width, kitchen.length FROM listings WHERE mls_number = ‘C1818310’
kitchen.width | kitchen.length
----------------------------------------------------------
14.2 | 16.8
(1 rows)
cqlsh:msl_test>SELECT address FROM listings WHERE mls_number = ‘C1818310’
address
--------------------------------------------------------------------------------
{street_number: 44, street_name: ‘Kennedy Road’, unit: ‘’}
(1 rows)
Did I mention…
We’re HIRING!
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc
Did I mention…
We’re HIRING!
@VictorFAnjos
@Cassandra
@FicstarSoftware
@BrightlaneInc

More Related Content

More from Victor Anjos

Viafoura's Big Data Use Case
Viafoura's Big Data Use CaseViafoura's Big Data Use Case
Viafoura's Big Data Use Case
Victor Anjos
 

More from Victor Anjos (8)

Who wants to be a Cassandra Millionaire
Who wants to be a Cassandra MillionaireWho wants to be a Cassandra Millionaire
Who wants to be a Cassandra Millionaire
 
Cassandra Jeopardy Best Practices
Cassandra Jeopardy Best PracticesCassandra Jeopardy Best Practices
Cassandra Jeopardy Best Practices
 
Lambda (Ca)ssandra
Lambda (Ca)ssandraLambda (Ca)ssandra
Lambda (Ca)ssandra
 
Just in time (series) - KairosDB
Just in time (series) - KairosDBJust in time (series) - KairosDB
Just in time (series) - KairosDB
 
Big Data Week 2013 Flow
Big Data Week 2013 FlowBig Data Week 2013 Flow
Big Data Week 2013 Flow
 
CCM AlchemyAPI and Real-time Aggregation
CCM AlchemyAPI and Real-time AggregationCCM AlchemyAPI and Real-time Aggregation
CCM AlchemyAPI and Real-time Aggregation
 
Viafoura's Big Data Use Case
Viafoura's Big Data Use CaseViafoura's Big Data Use Case
Viafoura's Big Data Use Case
 
Cassandra on Ubuntu AUTOMATIC Install
Cassandra on Ubuntu AUTOMATIC InstallCassandra on Ubuntu AUTOMATIC Install
Cassandra on Ubuntu AUTOMATIC Install
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 

C*SC301 - Paxos, Tuples and UDTs

  • 1. Tuples, LWTs and UDTs S 301 Paxos, Tuples and User Defined Types
  • 5. Planning your Data Model @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc Start with Queries Denormalize to Optimize Planning for Concurrent Writes Who is jbellis a subscriber of? Blog entry will have a body, user and category.
  • 10. Enter Paxos Light Weight Transactions @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc Prepares a proposal that is sent to a number of Acceptors. Waits on a an acknowledgement (in form of promise) from Acceptors. Sends accept message to Quorum of Acceptors with new value to commit. Returns success? completion to client. Determines if proposal is newer than what it has seen. Acknowledges/agree with its own highest proposal value seen AND the current value (of what is to be set). Receive message to commit new value. Accept and return on successful commit of value.
  • 12. Practical LWTs in C* @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc
  • 15. Tracking the drone in real-time @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc
  • 16. Embedding metadata Complex Data Types & JSON @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc { "mls_number": "C1818310", "address": { "street_number": 44, "street_name": "kennedy road", "unit": "" }, "listing_price": 459999, "description": "Victorian house set on the gorgeous park...", "date_listed": "2013-06-21", "rooms": { { "room": "kitchen", "dimensions": { "width": "14.2", "length": "16.8", "units": "feet" } }, { "room": "bedroom", "dimensions": { "width": "13.2", "length": "19.6", "units": "feet" } } } } CREATE TABLE listings ( mls_number text, address text, listing_price double, description text, date_listed timestamp, PRIMARY KEY (mls_number) ); CREATE TABLE room_data ( mls_number text, room_id uuid, room_name text, PRIMARY KEY (mls_number, room_id) ); CREATE TABLE room_dimensions ( room_id uuid, width double, length double, units text, PRIMARY KEY (room_id) );
  • 17. User Defined Types cont... @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc { "mls_number": "C1818310", "address": { "street_number": 44, "street_name": "kennedy road", "unit": "" }, "listing_price": 459999, "description": "Victorian house set on the gorgeous park...", "date_listed": "2013-06-21", "rooms": { { "room": "kitchen", "dimensions": { "width": "14.2", "length": "16.8", "units": "feet" } }, { "room": "bedroom", "dimensions": { "width": "13.2", "length": "19.6", "units": "feet" } } } } { "mls_number": "C1818310", "address": { "street_number": 44, "street_name": "kennedy road", "unit": "" }, "listing_price": 459999, "description": "Victorian house set on the gorgeous park...", "date_listed": "2013-06-21", "rooms": { { "room": "kitchen", "dimensions": { "width": "14.2", "length": "16.8", "units": "feet" } }, { "room": "bedroom", "dimensions": { "width": "13.2", "length": "19.6", "units": "feet" } } } } CREATE TYPE room_dimensions ( width double, length double, units text ); { "mls_number": "C1818310", "address": { "street_number": 44, "street_name": "kennedy road", "unit": "" }, "listing_price": 459999, "description": "Victorian house set on the gorgeous park...", "date_listed": "2013-06-21", "rooms": { { "room": "kitchen", "dimensions": { "width": "14.2", "length": "16.8", "units": "feet" } }, { "room": "bedroom", "dimensions": { "width": "13.2", "length": "19.6", "units": "feet" } } } } CREATE TYPE mls_address ( street_number int, street_name text, unit text ); CREATE TABLE listings ( mls_number text, address frozen <mls_address>, listing_price double, description text, date_listed timestamp, rooms map <text, frozen <room_dimensions>>, PRIMARY KEY (mls_number) ); { "mls_number": "C1818310", "address": { "street_number": 44, "street_name": "kennedy road", "unit": "" }, "listing_price": 459999, "description": "Victorian house set on the gorgeous park...", "date_listed": "2013-06-21", "rooms": { { "room": "kitchen", "dimensions": { "width": "14.2", "length": "16.8", "units": "feet" } }, { "room": "bedroom", "dimensions": { "width": "13.2", "length": "19.6", "units": "feet" } } } }
  • 18. Pre 2.1.3 - there’s a catch @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc
  • 19. User Defined Types cont... @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc INSERT INTO listings (mls_number, listing_price, date_listed, description, address, rooms) VALUES (‘C1818310’,459999, ‘2013-06-21’, 'Victorian house set on the gorgeous park...', { street_number: 44, street_name: ‘Kennedy Road’, unit: ‘’ }, { ‘kitchen’: { width: 14.2, length: 16.8, unit: ‘feet’, }, ‘bedroom’: { width: 13.2, length: 19.6, unit: ‘feet’, } } ); address frozen <mls_address>, rooms map <text, frozen <room_dimensions>>
  • 20. Selecting UDTs @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc cqlsh:msl_test>SELECT kitchen.width, kitchen.length FROM listings WHERE mls_number = ‘C1818310’ kitchen.width | kitchen.length ---------------------------------------------------------- 14.2 | 16.8 (1 rows) cqlsh:msl_test>SELECT address FROM listings WHERE mls_number = ‘C1818310’ address -------------------------------------------------------------------------------- {street_number: 44, street_name: ‘Kennedy Road’, unit: ‘’} (1 rows)
  • 21. Did I mention… We’re HIRING! @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc
  • 22. Did I mention… We’re HIRING! @VictorFAnjos @Cassandra @FicstarSoftware @BrightlaneInc

Editor's Notes

  1. Consistency - All nodes see the same data at the same time. performing a read operation will return the value of the most recent write operation causing all nodes to return the same data Availability - Every request gets a response on success/failure every client gets a response, regardless of the state of any individual node in the system Partition Tolerance - System continues to work despite message loss or partial failure can sustain any amount of network failure that doesn't result in a failure of the entire network data records are sufficiently replicated across combinations of nodes and networks to keep the system up through intermittent outages
  2. How you want to access the data? All of the use cases your application needs to support. All lookups your application needs to do. Note any ordering, filtering or grouping requirements. Relational world → normalize to minimize redundancy Smaller, well-structured tables with relationships (foreign keys) Joins. Cannot join multiple column families to satisfy a given query request. Plan for one or more rows in a single column family for each query. This sacrifices disk space and reduces the number of disk seeks. Row key, a string of virtually unbounded length. Cassandra does not enforce unique-ness. Inserting a duplicate row key will upsert the columns contained in the insert statement rather than return a unique constraint violation.
  3. Scenario:You have one bank account, with $100 left in it, and two bank cards. When you try to withdraw money with the two cards (you and your wife) at the same time at 2 different ATMs, you might get 2 times $100… PROBLEM!!!
  4. Scenario:You have one bank account, with $100 left in it, and two bank cards. When you try to withdraw money with the two cards (you and your wife) at the same time at 2 different ATMs, you might get 2 times $100… PROBLEM!!!
  5. One node acts as a proposer (initiates the protocol). Only one node can act as proposer at a time, but if two or more choose to then the protocol will (typically) fail to terminate until only one node continues to act as proposer. Sacrificing termination for correctness. The other nodes (which conspire to make a decision about the value being proposed) are called ‘acceptors’. Acceptors respond to proposals from the proposer either by rejecting them for some reason, or agreeing to them in principle and making promises in return about the proposals they will accept in the future. These promises guarantee that proposals that may come from other proposers will not be erroneously accepted, and in particular they ensure that only the latest of the proposals sent by the proposer is accepted. Proposer Acceptors ‘Accept’ here means that an acceptor commits to a proposal as the one it considers definitive. Once a majority of acceptors have accepted the same proposal, the Paxos protocol can terminate and the proposed value may be disseminated to nodes which are interested in it (these are called ‘listeners’).
  6. Prepare/promise is the core of the algorithm. Any node may propose a value; we call that node the leader. The leader picks a ballot and sends it to the participating replicas. If the ballot is the highest a replica has seen, it promises to not accept any proposals associated with any earlier ballot. Along with that promise, it includes the most recent proposal it has already received. If a majority of the nodes promise to accept the leader’s proposal, it may proceed to the actual proposal but with the wrinkle that if a majority of replicas included an earlier proposal with their promise, then that is the value the leader must propose. Conceptually, if a leader interrupts an earlier leader, it must first finish that leader’s proposal before proceeding with its own, thus giving us our desired linearizable behavior. Thus, at the cost of four round trips, we can provide linearizability.
  7. Prepare/promise is the core of the algorithm. Any node may propose a value; we call that node the leader. The leader picks a ballot and sends it to the participating replicas. If the ballot is the highest a replica has seen, it promises to not accept any proposals associated with any earlier ballot. Along with that promise, it includes the most recent proposal it has already received. If a majority of the nodes promise to accept the leader’s proposal, it may proceed to the actual proposal but with the wrinkle that if a majority of replicas included an earlier proposal with their promise, then that is the value the leader must propose. Conceptually, if a leader interrupts an earlier leader, it must first finish that leader’s proposal before proceeding with its own, thus giving us our desired linearizable behavior. Thus, at the cost of four round trips, we can provide linearizability.