SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Client-centric
consistency models
Ensar Basri Kahveci
Data-centric Consistency Models
- Maintains a globally-accessible and
globally-consistent data store.
- Linearizability, sequential consistency, …
Client-centric Consistency Models
- Instead of a globally-consistent view,
maintains consistent views for individual
clients.
- Easier to deal with inconsistencies.
- Eventual consistency, monotonic reads, monotonic
writes, read your writes, writes following reads…
[1], [5]
Monotonic reads (MR)
- If a client reads a data entry X, any successive
read of X by the same client returns the same
value or a more recent value.
Monotonic WRITES (MW)
- If a client first performs Write1 then Write2,
Write1 is ordered and executed before Write2
on all copies of the data.
Writes Following Reads (WFR)
- The client makes a write operation: Write1. Then, it eventually
observes result of Write1 with a ReadX, which is not necessarily
the successive operation of Write1. After ReadX, the client
makes a new write: Write2.
- On all copies of the entry, Write1 is ordered and executed before Write2.
- Happens-before relationship …
Read Your Writes (RYW)
- The effect of a write operation by a client on a
data entry X will always be seen by a
successive read operation on X by the same
client.
Session Guarantees for Weakly ConsistentReplicated Data [1]
- Defines MR, MW, WFR and RYW guarantees using sessions.
- A client connects to the system and operates within the
boundaries of a session.
- It can talk to a single server or a set of servers, and it can
behave like a server.
- Consistency guarantees are either ensured by the session
manager in the client during the session, or the client learns
that the guarantees cannot be continued, which means that
the session has ended.
Read Your Writes (RYW)
Highly Available Transactions: Virtues andLimitations [2]
- In the presence of arbitrary, indefinitely-long network
partitions …
- High availability: If a client can contact to a non-failing server,
it eventually receives a response.
- Sticky availability: If a client’s transactions is executed against
a copy of the database that reflects all of its prior operations,
the client eventually receives a response.
- Any guarantee achievable in a highly-available system is also
achievable in a sticky-available system, but not vice-versa.
Aphyr’s consistency models tree [2], [3]
What does it mean?
- You can get linearizability and sequential consistency in
a CP system.
- You can get MR, MW, WFR in an AP system.
- If you have sticky sessions, you can get RYW in an AP
system. Otherwise, you need a CP system for it.
- MR + MW + RYW = PRAM consistency
- PRAM + WFR = Causal consistency
How does it work?
- RYW against MR, MW and WFR
- Delaying visibility of writes in MR, MW and WFR [2], [4]
How TO map these models to hazelcast?
- In a Hazelcast cluster:
- Each partition has a single owner and possibly
multiple backups.
- All operations are executed on the partition owner.
- Partition operations are linearizable in a stable
Hazelcast cluster.
DETECTING INCONSISTENCY CASES IN HAzELCAST
- Can we detect if there is a possibility of data inconsistency on
failures?
- A hypothetical ConsistencyLostListener implementation
- For the following examples, a single partition with 2 replicas is
considered. Additionally, lets assume partition operations
return partition version in responses and our proxy classes can
track them.
EXAMPLE #1: MR is lost
EXAMPLE #2: RYW is lost
EXAMPLE #3: RYW - Vector clocks NEEDED
EXAMPLE #4: RYW with Vector clocks
EXAMPLE #5: MW is lost. We need a Dirty flag.Same for WFR
RECAP
- Linearizability and sequential consistency is achievable in CP
systems.
- Hazelcast already provides linearizability on partition level in a stable
cluster (e.g., no network partitioning or partition owner crash).
- In AP systems, causal consistency is achievable with sticky
sessions.
- Hazelcast proxies already are already as they talk to partition owners.
- Hazelcast proxies can detect the possibility of inconsistency
situations.
- On partition owner failure, they can check if they continue the current
session or not.
REFERENCES
[1] Terry, Douglas B., et al. "Session guarantees for weakly consistent replicated data." Parallel and Distributed
Information Systems, 1994., Proceedings of the Third International Conference on. IEEE, 1994.
[2] Bailis, Peter, et al. "Highly available transactions: Virtues and limitations." Proceedings of the VLDB Endowment 7.3
(2013): 181-192.
[3] https://aphyr.com/posts/313-strong-consistency-models
[4] http://www.bailis.org/blog/stickiness-and-client-server-session-guarantees/
[5] http://www.allthingsdistributed.com/2008/12/eventually_consistent.html
THANKS!Any questions?

Contenu connexe

Tendances

Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
sumitjain2013
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
Ashish Kumar
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
Ashish Kumar
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
Viet-Trung TRAN
 

Tendances (20)

CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
 
Fault tolerance in distributed systems
Fault tolerance in distributed systemsFault tolerance in distributed systems
Fault tolerance in distributed systems
 
Design Goals of Distributed System
Design Goals of Distributed SystemDesign Goals of Distributed System
Design Goals of Distributed System
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Message and Stream Oriented Communication
Message and Stream Oriented CommunicationMessage and Stream Oriented Communication
Message and Stream Oriented Communication
 
Distributed File Systems
Distributed File Systems Distributed File Systems
Distributed File Systems
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Distributed system architecture
Distributed system architectureDistributed system architecture
Distributed system architecture
 
distributed shared memory
 distributed shared memory distributed shared memory
distributed shared memory
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
Scheduling in Cloud Computing
Scheduling in Cloud ComputingScheduling in Cloud Computing
Scheduling in Cloud Computing
 
CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
 
Deadlock in Distributed Systems
Deadlock in Distributed SystemsDeadlock in Distributed Systems
Deadlock in Distributed Systems
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
 
Communications is distributed systems
Communications is distributed systemsCommunications is distributed systems
Communications is distributed systems
 
Lecture 3 threads
Lecture 3   threadsLecture 3   threads
Lecture 3 threads
 

En vedette

Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Legacy Typesafe (now Lightbend)
 
Consistency in Distributed Systems
Consistency in Distributed SystemsConsistency in Distributed Systems
Consistency in Distributed Systems
Shane Johnson
 
process management
 process management process management
process management
Ashish Kumar
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirements
AbDul ThaYyal
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel system
Manish Singh
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
Rupsee
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
karan2190
 

En vedette (20)

Image compression
Image compressionImage compression
Image compression
 
Clock Synchronization in Distributed Systems
Clock Synchronization in Distributed SystemsClock Synchronization in Distributed Systems
Clock Synchronization in Distributed Systems
 
Scaling Scribd
Scaling ScribdScaling Scribd
Scaling Scribd
 
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
Reactive Revealed Part 2: Scalability, Elasticity and Location Transparency i...
 
The elements of scale
The elements of scaleThe elements of scale
The elements of scale
 
Consistency in Distributed Systems
Consistency in Distributed SystemsConsistency in Distributed Systems
Consistency in Distributed Systems
 
Consistency Models in New Generation Databases
Consistency Models in New Generation DatabasesConsistency Models in New Generation Databases
Consistency Models in New Generation Databases
 
Distributed systems and consistency
Distributed systems and consistencyDistributed systems and consistency
Distributed systems and consistency
 
Scaling up food safety information transparency
Scaling up food safety information transparencyScaling up food safety information transparency
Scaling up food safety information transparency
 
process management
 process management process management
process management
 
Chap 4
Chap 4Chap 4
Chap 4
 
Distributed System Management
Distributed System ManagementDistributed System Management
Distributed System Management
 
3. challenges
3. challenges3. challenges
3. challenges
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirements
 
message passing
 message passing message passing
message passing
 
Distributed shared memory shyam soni
Distributed shared memory shyam soniDistributed shared memory shyam soni
Distributed shared memory shyam soni
 
Transparency - The Double-Edged Sword
Transparency - The Double-Edged SwordTransparency - The Double-Edged Sword
Transparency - The Double-Edged Sword
 
Distributed & parallel system
Distributed & parallel systemDistributed & parallel system
Distributed & parallel system
 
Distributed Systems
Distributed SystemsDistributed Systems
Distributed Systems
 
Unit 1 architecture of distributed systems
Unit 1 architecture of distributed systemsUnit 1 architecture of distributed systems
Unit 1 architecture of distributed systems
 

Similaire à Client-centric Consistency Models

Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value Store
Santal Li
 
Distribute key value_store
Distribute key value_storeDistribute key value_store
Distribute key value_store
drewz lin
 
IBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ Clusters
IBM Systems UKI
 
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQCluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
Shameera Rathnayaka
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
Aravind NC
 
Java Abs Dynamic Server Replication
Java Abs   Dynamic Server ReplicationJava Abs   Dynamic Server Replication
Java Abs Dynamic Server Replication
ncct
 

Similaire à Client-centric Consistency Models (20)

Distribute Key Value Store
Distribute Key Value StoreDistribute Key Value Store
Distribute Key Value Store
 
Distribute key value_store
Distribute key value_storeDistribute key value_store
Distribute key value_store
 
IBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ ClustersIBM Managing Workload Scalability with MQ Clusters
IBM Managing Workload Scalability with MQ Clusters
 
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQCluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
 
DFWUUG -- MySQL InnoDB Cluster & Group Replciation
DFWUUG -- MySQL InnoDB Cluster & Group ReplciationDFWUUG -- MySQL InnoDB Cluster & Group Replciation
DFWUUG -- MySQL InnoDB Cluster & Group Replciation
 
Cassandra Consistency: Tradeoffs and Limitations
Cassandra Consistency: Tradeoffs and LimitationsCassandra Consistency: Tradeoffs and Limitations
Cassandra Consistency: Tradeoffs and Limitations
 
A distributed virtual architecture for data centers
A distributed virtual architecture for data centersA distributed virtual architecture for data centers
A distributed virtual architecture for data centers
 
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DEMC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
MC0085 – Advanced Operating Systems - Master of Computer Science - MCA - SMU DE
 
Highly Available Load Balanced Galera MySql Cluster
Highly Available Load Balanced  Galera MySql ClusterHighly Available Load Balanced  Galera MySql Cluster
Highly Available Load Balanced Galera MySql Cluster
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017
 
MySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspectiveMySQL 5.7 clustering: The developer perspective
MySQL 5.7 clustering: The developer perspective
 
Designing distributed systems
Designing distributed systemsDesigning distributed systems
Designing distributed systems
 
Mpls conference 2016-data center virtualisation-11-march
Mpls conference 2016-data center virtualisation-11-marchMpls conference 2016-data center virtualisation-11-march
Mpls conference 2016-data center virtualisation-11-march
 
Data Consitency Patterns in Cloud Native Applications
Data Consitency Patterns in Cloud Native ApplicationsData Consitency Patterns in Cloud Native Applications
Data Consitency Patterns in Cloud Native Applications
 
Ch-7-Part-2-Distributed-System.pptx
Ch-7-Part-2-Distributed-System.pptxCh-7-Part-2-Distributed-System.pptx
Ch-7-Part-2-Distributed-System.pptx
 
SVCC-2014
SVCC-2014SVCC-2014
SVCC-2014
 
Leveraging the power of the unbundled database
Leveraging the power of the unbundled databaseLeveraging the power of the unbundled database
Leveraging the power of the unbundled database
 
Rhel cluster basics 2
Rhel cluster basics   2Rhel cluster basics   2
Rhel cluster basics 2
 
Java Abs Dynamic Server Replication
Java Abs   Dynamic Server ReplicationJava Abs   Dynamic Server Replication
Java Abs Dynamic Server Replication
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 

Plus de Ensar Basri Kahveci

Distributed Systems Theory for Mere Mortals - Software Craftsmanship Turkey
Distributed Systems Theory for Mere Mortals - Software Craftsmanship TurkeyDistributed Systems Theory for Mere Mortals - Software Craftsmanship Turkey
Distributed Systems Theory for Mere Mortals - Software Craftsmanship Turkey
Ensar Basri Kahveci
 

Plus de Ensar Basri Kahveci (15)

java.util.concurrent for Distributed Coordination - Berlin Expert Days 2019
java.util.concurrent for Distributed Coordination - Berlin Expert Days 2019java.util.concurrent for Distributed Coordination - Berlin Expert Days 2019
java.util.concurrent for Distributed Coordination - Berlin Expert Days 2019
 
java.util.concurrent for Distributed Coordination, Riga DevDays 2019
java.util.concurrent for Distributed Coordination, Riga DevDays 2019java.util.concurrent for Distributed Coordination, Riga DevDays 2019
java.util.concurrent for Distributed Coordination, Riga DevDays 2019
 
java.util.concurrent for Distributed Coordination, GeeCON Krakow 2019
java.util.concurrent for Distributed Coordination, GeeCON Krakow 2019java.util.concurrent for Distributed Coordination, GeeCON Krakow 2019
java.util.concurrent for Distributed Coordination, GeeCON Krakow 2019
 
java.util.concurrent for Distributed Coordination, JEEConf 2019
java.util.concurrent for Distributed Coordination, JEEConf 2019java.util.concurrent for Distributed Coordination, JEEConf 2019
java.util.concurrent for Distributed Coordination, JEEConf 2019
 
Replication Distilled: Hazelcast Deep Dive @ In-Memory Computing Summit San F...
Replication Distilled: Hazelcast Deep Dive @ In-Memory Computing Summit San F...Replication Distilled: Hazelcast Deep Dive @ In-Memory Computing Summit San F...
Replication Distilled: Hazelcast Deep Dive @ In-Memory Computing Summit San F...
 
Replication Distilled: Hazelcast Deep Dive - Berlin Expert Days 2018
Replication Distilled: Hazelcast Deep Dive - Berlin Expert Days 2018Replication Distilled: Hazelcast Deep Dive - Berlin Expert Days 2018
Replication Distilled: Hazelcast Deep Dive - Berlin Expert Days 2018
 
From AP to CP and Back: The Curious Case of Hazelcast (jdk.io 2018)
From AP to CP and Back: The Curious Case of Hazelcast (jdk.io 2018)From AP to CP and Back: The Curious Case of Hazelcast (jdk.io 2018)
From AP to CP and Back: The Curious Case of Hazelcast (jdk.io 2018)
 
Distributed Systems Theory for Mere Mortals - Software Craftsmanship Turkey
Distributed Systems Theory for Mere Mortals - Software Craftsmanship TurkeyDistributed Systems Theory for Mere Mortals - Software Craftsmanship Turkey
Distributed Systems Theory for Mere Mortals - Software Craftsmanship Turkey
 
Distributed Systems Theory for Mere Mortals - Topconf Dusseldorf October 2017
Distributed Systems Theory for Mere Mortals - Topconf Dusseldorf October 2017Distributed Systems Theory for Mere Mortals - Topconf Dusseldorf October 2017
Distributed Systems Theory for Mere Mortals - Topconf Dusseldorf October 2017
 
Distributed Systems Theory for Mere Mortals - GeeCON Krakow May 2017
Distributed Systems Theory for Mere Mortals -  GeeCON Krakow May 2017Distributed Systems Theory for Mere Mortals -  GeeCON Krakow May 2017
Distributed Systems Theory for Mere Mortals - GeeCON Krakow May 2017
 
Replication in the Wild - Warsaw Cloud Native Meetup - May 2017
Replication in the Wild - Warsaw Cloud Native Meetup - May 2017Replication in the Wild - Warsaw Cloud Native Meetup - May 2017
Replication in the Wild - Warsaw Cloud Native Meetup - May 2017
 
Distributed Systems Theory for Mere Mortals - Java Day Istanbul May 2017
Distributed Systems Theory for Mere Mortals - Java Day Istanbul May 2017 Distributed Systems Theory for Mere Mortals - Java Day Istanbul May 2017
Distributed Systems Theory for Mere Mortals - Java Day Istanbul May 2017
 
Replication in the Wild
Replication in the WildReplication in the Wild
Replication in the Wild
 
Distributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere MortalsDistributed Systems Theory for Mere Mortals
Distributed Systems Theory for Mere Mortals
 
Ankara Jug - Practical Functional Programming with Scala
Ankara Jug - Practical Functional Programming with ScalaAnkara Jug - Practical Functional Programming with Scala
Ankara Jug - Practical Functional Programming with Scala
 

Dernier

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 

Dernier (20)

Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 

Client-centric Consistency Models

  • 2. Data-centric Consistency Models - Maintains a globally-accessible and globally-consistent data store. - Linearizability, sequential consistency, …
  • 3. Client-centric Consistency Models - Instead of a globally-consistent view, maintains consistent views for individual clients. - Easier to deal with inconsistencies. - Eventual consistency, monotonic reads, monotonic writes, read your writes, writes following reads… [1], [5]
  • 4. Monotonic reads (MR) - If a client reads a data entry X, any successive read of X by the same client returns the same value or a more recent value.
  • 5. Monotonic WRITES (MW) - If a client first performs Write1 then Write2, Write1 is ordered and executed before Write2 on all copies of the data.
  • 6. Writes Following Reads (WFR) - The client makes a write operation: Write1. Then, it eventually observes result of Write1 with a ReadX, which is not necessarily the successive operation of Write1. After ReadX, the client makes a new write: Write2. - On all copies of the entry, Write1 is ordered and executed before Write2. - Happens-before relationship …
  • 7. Read Your Writes (RYW) - The effect of a write operation by a client on a data entry X will always be seen by a successive read operation on X by the same client.
  • 8. Session Guarantees for Weakly ConsistentReplicated Data [1] - Defines MR, MW, WFR and RYW guarantees using sessions. - A client connects to the system and operates within the boundaries of a session. - It can talk to a single server or a set of servers, and it can behave like a server. - Consistency guarantees are either ensured by the session manager in the client during the session, or the client learns that the guarantees cannot be continued, which means that the session has ended.
  • 10. Highly Available Transactions: Virtues andLimitations [2] - In the presence of arbitrary, indefinitely-long network partitions … - High availability: If a client can contact to a non-failing server, it eventually receives a response. - Sticky availability: If a client’s transactions is executed against a copy of the database that reflects all of its prior operations, the client eventually receives a response. - Any guarantee achievable in a highly-available system is also achievable in a sticky-available system, but not vice-versa.
  • 12. What does it mean? - You can get linearizability and sequential consistency in a CP system. - You can get MR, MW, WFR in an AP system. - If you have sticky sessions, you can get RYW in an AP system. Otherwise, you need a CP system for it. - MR + MW + RYW = PRAM consistency - PRAM + WFR = Causal consistency
  • 13. How does it work? - RYW against MR, MW and WFR - Delaying visibility of writes in MR, MW and WFR [2], [4]
  • 14. How TO map these models to hazelcast? - In a Hazelcast cluster: - Each partition has a single owner and possibly multiple backups. - All operations are executed on the partition owner. - Partition operations are linearizable in a stable Hazelcast cluster.
  • 15. DETECTING INCONSISTENCY CASES IN HAzELCAST - Can we detect if there is a possibility of data inconsistency on failures? - A hypothetical ConsistencyLostListener implementation - For the following examples, a single partition with 2 replicas is considered. Additionally, lets assume partition operations return partition version in responses and our proxy classes can track them.
  • 16. EXAMPLE #1: MR is lost
  • 17. EXAMPLE #2: RYW is lost
  • 18. EXAMPLE #3: RYW - Vector clocks NEEDED
  • 19. EXAMPLE #4: RYW with Vector clocks
  • 20. EXAMPLE #5: MW is lost. We need a Dirty flag.Same for WFR
  • 21. RECAP - Linearizability and sequential consistency is achievable in CP systems. - Hazelcast already provides linearizability on partition level in a stable cluster (e.g., no network partitioning or partition owner crash). - In AP systems, causal consistency is achievable with sticky sessions. - Hazelcast proxies already are already as they talk to partition owners. - Hazelcast proxies can detect the possibility of inconsistency situations. - On partition owner failure, they can check if they continue the current session or not.
  • 22. REFERENCES [1] Terry, Douglas B., et al. "Session guarantees for weakly consistent replicated data." Parallel and Distributed Information Systems, 1994., Proceedings of the Third International Conference on. IEEE, 1994. [2] Bailis, Peter, et al. "Highly available transactions: Virtues and limitations." Proceedings of the VLDB Endowment 7.3 (2013): 181-192. [3] https://aphyr.com/posts/313-strong-consistency-models [4] http://www.bailis.org/blog/stickiness-and-client-server-session-guarantees/ [5] http://www.allthingsdistributed.com/2008/12/eventually_consistent.html