45
votes
Accepted
What is the difference between Event Driven and Event sourcing?
The term Event driven architecture is used for any kind of software system which is based on components communicating mainly or exclusively through events. For example, almost any major GUI framework ...
26
votes
Accepted
Why Protobuf 3 made all fields on the messages optional?
proto3 makes a number of changes aimed (as I understand it) at making it far more usable in cross-platform scenarios. Explicit tracking of "assigned" vs "not assigned but reporting the default value" ...
25
votes
Accepted
ES / CQRS concurrency handling
I sketched my rough understanding on how an ES / CQRS app should look like contextualized to a simplified banking use case (withdrawing money).
This is the perfect example of an event sourced ...
21
votes
Accepted
Event sourcing, replaying and versioning
First, it is important to understand and be able to leverage the difference between Commands and Events.
As this question succinctly points out, Commands are things we would like to happen, and ...
21
votes
Accepted
Which comes first: event or the change?
Reminder: it is not your fault that you are confused; the literature sucks.
Which of these two approaches is truly Event Sourcing?
"Event sourcing", as spoken by Event Store, Eventide project, and ...
19
votes
Accepted
When using DDD and CRQS, should be exactly one event per command?
Since you tagged your question with "CQRS", I guess you mean events in a "CQRS & Event Sourcing" context, like it is described here. In this tutorial, the difference between events and commands is ...
18
votes
Accepted
How to implement a process manager in event sourcing
Review what Rinat Abdullin wrote about evolving business process. In particular, notice his recommendation for developing a business process in a fast changing environment -- a process manager is "...
16
votes
Accepted
CQRS and DDD terminology
CQRS and DDD are separate/orthogonal concepts, and I think you divided the terms pretty close to right.
Events under DDD are called Domain Events, and are somewhat different from the Messaging events ...
16
votes
Rehydrating Aggregates from a "snapshots" projection rather than the Event Store
What I'm not super clear on is why you would ever rehydrate your Aggregates from the Event Store itself.
Because the "events" are the book of record.
If projecting changes to "read" databases is ...
14
votes
How Add/Create* commands should be handled in CQRS + Event Sourcing architecture
The idea in Udi's post, as I gather, is that no kind of item appears out of thin air. There is (almost) always something, or more specifically, some domain operation, which caused the item to be ...
14
votes
Event sourcing - performance penalty?
I may be able to provide a bit of (biased) insight (that you shouldn't take at face value) since I recently had the pleasure to do a proof of concept in implementing eventsourcing for one of my ...
14
votes
Accepted
How do I deal with side effects in Event Sourcing?
How do I deal with side effects in Event Sourcing?
Short version: the domain model doesn't perform side effects. It tracks them. Side effects are performed using a port that connects to the ...
13
votes
Accepted
Event sourcing and REST
I think you may have a user-process to implementation mismatch here.
First: will a user honestly want to perform multiple changes to a file simultaneously?
A rename (which may or may not include a ...
13
votes
In CQRS/ES, can a command create another command?
In retrospect, I think I was complicating the issue.
In general, commands should either throw an exception or raise one or more events.
If I could summarise the architecture of Event Sourcing it ...
11
votes
When using DDD and CRQS, should be exactly one event per command?
Usually one command will lead to one event. But in some cases it can also be more than one, it depends on your implementation.
Either your command calls other commands and each of them fire own ...
11
votes
When using DDD and CRQS, should be exactly one event per command?
One command can raise multiple events. It is simply logical conclusion of one fact : Composite command exists.
Lets say you have two commands, each raising an event. Then, you create a composite ...
11
votes
How to handle transactional operations in an event-driven architecture?
In my experience, most questions about transactionability and microservices are caused by the following two reasons:
The transactional data is placed in different microservices: This is wrong by ...
11
votes
Saving high-frequency events to a connection-limit constrained database
My guess is that you need to explore more carefully an approach that you have rejected
Enqueue the events on our server
My suggestion would be to start reading through the various articles published ...
10
votes
DDD, CQRS, ES - is it worth it or it just waste of time?
Well they are three separate things and they are real things not just buzz words. But....
Domain Driven Design. I've seen this used quiet commonly now, at least in a 'lite' fashion. I think it does ...
10
votes
Accepted
"event sourcing" vs. "event logging" architecture pattern?
Event Sourcing means that you build the current state of an object from a history of events.
Event Logging just means you log the events.
In order to make Event Sourcing work, you have to do a few ...
9
votes
Accepted
Event sourcing – finding aggegate by different property than ID
You could use an index. This is generally not something that you will find in an eventstore, so you will most likely need to use an external indexing engine for this.
This index would then have to ...
9
votes
Accepted
Saving high-frequency events to a connection-limit constrained database
Input stream
It is not clear if your 1000 events/second represent peaks or if it's a continuous load:
if it's a peak, you could use a message queue as buffer to spread the load on the DB server over ...
8
votes
Accepted
CQRS/ES in haskell, using "Out of the tar pit" paper architecture
With the CQRS/ES in mind, I have a decision engine. The decision engine for producing an event from a command, is the Business Domain, which has to be purely functional.
Good.
When a command asks ...
8
votes
Accepted
CQRS, How to query aggregate root using others fields rather than GUID (ID)?
CQRS/ES is a tricky architecture in many aspects and you've found one of them.
First of all, since you're storing events it is very hard to query an entity based on its data since you don't actually ...
8
votes
Accepted
Why "Event sourcing an entire system is a big mistake and considered an anti-pattern"?
Event Sourcing is hard and doesn't achieve a great deal on its own.
Also, People confuse Event Sourcing with a whole tonne of other things and find that they haven't achieved what they expected at ...
7
votes
Event sourcing, one event, state of two aggregates changed
When transferring it's different - two aggregates must be modified by one MoneyTransferred event.
Transferring money is a separate act from updating the ledgers.
MoneyTransferred
AccountCredited
...
7
votes
DDD, CQRS, ES - is it worth it or it just waste of time?
Sometimes the most important principles in software engineering are K.I.S.S and Y.A.G.N.I.
All software engineering principles, guidelines, methodologies are merely suggestions which exist to steer ...
7
votes
Accepted
CQRS-Event Sourcing: how to process events in the expected order inside the read model
The infrastructure for the event sourcing is an event store which saves the events as documents inside a MongoDB collection and then publish a corresponding message to a service bus, so that with a ...
7
votes
Accepted
Reducing the code duplication between read and write application in CQRS
It's pretty natural to have some duplication between the Command side and Query side, starting with knowing the same essential Events and payload structures. While standard structures might still be ...
7
votes
Accepted
Event Sourcing - Multiple events or a single for a change on one aggregate?
Short answer: You should generate two events.
A single command invocation can lead to multiple events, so generating more of them really isn't an issue. But why exactly would you want to do that in ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
event-sourcing × 253cqrs × 120
domain-driven-design × 108
microservices × 33
architecture × 32
eventual-consistency × 18
aggregate × 15
design-patterns × 14
read-model × 14
event-programming × 13
design × 11
c# × 9
event × 8
architectural-patterns × 7
database × 6
domain-model × 6
apache-kafka × 6
rest × 5
enterprise-architecture × 4
distributed-system × 4
distributed-computing × 4
persistence × 4
database-design × 3
sql × 3
concurrency × 3