Questions tagged [eventual-consistency]

Eventual consistency is a consistency model used in distributed computing that informally guarantees that, if no new updates are made to a given data item, eventually all accesses to that item will return the last updated value.

Eventual consistency is widely deployed in distributed systems (often under the moniker of optimistic replication) and has origins in early mobile computing projects. A system that has achieved eventual consistency is often said to have converged, or achieved replica convergence. While stronger models, like linearizability are trivially eventually consistent, the converse does not hold.

Eventually consistent services are often classified as providing BASE (Basically Available, Soft state, Eventual consistency) semantics (in contrast to traditional ACID (Atomicity, Consistency, Isolation, Durability) guarantees).Eventual consistency is sometimes criticized as increasing the complexity of distributed software applications. This is partly because eventual consistency is purely a liveness guarantee (reads eventually return the same value) and does not make safety guarantees: an eventually consistent system can return any value before it converges.

Wikipedia

278 questions
5
votes
3 answers

How do you ensure consistent client reads in an eventual consistent system?

I'm digging into CQRS and I am looking for articles on how to solve client reads in an eventual consistent system. Consider for example a web shop where users can add items to their cart. How can you ensure that the client displays items in the cart…
Marius
  • 9,208
  • 8
  • 50
  • 73
4
votes
3 answers

Ensuring database consistency

If I have a distributed database that is eventually consistent, what happens if I have something like a site where I'm selling products and I'm changing the price of an item? If a product has price X and I update it to price Y, some versions of the…
Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
4
votes
1 answer

Event Sourcing/CQRS doubts about aggregates, atomicity, concurrency and eventual consistency

I'm studying event sourcing and command/query segregation and I have a few doubts that I hope someone with more experience will easily answer: A) should a command handler work with more than one aggregate? (a.k.a. should they coordinate things…
4
votes
2 answers

Best practice to make client handle eventual consistency of microservices

I've been reading some articles and questions on eventual consistency and choreographing microservices, but I haven't seen a clear answer to this question. I'll phrase it in generic terms. In a nutshell: if a client historically makes subsequent…
4
votes
1 answer

Microservice architecture - Data initialization

we are trying to create a microservice based software. I like the thought, that all services should work on it own and hold all data that it needs. Also i like the concept that i hold datas up-to-date by messaging, so sending Created/Updated/Deleted…
4
votes
2 answers

Does Amazon S3 support multi-file atomic uploads?

I'm developing a system against Amazon's S3. I'm doing it in C# using S3's .NET SDK. I want to upload several files to S3 at once but if any one fails I want all of them to fail. Can I do this? How? Does the SDK's TransferUtility.UploadDirectory do…
devlop
  • 1,168
  • 1
  • 8
  • 19
4
votes
2 answers

Understanding consistency in distributed systems

How do you get high-frequency, consistent read/writes on a distributed system? Generally not sure how to conceptualize consistency on large scale systems. Use case: Prevent a user from performing the same action within a specified time period. In…
4
votes
1 answer

How to achieve immediate consistency in microservice architecture?

For example amazon.com; they rely on microservice architecture and probably order and payment are seperate micro services but when you checkout order on amazon.com you can finally see the order id and details.If it's not eventual consistency…
4
votes
2 answers

Cassandra concurrent writes

How does Cassandra guarantee eventual consistency when concurrent writes happen? For example, Client A writes to tableA.rowA.colA, while at the same time Client B writes to tableA.rowA.colA. The coordinator nodes distribute the request to the…
user1947415
  • 933
  • 4
  • 14
  • 31
4
votes
2 answers

Cassandra - cqlsh returns inconsistent results even if CONSISTENCY LEVEL set to ALL or QUORUM

I have a Cassandra cluster with 4 nodes. I have a keyspace with replication factor 3. Here are the sample cqlsh results I get when I do "select count(*) on a particular table. The results are consistently different even if consistency level is…
4
votes
3 answers

Repository where the aggreate root has a composite primary key

Repositories are supposed to work as boundaries for aggregate roots, i.e. IRepository would offer CRUD functionality that transactionally saves data to the DB. So far so good. But what if the aggregate has a composite primary key? In my…
4
votes
1 answer

What is the scope of WaitForNonStaleResultsAsOfNow in RavenDB

If I run the following query on an existing RavenDB session: var result = session.Query() .Customize(x => x.WaitForNonStaleResultsAsOfNow()) .Where(l => l.Name = "Home" && !l.Deleted); Which indexes does…
Luke Merrett
  • 5,724
  • 8
  • 38
  • 70
4
votes
3 answers

AWS DynamoDB read after write consistency - how does it work theoretically?

Most of the nosql solution only use eventually consistency, and given that DynamoDB replicate the data into three datacenter, how does read after write consistency is being maintained? What would be generic approach to this kind of problem? I think…
4
votes
1 answer

How do I calculate how long eventual consistency takes to become consistent?

I am beginning to investigate nosql and document-oriented databases to store assets for HTML5 apps we are going to be serving on our website. This is intended to be a replacement for just storing files on the filesystem. They will be small,…
user151841
  • 17,377
  • 29
  • 109
  • 171
4
votes
3 answers

How should I handle eventual consistency in SimpleDB, particularly in relation to unit testing?

We're building a web app on top of the Amazon Web Services stack, and I'm loving it so far. We're also making full use of test driven development and that is also proving to be fantastic. I'm just hoping someone can help me out with an issue I've…
joelg
  • 83
  • 1
  • 9