2022 Developer Survey is open! Take survey.

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
0 votes
2 answers
51 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 / ...
user avatar
0 votes
0 answers
11 views

Using SchemaRegistry for JSONSchema for a protobuf field

Currently, I am working with an upstream service which uses the protobuf serialization to publish events to pulsar where they are consumed by a downstream service. Going forward, we have decided to ...
user avatar
0 votes
0 answers
68 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 ...
user avatar
0 votes
0 answers
18 views

Trigger function on a certain aggregation of data?

I'm trying to design a reward system which will coupons and extra benefits on unlocking rewards (referral reward, first_order_reward etc). First I tried to make master (reward) and detail (user_reward)...
user avatar
0 votes
1 answer
53 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 ...
user avatar
  • 193
-1 votes
1 answer
127 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 ...
user avatar
  • 99
0 votes
1 answer
60 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 ...
user avatar
  • 119
0 votes
2 answers
115 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 ...
user avatar
1 vote
1 answer
73 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 ...
user avatar
0 votes
0 answers
24 views

DDD & ES – modeling crossing context between domains

I've been experimenting with DDD, CQRS and Event Sourcing recently as part of a small application I'm writing for my own use. Unfortunately, I'm not quite sure how to play some things out correctly ...
user avatar
  • 1
0 votes
1 answer
58 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 ...
user avatar
  • 302
2 votes
1 answer
137 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 ...
user avatar
  • 245
0 votes
1 answer
88 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 ...
user avatar
3 votes
3 answers
151 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. ...
user avatar
  • 109
1 vote
1 answer
131 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 ...
user avatar
  • 111
0 votes
0 answers
88 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". ...
user avatar
  • 1
2 votes
2 answers
113 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 ...
user avatar
0 votes
1 answer
171 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 ...
user avatar
0 votes
0 answers
53 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 ...
user avatar
  • 101
0 votes
2 answers
465 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 be made the direct calls to the Infrastructure layer? At the Application ...
user avatar
3 votes
0 answers
237 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 ...
user avatar
  • 35.5k
0 votes
2 answers
144 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 ...
user avatar
  • 101
0 votes
1 answer
196 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 ...
user avatar
  • 101
0 votes
1 answer
233 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" ...
user avatar
  • 11
0 votes
3 answers
581 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, ...
user avatar
  • 2,321
2 votes
1 answer
93 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 ...
user avatar
  • 2,321
2 votes
2 answers
130 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 ...
user avatar
  • 2,321
0 votes
2 answers
357 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 ...
user avatar
4 votes
2 answers
662 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, ...
user avatar
  • 2,321
0 votes
2 answers
156 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....
user avatar
1 vote
1 answer
404 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 ...
user avatar
  • 13
0 votes
1 answer
117 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 ...
user avatar
  • 35.5k
2 votes
1 answer
363 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 ...
user avatar
0 votes
2 answers
262 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 ...
user avatar
  • 443
1 vote
0 answers
76 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 ...
user avatar
  • 111
0 votes
0 answers
193 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 ...
user avatar
2 votes
1 answer
507 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 ...
user avatar
1 vote
2 answers
521 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 ...
user avatar
  • 111
-3 votes
1 answer
90 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; ...
user avatar
  • 109
1 vote
1 answer
91 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-...
user avatar
  • 143
3 votes
3 answers
2k 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 ...
user avatar
  • 279
0 votes
1 answer
195 views

Event sourcing: Update local data before posting an event?

We are introducing events to our system (I would hesitate to call it 'event sourcing', but we have started down this road). To do this we are still maintaining the same HTTP public 'CRUD' API's, but ...
user avatar
  • 165
2 votes
1 answer
185 views

Event Sourcing/CQRS for Self-Related Entities

I'm building a platform that has an entity named content. There's a clear boundary around what defines content except that it can have relationships with other content entities. Up until now, there's ...
user avatar
1 vote
1 answer
160 views

Options for building initial event sourcing projection when you cannot go back to the beginning of the history

I’m building a microservice which depends on a set of downstream services to collect the data necessary to operate. It is a data delivery system, I’m not source of truth for any data, my system rather ...
user avatar
3 votes
3 answers
2k views

What are the problems with command handlers returning data in CQRS?

I have a system using CQRS/ES, where: The command handlers are actually implemented as an application service layer, which executes synchronously. I.e. events are persisted in the event store before ...
user avatar
  • 502
1 vote
1 answer
246 views

DDD - Concurrency and Command retrying with side-effects

I am developing an event-sourced Electric Vehicle Charging Station Management System, which is connected to several Charging Stations. In this domain, I've come up with an aggregate for the Charging ...
user avatar
  • 111
-1 votes
2 answers
375 views

Merging aggregates with Event sourcing

I'm currently evaluating Event Sourcing and CQRS for an implementation of a new business requirement at my day job. While I can't really speak about the actual business problem, I can give a few ...
user avatar
  • 107
-2 votes
2 answers
67 views

Event Sourcing Architecture: Ingesting event data from Phones

We will be streaming data from Phones (<= 5000) to a server. We were previously sending the data using MQTT to AWS IOT. Now we want to run this locally. Estimated size per second to be ingested is ...
user avatar
0 votes
3 answers
1k views

How does "event triggers event" really work in Event Sourcing / CQRS?

After reading/watching a lot about Event Sourcing, there is one thing I don't fully understand: Events that lead to triggering of other events. Let's take StackExchange's "close question" feature as ...
user avatar
-2 votes
2 answers
80 views

How to call the API once per event-message?

I have X number of servers in NLB listening to an event that gets published by a backend system. I am planning to develop a windows service that listens to the event and then calls an internal API. ...
user avatar

1
2 3 4 5 6