Questions tagged [event-sourcing]

Architectural pattern that manages the current state as the result of a sequence of events that are captured and stored and each trigger a state change.

Filter by
Sorted by
Tagged with
-2 votes
3 answers
107 views

Microservices messaging and coupling [duplicate]

So I am designing some microservices that communicate via messaging and event queues. However, if I update a message class, for example remove a field, this will break several participating ...
Bladerider1's user avatar
0 votes
1 answer
80 views

How do model a command that returns a result in an event storming?

I have a discussion with a colleague regarding how to model a command that immediately gets an answer to it's HTTP POST request back. In this specific case we do an API call to a 3rd party IDP API ...
floriank's user avatar
  • 471
1 vote
1 answer
307 views

How to handle aggregations of out-of-order events in an event stream?

I'm interested in integrating with an external system which uses webhooks to notify clients of events. The system is very similar to Stripe - the REST endpoints have rate limits to avoid undue polling ...
Paymahn Moghadasian's user avatar
0 votes
0 answers
110 views

Event sourcing, bulk update and storing multiple events vs one event with multiple ids

Event-sourcing often implies to have one row per aggregate id : event_id event_type entity_type entity_id event_data 102 OrderCreated Order 101 {...} 103 OrderUpdated Order 101 {...} This is ...
djflex68's user avatar
1 vote
4 answers
900 views

Best practices for delayed actions in event-driven architecture

I'm working on an event-driven system and I'm facing a problem I never considered before. There is a particular user command - let's call it "A" - that must be processed possibly with a ...
Robert Hume's user avatar
2 votes
1 answer
648 views

In an event-driven system, what are the best practices around the number of events and size/atomicity?

If you can have one event with multiple "things to process" or one event per thing to process, what is considered the best practice? Bearing in mind, the former option may involve persisting ...
Dr. Thomas C. King's user avatar
0 votes
2 answers
158 views

Is it a good/bad practice for a service to send events to itself via an external queue?

Imagine there is an Order entity that has a lot of states and conditional transitions between them. At the moment it is stored in a relational DB. There are multiple consumers of Orders that perform a ...
svz's user avatar
  • 307
0 votes
1 answer
268 views

How to handle related entities in an event sourced aggregate

I'm adventuring myself in the world of ES and CQRS and I've been reading a lot about it. Unfortunately, most materials don't go beyond the basics and when you start trying to apply it to real-world ...
rbasniak's user avatar
  • 142
0 votes
1 answer
35 views

How to generate a status time duration matrix from Status event log?

I am trying to create a duration matrix, that is, time spent in each status based on the status transition event logs. I have the following event log where status transition time along with old and ...
Vivek's user avatar
  • 3
0 votes
1 answer
106 views

How is model reconstructed with event sourcing in CQRS principle?

I'm trying to understand the CQRS design. As far as I know now, every time a change to a model is saved, the (state) change is stored as a separate record. When reading a model, the model is ...
user2190492's user avatar
0 votes
0 answers
71 views

Event sourcing authentication remeber_me token best practices

I have a system that uses event sourcing. https://laravel.com/docs/5.8/authentication#remembering-users I'm trying to replicate the functions of the basic Laravel authentication. However with event ...
Ten Jones's user avatar
2 votes
3 answers
396 views

How to implement HATEOAS with CQRS?

Let's say I have a CQRS system where my write model contains the business rules. My read model is simply a DTO; it is a collection of properties and "dumb". Now if you were to create a REST ...
S. ten Brinke's user avatar
1 vote
2 answers
592 views

How do event sourcing services recreate the state of an entity?

I'm reading about event sourcing and have a question regarding the recreation of an entity state. For a simple scenario, lets say we have Order events such as OrderCreated / OrderUpdated / ...
jhthewow's user avatar
0 votes
0 answers
195 views

How to model an event-driven system for replays

Let's say I have a system to which I can upload documents via an API. There are three services: the UploadService - responsible for providing a HTTP endpoint the StorageService - responsible for ...
AutomatedMess's user avatar
1 vote
1 answer
311 views

"Protect" published events using auth, Event driven architecture

I have a system that publishes events to a message broker, lets call that system A. I also have system B and system C that subscribes to the "events"/messages. My payload/message looks like ...
Inx51's user avatar
  • 271
-1 votes
1 answer
149 views

Checking a related aggregate existence is Domain concern?

This is my specific situation: I am following DDD and Event sourcing to implement my application (using C#). I have a Domain layer that contains Aggregates' implementation. I write unit tests for this ...
Mehrdad's user avatar
  • 99
0 votes
1 answer
78 views

How to get analytical information from a microservices system?

In an event-driven microservice architecture, imagine we have three services: Customer service Order service Item service Each service raises an event with data when something happens and stores ...
lewislbr's user avatar
  • 129
0 votes
2 answers
336 views

Event driven architecture conditional logic

As this article explains the way to deal with persistent state in an event log driven architecture is to have some "microservice" subscribed to events and be responsible for maintaining that ...
user3279360's user avatar
1 vote
1 answer
229 views

What to improve/change and how to move forward with my Event Storming session?

I'm doing alone session with Event Storming for my application that I plan to build with DDD approach later on. Event Storming session is for learning purposes. My application domain logic is rather ...
XardasLord's user avatar
0 votes
1 answer
207 views

Is publishing to the same event store stream from multiple places an anti pattern in a distributed transaction?

Below is a little context to the problem I'm trying to solve. There are two separate microservices with separate frontends , APIs and databases. Customer Microservice - Manages customers Orders ...
cah1r's user avatar
  • 302
2 votes
1 answer
170 views

How do we maintain consistent-read promise to clients + handling ID collision when using a fallback queue?

In my company, we are using Event Sourcing pattern to implement a storage for all changes to the price of a booking. Across the company, different services might try to append events to a booking ...
JamesBoyZ's user avatar
  • 245
0 votes
2 answers
246 views

How to publish single event from multiple services

Let's say I have a system that parses network traffic, and generates event of things that happened. example: ip1 was talking to ip2 ip2 was talking to ip3 etc Now let's say that these events are ...
Alon Gouldman's user avatar
3 votes
3 answers
241 views

Coping with lack of infinite retention event broker in event driven architecture

I am reading “Building Event Driven Microservices”. It states a requirement of the event broker is: Infinite retention: Event streams must be able to retain events for an infinite period of time. ...
MattHH's user avatar
  • 119
1 vote
3 answers
491 views

Event Sourcing inside a RDBMS

I'm thinking about using an Event Sourcing / Event Store pattern in my RDBMS designs. What I mean by Event Store is a pattern where each data mutation (INSERT / UPDATE / DELETE) is persisted as an ...
Tobia's user avatar
  • 111
0 votes
0 answers
207 views

Saga / Processmanager?

I'm thinking about this scenario: I can receive customer inquiries by Email. Those inquiries can be sent from existing customers or unknown "customers" - I'll call latter "Leads". ...
Alex's user avatar
  • 1
2 votes
2 answers
136 views

Event Sourcing questions

I have a question regarding the architecture of microservices and event sourcing. Imagine that I have the User service and the Franchise service. In the Users entity on the user service I have an ...
Omar Sánchez Pizarro's user avatar
0 votes
1 answer
370 views

Are RabbitMQ Streams overkill for 1 machine event-driven architecture aplication?

If developing event-driven application(more precisely event sourcing application) that will run solely on 1 machine are RabbitMQ Streams an overkill, or maybe a misfit? In theory RabbitMQ Streams seem ...
NoSenseEtAl's user avatar
0 votes
0 answers
88 views

How to identify an event stream?

I recently started discovering event sourcing so I am fairly new on the subject. Imagine having a system (system A) which listens to events of a third party order service (system B). These events can ...
ChThy's user avatar
  • 101
1 vote
2 answers
1k views

In CQRS/ES should database calls be done in command handlers or domain models?

In the context of a DDD application following CQRS and the event sourcing pattern, I have 2 questions. At which layer should the direct calls to the Infrastructure layer be made? At the Application ...
andresantacruz's user avatar
3 votes
0 answers
473 views

Implementation of projections in event-sourced system

I'm working on a application which uses event-sourcing and CQRS to define it's domain model. Background We have implemented projections to aggregate stream of all domain events into a read models used ...
Euphoric's user avatar
  • 37.3k
0 votes
2 answers
205 views

How to build an event sourced system with AWS (Specifically, how to deal with side effects)

So the current setup is a typical event sourced system built on AWS: Lambdas exposed with API Gateway to get the orders (commands), the domain (aggregates) apply some validations after loading the ...
Ali_Nass's user avatar
  • 101
1 vote
1 answer
567 views

In CQRS/ES where does an Aggregate Root belong?

Disclaimer: This question may be related to the framework I'm using to support CQRS/ES rather than the concepts themselves but many of these frameworks implement the same strategies, making me think ...
Kepboy's user avatar
  • 111
0 votes
1 answer
646 views

How do I implement a domain entity behaviour that depends on some external infrastructure?

I am in the process of developing some software using CQRS, ES and DDD. A part of the system is writing services for controlling devices and collecting data from them. Consider a "Start" ...
fanie42's user avatar
  • 11
0 votes
3 answers
2k views

How can I coordinate updating multiple Aggregates as a result of one command, without introducing exploitative possibilities?

I'm trying to figure out how to integrate one command that updates multiple Aggregates in different contexts in a video game. The components/considerations for my particular design are DDD, CQRS, ...
Zymus's user avatar
  • 2,443
2 votes
1 answer
202 views

What is the relationship between Event Store and Persistence Mechanism when designing Aggregate + Event Sourcing?

I'm trying to implement an Event Store, to be used with Aggregate+Event Sourcing (A+ES), and I've run into I think a gap in understanding. I'm reading Implementing Domain Driven Design, using both the ...
Zymus's user avatar
  • 2,443
2 votes
2 answers
536 views

How can we update potentially many Read Model Projections based on an Event that is not within the native context?

I have a Shop which sells Items for a given Price. To be clear, this is in the context of a video game, not an enterprise ERP system. The game operator can create Shops that Players can use to buy ...
Zymus's user avatar
  • 2,443
0 votes
2 answers
722 views

In an event sourced system, how do I get a current state of an entity?

Let's assume I use Kafka as an event store and put there all the lifecycle events of an order. Now I need to get the current state of this order in my system in during some business process. What's ...
lamb_bd85's user avatar
6 votes
2 answers
2k views

In DDD Aggregate + Event Sourcing, do Events happen before or after state changes?

Part of the Aggregate + Event Sourcing (A+ES) methodology feels uncomfortable. Why does it feel uncomfortable? (As I've read from other questions and the book itself, it's a new-ish way of thinking, ...
Zymus's user avatar
  • 2,443
0 votes
2 answers
213 views

Event sourcing: Does it make sense for immutable entities?

I'm on a project which often follows the trends, so whatever works for big cool companies, will surely work for us, regardless the contexts and specifics. If that sounds like a little rant, then it is....
Ondra Žižka's user avatar
2 votes
1 answer
788 views

Upholding business logic and invariants in an event sourced CQRS architecture

My understanding of a CQRS architecture is that a micro-service is split to two servers each with its own database such that the first server handles all the writes and the second server handles all ...
VOLK 14's user avatar
  • 23
0 votes
1 answer
240 views

Event sourced persistence and data model refactoring

I've been working on a system that is using event-sourced persistence for it's data model. It is using a standard model of sequence of events with aggregates being rehydrated from those events and ...
Euphoric's user avatar
  • 37.3k
2 votes
1 answer
1k views

Event Sourcing - More complex example

Usually when I read Event Sourcing examples - they are pretty simple. When trying to implement something even more complex - it seems to get pretty ugly pretty quickly. Let me explain this on one ...
Bojan Vukasovic's user avatar
0 votes
2 answers
513 views

Event sourcing with concurrency against projections

I'm using event sourcing in an application and constantly find a problem for which I do not find a good solution. In this scenario we have an application for a hair stylist. We have a ...
smoksnes's user avatar
  • 463
1 vote
0 answers
112 views

Strategy for a worker microservice to communicate with GraphQL API

I am trying to find the best way for a microservice to communicate with GraphQL Basic scenario: Client subscribed to GraphQL via Subscriptions (WebSockets) Client creates an Item using Mutation which ...
inside's user avatar
  • 111
0 votes
0 answers
526 views

How to save to database and publish atomically? ( all or none )

I'm trying to implement microservice architecture to our application (basically an ecommerce) and one of the challenges that I can't really find a good answer for (despite being so many similar ...
typicallearner's user avatar
2 votes
1 answer
814 views

Communication between services in a microservices architecture, is direct communication okay?

I've been reading a lot on why one should use messages (w/ event sourcing/CQRS) for microservices communication and I get it. But most of the stuff I read online state that the main reason for using ...
Leandro Costa's user avatar
3 votes
2 answers
967 views

Primitive obsession, value objects, Commands, Events and where to convert

I tried to combine two rules. Don't fall to primitive obsession (e.g. EMailAddress should be a value object in domain objects and not a string). Don't use value objects in commands and events.1, 2, 3 ...
Hothie's user avatar
  • 131
-3 votes
1 answer
102 views

How to get Address pincode inside Customer class

I have 2 domains Customer and Address using using EventSourcing and CQRS in our Monolithic app, below is my query: Customer Domain: class Customer { //Aggregate class String custId; ...
john's user avatar
  • 109
1 vote
1 answer
133 views

designing events for an event sourcing based application

In an application to handle employee leaves, I decided to try CQRS & event sourcing and came up with the following flow of events. app events leave-application-received leave-application-...
Waku-2's user avatar
  • 143
3 votes
3 answers
3k views

Event Sourcing - Multiple events or a single for a change on one aggregate?

I have a checklist system where we are implementing CQRS/ ES (Event Sourcing). We have a command updateStatus(taskId: string, status: boolean) to mark a task or sub task as completed. If I receive a ...
checklist's user avatar
  • 279

1
2 3 4 5 6