Questions tagged [event-sourcing]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
3answers
86 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, ...
2
votes
1answer
43 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 ...
0
votes
0answers
52 views

Outbox pattern in a monolith with NoSQL?

As I have come to understand, there is generally two ways of ensuring atomicity of both domain events and state changes to aggregate roots in order to achieve at least once delivery of events--the ...
2
votes
2answers
104 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 ...
0
votes
1answer
89 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 ...
1
vote
2answers
159 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, ...
0
votes
2answers
122 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....
1
vote
1answer
114 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 ...
0
votes
1answer
68 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 ...
2
votes
1answer
115 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 ...
0
votes
2answers
106 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 ...
1
vote
0answers
38 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 ...
0
votes
0answers
60 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 ...
1
vote
1answer
136 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 ...
0
votes
1answer
192 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 ...
-3
votes
1answer
89 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; ...
1
vote
1answer
64 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-...
2
votes
3answers
425 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 ...
0
votes
1answer
59 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 ...
2
votes
1answer
154 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 ...
1
vote
1answer
85 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 ...
2
votes
3answers
464 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 ...
1
vote
1answer
117 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 ...
-1
votes
2answers
108 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 ...
-2
votes
2answers
54 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 ...
-2
votes
3answers
520 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 ...
-2
votes
2answers
71 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. ...
28
votes
3answers
6k views

Which comes first: event or the change?

I've been researching Event Sourcing, and it seems there are two philosophies hidden within what I've read. The core difference is whether actors in the system are proactive, making changes first and ...
4
votes
1answer
143 views

Are there any pitfalls to having multiple handlers for a command?

We're looking to split up a monolith. In order to do so, we've identified some business areas that look like good candidates for subdomains, and we're trying to figure out how to split the ...
0
votes
2answers
81 views

Should I create one large initial event or break down in smaller events?

I'm experimenting with event sourcing for an application we haven't build yet. No, I won't implement this without any thought, I'm just experimenting. My domain model looks somewhat like this. The ...
2
votes
1answer
809 views

Event sourcing and sync between write and read model

I am creating this project based on event sourcing and cqrs. My write and read model are on different databases (and machines) and are connected through an event bus (in particular I am using ...
2
votes
5answers
238 views

Effective methodology in designing event driven systems

I understand "the works" of event driven systems and I've built simple ones. However I find that I am struggling a bit in efficiently designing one. E.g., Formulating all the events upfront seems not ...
1
vote
1answer
107 views

Decoupling from third party library

I'm doing a project in PHP and I'm implementing Aggregates and Event Sourcing. In order to avoid coding up all the logic related with ES myself I've decided to use a third party library called ...
-2
votes
1answer
65 views

ActiveMQ for event driven architecture

I am using ActiveMQ and I have a scenario where I need to update the event for 100 consumers parallelly. I am looking for a solution where the 100 consumers receive the event parallelly (i.e there ...
3
votes
2answers
192 views

Should microservices in an event sourced architecture not communicate directly with one another via REST/gRPC/etc?

I'm trying to wrap my head around event sourced architectures. It seems like common advice is to have small events with as little info in them as possible (opposed to large events with everything in ...
0
votes
1answer
153 views

Event Sourcing, state in events vs state in projections

I would like to ask what is the preferred way of passing additional state to projections. I have UserAggregate that is watching changes of several attributes of user (for instance address, name and ...
1
vote
0answers
271 views

Design of Spring boot endpoint that returns large amount of data continously until complete

I'm developing a web application using Spring Boot and React, that needs to return information about hotels from different cities: As an input of the controller, I receive a list of cities that can ...
2
votes
2answers
647 views

CQRS - How can a command properly validate when queries are required?

I'm aware that this question has been asked several times, but I have some concerns regarding querying from the write side that I don't see addressed in the already existing questions, more ...
2
votes
0answers
45 views

Event sourcing and state set event

I'm trying out commanded framework for Elixir that implements event sourcing and CQRS (it have abstract structure of command, command middleware, router, aggregate, process manager, projection and ...
1
vote
2answers
291 views

Event Sourcing - Can a read model/projection be used in business rules within an aggregate?

I know that the general concept behind event sourcing is that the state of the application should be able to be replayed from the event stream. Sometimes, however, we need to get information for ...
2
votes
1answer
113 views

Same Event types for multiple micro-services

In an Event Driven Architecture when there are more than one microservices say A, B that publish same Event say Order_Created and a service C listening to it, performs some actions and publishes an ...
2
votes
1answer
242 views

What is the correct way to get differences for Event Sourcing (C#)

I am looking into Event Sourcing. One of the key points is about saving the differences to the event store rather than objects themselves. This is fine in simple examples. However, I am struggling ...
0
votes
0answers
60 views

Is one to one mapping necessary between Write Applications and Read Applications

Introduction: We have a bunch of micro services (about 40) to serve our customers. To facilitate scaling and audit-ability of selected few micro services we have decided to redesign them using CQRS ...
4
votes
1answer
299 views

Event Sourcing Aggregate Roots - Interaction between aggregates and reconstitution

I have been doing a lot of reading/watching on event sourcing but some things still do not quite make sense. My application is a warehouse management system where we have: Deliveries of stock into ...
1
vote
2answers
510 views

How to manage event dependencies in event-driven architectures?

I'm trying to design an event-driven architecture based on Kafka for messaging but I'm struggling in managing event dependencies. Let's suppose the following service choreography: Service A: emits A-...
2
votes
1answer
784 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
1answer
221 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
1answer
53 views

How specific should administrative compensating events be in a CQRS/ES system?

Are there any best practices around how specific to make events that are generated administratively, say to clean up after one-off operational issues? For example: Say you have a credit card ...
3
votes
2answers
695 views

How to deal with UI data requirements in DDD

I'm using DDD and a CQRS/Event Sourcing architecture so my domain logic is separated in a microservice (e.g: command service) and the read side is in another microservice (e.g: query service). We ...
1
vote
1answer
290 views

Is it overkill to use event sourced actor model with message queue which send commands from gateway?

The gateway uses Rabbitmq with Masstreansit to send commands to services. Some of services require event sourcing in their internal architecture. Since I need my aggregate states available, and the ...

1
2 3 4 5