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
7
votes
2 answers

Is CloudKit strongly consistent, or eventually consistent?

Do the official docs talk somewhere about CloudKit consistency? According to my tests it appears to be eventually consistent – reading a record immediately after writing it might work and might not (returning empty results): CKDatabase *database =…
zoul
  • 102,279
  • 44
  • 260
  • 354
6
votes
1 answer

It is possible to manage users/identities in a data store that exhibits eventual consistency?

Is it possible to create/store user accounts in a data store that exhibits eventual consistency? It seems impossible to manage account creation without a heap of architectural complexity to avoid situations where two account with the same UID (e.g.…
JBowen
  • 125
  • 1
  • 5
6
votes
4 answers

How to save message into database and send response into topic eventually consistent?

I have the following rabbitMq consumer: Consumer consumer = new DefaultConsumer(channel) { @Override public void handleDelivery(String consumerTag, Envelope envelope, MQP.BasicProperties properties, byte[] body) throws IOException { …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
6
votes
2 answers

CQRS read side, multiple event stream topics, concurrency / race conditions

I'm having an issue with (re)applying events from multiple topics in the correct order on the read / query side. Example: On the write / command side, we have 2 Aggregates with an n:m relationship: Contact Group Those Aggregates produce the…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
6
votes
1 answer

DDD structure example

I am trying to structure an application using DDD and onion/hexagonal/clean architecture (using Java and Spring). I find it easier to find guidance on the concepts themselves than actually how to implement them. DDD in particular seems rather…
6
votes
3 answers

How to handle concurrent constraints across aggregate roots

I'm afraid I already know the answer, but I'm hoping that somebody can provide an alternative solution that haven't found before. As always doing DDD according to Effective Aggregate Design is more difficult than I thought, but here's my scenario.…
5
votes
1 answer

Transaction with Cassandra data model

According to the CAP theory, Cassandra can only have eventually consistency. To make things worse, if we have multiple reads and writes during one request without proper handling, we may even lose the logical consistency. In other words, if we do…
aXqd
  • 733
  • 5
  • 17
5
votes
1 answer

How to know when data has been inserted in clickhouse

I understood that clickhouse is eventually consistent. So once an insert call returns, it doesn't mean that the data will appear in a select query. does that apply to stand-alone clickhouse (no distribution, no replication)? I understand the…
Juh_
  • 14,628
  • 8
  • 59
  • 92
5
votes
2 answers

CQRS/Eventual Consistency - Handling Read Side Update Failure

I am interested in how others have handled a Read Side DB update failure in CQRS/Event Sourcing eventually consistent systems. I have such a system that could append an event to my event store, and then for some reason fail to update a corresponding…
5
votes
1 answer

Anyone know of a good pattern for keeping a user interface consistent whilst using eventually consistent data updates

Scenario is a grid with a list of contacts. User clicks on 'send email' from grid, sends an email. We drop a message in a queue to update some aggregates (which are also displayed on the list). The problems is after sending the email, the…
Tom DeMille
  • 3,207
  • 3
  • 23
  • 30
5
votes
2 answers

Are there any general algorithms for achieving eventual consistency in distributed systems?

Are there any algorithms that are commonly used for achieving eventual consistency in distributed systems? There are algorithms that have been developed for ACID transactions in distributed systems, Paxos in particular, but is there a similar body…
Rob Lachlan
  • 14,289
  • 5
  • 49
  • 99
5
votes
0 answers

Consistent Reads in CloudSearch

CloudSearch's results are only Eventually Consistent. In 95% of my application, this is an acceptable tradeoff for the performance and redundancy that it provides. In that last 5% though, I find myself POSTing a new SDF Document, and then…
5
votes
4 answers

Domain events and versioning without CQRS

Hi I have the following senario which I dont understand how to get eventual consistency with: User 1 uses Task based ui to change customer name App Service calls operation on the aggregate Aggregate fires event on customername changed bus sends…
5
votes
2 answers

Eventualy consistent distributed database with idempotent increase operator?

Is there a distributed high availability, eventually consistent db that supports idempotent operation on scalar values? If we use normal updates then there is a possibility that we will have 2 different values on different nodes and none of the…
5
votes
3 answers

Eventually consistent mnesia database with erlang. Best practices anyone?

I'm writing a bittorrent tracker in erlang. Given the nature of the service, I won't need absolute consistency (ie. a client can be perfectly happy with a slightly outdated list of peers or torrent status). My strategy so far has been to create…
Matteo Caprari
  • 2,869
  • 4
  • 27
  • 35
1 2
3
18 19