Questions tagged [eventual-consistency]

74 questions
26
votes
6 answers

Microservices: Handling eventual consistency

Assume we have a function that updates a User's password. Once the 'Update Password' button is clicked, an UpdatePasswordEvent is sent to a topic where 3 other services are subscribed: A service that actually updates the User's password A service…
mpmp
  • 781
  • 3
  • 8
  • 12
18
votes
8 answers

How do I write tests against an eventually consistent service?

I'm building a service on top of Google App Engine Datastore, which is an eventually consistent data store. For my application, this is fine. However, I'm developing tests that do things like PUT object and then GET object and checking properties on…
17
votes
2 answers

DDD: Why is it a bad practice to update multiple aggregate roots per transaction?

Quoting from Vaughn Vernon: When two or more Aggregates have at least some dependencies on updates, use eventual consistency. He further goes on to suggest that one could make use of Domain Events to publish actions to the other Aggregate Roots…
nicholaswmin
  • 1,869
  • 2
  • 18
  • 36
15
votes
3 answers

Rehydrating Aggregates from a "snapshots" projection rather than the Event Store

So I've been flirting with Event Sourcing and CQRS for a while now, though I've never had the opportunity to apply the patterns on a real project. I understand the benefits of separating your read and write concerns, and I appreciate how Event…
MetaFight
  • 11,549
  • 3
  • 44
  • 75
12
votes
4 answers

How to handle transactional operations in an event-driven architecture?

I'm trying to flesh out an eCommerce system using microservices (.NET Core and Kubernetes), event sourcing (Kafka), and CQRS. The particular use case I've been thinking about is as follows. There is an inventory microservice designed to use CQRS. …
12
votes
2 answers

Patterns for maintaining consistency in a distributed, event sourced system?

I've been reading on event sourcing lately and really like the ideas behind it but am stuck with the following problem. Let's say you have N concurrent processes which receive commands (e.g. web servers), generate events as a result and store them…
9
votes
2 answers

DDD - Domain events vs application events

I'm considering two types of notifications: Domain events used internally within a bounded context Application events used to exchange notification messages between bounded contexts Each aggregate in my bounded context defines its own…
6
votes
3 answers

DDD: deciding when to lean towards eventual vs transactional consistency

I am reading Vaughn Vernon's series of articles about effective aggregate design. On the subject of deciding between transactional vs eventual consistency, it states the following: Discussing this with Eric Evans revealed a very simple and sound…
6
votes
0 answers

Is the C in the CAP theorem the same as the I in ACID?

This article states that: Consistency in CAP actually means linearizability, which is a very specific (and very strong) notion of consistency. In particular it has got nothing to do with the C in ACID The article goes on to define…
antonro
  • 249
  • 1
  • 9
6
votes
2 answers

Designing event-driven architecture for multiple services

I've created about a dozen services for a intranet. Now I've gotten to the point that these services are more coupled to each other than I'm comfortable with, and I've been having problems where once service can cause a few other service to degrade.…
6
votes
2 answers

Is the C in ACID is not the C in CAP?

We know that for Database Systems - the Consistency in ACID properties is part of the acronym: A - Atomicity C - Consistency I - Isolation D - Durability We know that for NoSQL Systems, the Consistency in the CAP Theorem is part of the acronym: C -…
hawkeye
  • 4,819
  • 3
  • 24
  • 35
5
votes
2 answers

How is Eventual Consistency (EC) better than Strong Consistency (SC) when N = 3, R=W=2 when SC gives better consistency gurantee in same config?

In dynamo paper, it says that in production most of the users set N = 3, R = 2 and W = 2. The common (N,R,W) configuration used by several instances of Dynamo is (3,2,2). These values are chosen to meet the necessary levels of performance,…
Ashish Negi
  • 251
  • 2
  • 8
5
votes
2 answers

Domain Events Grouping/Buffering

Suppose I have 3 domain events, Event1 Event2 and Event3. When command arrives at my Service Layer, I can rise 2 commands at the same time - e.g. Event1 and Event2. One Class has event listener for both events, but it should basically wait until…
5
votes
1 answer

Event Sourcing , sagas, bus and eventual consistency

I am currently learning about Event Sourcing via the book Microsoft .NET - Architecting Applications for the Enterprise. Event sourcing is, in my own words, an architectural pattern of storing "events" instead of "current entities". Current entities…
4
votes
1 answer

Event-driven architecture and synchronization with a "First-timer microservice"

I'm working on a distributed application and getting deeper into Event-Driven architectures with Microservices. Let's say I have been running two Microservices, CustomerService and AccountService. They both have their own database, and they've been…
1
2 3 4 5