Questions tagged [read-model]
The read-model tag has no usage guidance.
23
questions
0
votes
1
answer
44
views
How to load consistent test data into multiple applications (which communicate by message streams)?
I have a system landscape consisting of multiple applications.
Each application provides REST interfaces to communicate with the outside world.
Each application has its own data storage (some kind of ...
3
votes
1
answer
1k
views
Reducing the code duplication between read and write application in CQRS
I am building an application and trying to embrace Domain Driven design principles, CQRS and event sourcing.
We are having two applications one for reading and another for writing. The write ...
2
votes
1
answer
408
views
ES/CQRS: How to access additional information in projections
I'm developing an event-sourced/CQRS application and do not understand the best strategy to use when building the read model projections when additional domain data is needed. A partial representation ...
2
votes
3
answers
800
views
get aggregate id based on its data in it
I have an aggregate root called SizeRangeAggregate which holds the range of size of clothing piece dimension and price for that range.
I created an post rest API which create new SizeRangeAggregate. ...
6
votes
1
answer
9k
views
DTO vs. read model
If I understand the concept of read models correctly, then it's just a simple query to return a use case specific data set.
But a DTO seems to have the same purpose, but in a more complex way (...
1
vote
3
answers
615
views
Event Sourcing - Reconstituting Aggregate from Wrong Event Stream
I am working on a project to help learn DDD and am trying to do CQRS and Event Sourcing. Code is in C#.
For this example, lets say I have 2 aggregates, Customer and Product. My aggregate repository ...
6
votes
1
answer
4k
views
CQRS-Event Sourcing: how to process events in the expected order inside the read model
I'm looking for some insights about how to handle the read model in a CQRS Event Sourcing application, in order to do the best to ensure data consistency.
The missing point is how to be sure (...
0
votes
1
answer
886
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 ...
2
votes
4
answers
2k
views
Does CQRS need to be fire and forget, If we need to read guarantee after command?
I'm in researching phase of CQRS+ES. Never done in real world yet. But very soon.
However what I saw in StackOverflow and projects, CQRS seems to be fire and forget.
So what if there is a chain ...
2
votes
1
answer
1k
views
CQRS and microservices: passing information from one service to another
We're building two microservices that use CQRS and Event Sourcing: an Order Service and an Inventory Service. When an order is made, the inventory of that item must be decreased by the amount ordered. ...
15
votes
3
answers
5k
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
1
answer
1k
views
DDD - Same ID/Primary Key, different Aggragate Root class per Bounded Context
I am working on understanding DDD and want to see if this idea is sound, if it is common practice, and if there are any pitfalls or unforeseen complications.
I want to effectively have one "entity" ...
4
votes
2
answers
4k
views
How do event sourced systems make sure the read model is only updated once?
Currently looking into Event Sourcing in a Microservices architecture and I've found this article. It describes a possible implementation of CQRS and event sourcing.
If the logic dealing with updating ...
-1
votes
1
answer
746
views
CQRS + Event sourcing - event groups and event propagation
This is my current CQRS use-case setup:
Command DTO is received in application layer handler where we map Command DTO to appropriate domain objects if needed, re-hydrate aggregate root from repo and ...
12
votes
2
answers
3k
views
CQRS without DDD and without (or with?) ES - what is write model and what is read model?
As far as I understand, the big idea behind CQRS is having 2 different data models for handling commands and queries. These are called "write model" and "read model".
Let's consider an example of ...
2
votes
2
answers
1k
views
CQRS / DDD + Event Sourcing. Can the ReadModel read itself?
This is a question for those times you are creating the read model by event handlers.
The question comes down to : How can a Event Handler draw from other sources of information than what is ...
1
vote
1
answer
556
views
CQRS / DDD. Domain event and synchronisation with read model
I have a design question in the "field" of CQRS / DDD.
I will not explain in depth the domain, but only what's needed.
It's a CONTACT domain, so it manages the contact informations of people and ...
9
votes
3
answers
6k
views
CQRS and DDD terminology
Since CQRS and DDD do not imply one another I was curious what terms belong to DDD and what terms belong to CQRS. Because the two concepts are so much used together in the literature I usually mix ...
1
vote
2
answers
260
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 ...
8
votes
2
answers
4k
views
CQRS: How to restore read model
It's very interesting how to restore read model in system based on CQRS.
In regular mode system processes commands, creates domain events and posts them to message bus. Then another part of system (...
6
votes
1
answer
1k
views
Event sourcing – finding aggegate by different property than ID
Is there any mechanism or best practise for finding aggregates by different property than aggregate ID?
I'll try to explain my question on example.
There is Cart aggregate (event-sourced) and ...
2
votes
4
answers
2k
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 ...
1
vote
1
answer
492
views
Loading Aggregate Root from Database with Validations
Here is a similar question
Where to validate domain model rules that depend on database content?
I am asking this new question because I have more descriptions and I don't want to change the ...