Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [eventual-consistency]

The tag has no usage guidance.

0
votes
1answer
61 views

DDD - Handling temporary inconsistency when handling domain events

I realize that DDD advocates eventual consistency, thus allowing for a certain period of time in which the system might be inconsistent. Embracing eventual consistency, we can therefore model our ...
0
votes
2answers
398 views

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 ...
2
votes
2answers
55 views

How to implement semantics of serializability in eventually consistent system?

In a distributed asynchronous system serializability cannot be achieved, but we still have to somehow provide the semantics. Consider quite natural requirement that user must have unique email or no ...
4
votes
4answers
426 views

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 ...
2
votes
0answers
61 views

UI syncing in case of bulk operation api

In a CQRS system, the convention that we follow is we render the detail view of an aggregate(i.e getById) using the write model and views containing multiple aggregates(like a dashboard) using read ...
2
votes
0answers
49 views

How to design a sync api exposed to third party which involves a business transaction across aggregates?

Business Domain In the Sales domain, I have 3 entities - Lead, Contact and Opportunity. A lead is injected into the system from many sources and nurtured. If it is a prospect then it is converted ...
3
votes
3answers
99 views

How are new bounded contexts deployed, and bugs fixed, in message-driven “autonomous” microservice architectures?

I'm coming from the monolith background, using a single large relational database. From my research, many proponents of the microservice architecture favor the event-driven rather than REST driven ...
0
votes
1answer
132 views

Dealing with eventual consistency when persisting and publishing events

Currently working on a DDD application that is using event sourcing with redis as my main persistence store. So unfortunately I do not have built in rollbacks should something fail. The application is ...
0
votes
1answer
53 views

Strategy for ensuring consistency when integrating using an API?

How do I ensure consistency between two separate systems which store and maintain the same set of data, when the method of communication between them is REST APIs and webhooks? Is it possible? I find ...
5
votes
2answers
273 views

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 ...
0
votes
1answer
110 views

CQRS, What reasons cause read model update delay? How to prevent user from taking inconsistence data?

I am considering CQRS for building a realtime game server (not gameplay but the economy). For some reasons. Scaling, Event logging, Model changing. However in realtime game when player upgrade, for ...
3
votes
2answers
154 views

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 ...
2
votes
1answer
128 views

High scale architecture using Event Sourcing and Eventual Consistency

I want to share with you and know what your opinion/improvements are regarding a solution I was tasked with a technical interview I faced. The exercise: You need to create an API which will indicate ...
6
votes
0answers
83 views

Is the C in the CAP theorem the same as the I in ACID? [duplicate]

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 ...
5
votes
2answers
395 views

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 ...
6
votes
2answers
186 views

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 ...
11
votes
3answers
2k views

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 ...
2
votes
1answer
678 views

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. ...
3
votes
2answers
2k views

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 ...
20
votes
5answers
7k views

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 ...
2
votes
2answers
367 views

How to model a shopping scenario using event sourcing

I am trying to program a simple shopping scenario using event sourcing: --------------- --------------- ---------------- | OrderService | | ProductService | | PaymentService | ---------...
4
votes
2answers
103 views

How to to send a file and record that it has been sent in an atomic way?

I'm not sure how to best approach this problem. I've got an object in my local database, for example this one: { title: "my-object", uploaded: false } I convert this to a file, say my-object.txt and ...
2
votes
1answer
613 views

Event Driven Microservice Race Condition

Say we have 4 services, A through D, which communicate (for the most part) through some sort of asynchronous event-driven system. When a new entity is created in A, B & C receive that event. B ...
0
votes
1answer
410 views

Eventual consistency and event sourcing

How to handle a next kind of situation in general: I've defined two aggregate root types AR1 and AR2. The AR2 holds value-based identity of the AR1. I have to keep eventual consistency between those ...
3
votes
1answer
308 views

How to recognize consumers in AMQP architecture

I'm doing an project where I'm using a microservice architecture. All the services within this architecture communicate with each other using an AMQP broker (RabbitMQ). When something happens in a ...
3
votes
2answers
412 views

User interface and process that involves asynchronous communication between several microservices

System consists of several micro-services and each of them is in charge of it's own context, such as booking, payment, products and notifications. Let's imagine we have a traveler who is seeking ...
3
votes
1answer
211 views

Domain Events Groupping/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 ...
13
votes
2answers
2k views

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 ...
2
votes
1answer
681 views

Can “REST without PUT” support optimistic locking using ETags?

Rest without PUT models immutable, append-only (event-sourced) state changes by favouring POST-ing new reified change resources over PUT-ing updates to original. Example: making and then changing a ...
1
vote
2answers
210 views

Saga's and Query model transaction ordering

I have the following Ubiquitous language defined by our domain expert: A User can find UserGroups and add himself to it. A user can query a list of UserGroups where he is member of and remove himself ...
5
votes
1answer
1k views

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"...
17
votes
8answers
1k views

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 ...
2
votes
2answers
512 views

Domain driven design with eventual consistency

My domain aggregate is struggling with simple business logic so I feel like I have modeled it incorrectly. The architecture I have right now uses domain driven design with event sourcing. The domain ...
2
votes
4answers
1k views

CQRS: Query write model

Context: User wants to edit entity details, say user name. Assuming the fact that the Read Model is eventually consistent with the Write Model is it conceptually wrong to query write model in order ...
2
votes
1answer
869 views

DDD - Effective Aggregate Design Questions

I just read Effective Aggregate Design, by Vaughn Vernon. Summarizing the takeaway: Model true invariants Design small aggregates Reference other aggregates by identity Use eventual consistency ...
2
votes
2answers
954 views

What is eventual consistency?

I've heard people talking about "eventual consistency" (for example in this question and this answer). What is "eventual consistency"? How does it compare to "transactional consistency"? When does it ...