Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [event-sourcing]

The tag has no usage guidance.

-2
votes
0answers
20 views

Regular imports of data into Event Sourcing based system for analytics

I'm building a system that's gonna be mostly used for analytics. The data there would come from various systems - through webhooks and CSV file imports. CSV (Spreadsheet) files worry me the most - ...
2
votes
1answer
50 views

How are events in the context of Event Sourcing different from Commands?

In the context of domain-driven design, events usually describe something that has already happened (domain events, integration events). Commands on the other hand are directives that may or may not ...
2
votes
1answer
57 views

Should I store an event stream or just state for a frequently changing entity?

I am building a CQRS-based application with Kafka Streams. For most entities in my application this entails event sourcing: capturing state mutations as events and transforming them into state which ...
2
votes
1answer
115 views

How to model domain events so that the denormalizers can fill highly denormalized read models

I have been working with a software strongly relying on the event sourcing and CQRS patterns for a few time and I'm trying to figure out how to properly model the domain events in relation to the ...
2
votes
2answers
63 views

Denormalising a CRUD and ES bounded context for rich queries

As a small snapshot of my product, I have 2 bounded contexts, one which is a rich domain with defined events and invariants, operating on files implemented as CQRS/ES, and the other a CRUD store of ...
0
votes
1answer
49 views

Domain events or services to achieve domain model consistency?

Recently began implementing domain events in my domain layer which really allows me to decouple the application from the domain. Eventually, I would like to get a full-scale CQRS w/Event Sourcing ...
5
votes
2answers
171 views

How can we keep sight of business flows in event driven architectures?

I am planning to set up an event driven architecture using Spring Boot apps that publish and read messages from a Kafka broker. Let's suppose it were an e-commerce application with the usual events (...
1
vote
2answers
63 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. ...
0
votes
0answers
11 views

Is there any value in passivation (setReceiveTimeout) for persistent actors without read store?

I am not experienced in Akka, so my assumptions may be completely wrong. As far as I understand, Aggregate Root may manage its entities either just keeping their state internally and restoring it at ...
-1
votes
3answers
191 views

What is a CRUD system?

I am learning Event Sourcing in my spare time. I see lots of references to 'CRUD type systems' online. I understand a CRUD type system to be: 1) A database driven system (website or application) i....
0
votes
0answers
28 views

MQTT over WebSockets or custom protocol

I'm working on an event sourced web application. The backend is pretty simple and responsible only for maintaining the event log and delivering it to web clients, I'm using Haskell on top of Redis ...
13
votes
7answers
681 views

Saving high-frequency events to a connection-limit constrained database

We've got a situation where I have to deal with a massive influx of events coming in to our server, at about 1000 events per second, on average (peak could be ~2000). The problem Our system is ...
6
votes
4answers
297 views

How to emit events idempotently

If I have a service that consumes events of type A and emits events of type B, how can I make sure that event B is only emitted once for every event A? Should the service also subscribe to events of ...
0
votes
1answer
138 views

Implementing CQRS inside a Microservice

I am considering a CQRS refactoring process. It is more of a learning exercise in my spare time. The use case is similar to a price comparison website where a user enters their details for a ...
3
votes
4answers
335 views

How to handle transactional operations in an event-driven architecture?

I'm trying to flesh out an eCommerce system using microservices (.NET Core and Kubernetes), event sourcing (Kafka), and CQRS. The particular use case I've been thinking about is as follows. There is ...
0
votes
1answer
69 views

What is the correct granularity for events in the context of designing a rule-based decision system?

Introduction We need to design a system that, given a set of events that are happening in the source application, reacts to them and if some conditions have been met, actions can be triggered. Users ...
3
votes
3answers
167 views

What to do when an aggregate is given a bad event?

What is usually done when an aggregate is asked to apply an "impossible" event to its state? For example, if a ShoppingCart aggregate has already applied a CustomerAckRec (The customer has ...
2
votes
2answers
89 views

Event Sourcing CQRS and request events ending at Requested

In ES/CQRS, do/can we treat requests as events? Consider the following flow A guest visited some url and posted data to create a new account. Here is one way to implement it 1- Invoke ...
1
vote
3answers
85 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 ...
0
votes
1answer
113 views

Dealing with eventual consistency when persisting and publishing events

Currently working on a DDD application that is using event sourcing with redis as my main persistence store. So unfortunately I do not have built in rollbacks should something fail. The application is ...
-1
votes
1answer
15 views

Data store for sequential key-value, time limited event “journal”

I'm designing a system in which a key component acts like a "journal", in the sense that it stores a list of sequential events that can change the state of the entire system. Upon request, any other ...
0
votes
2answers
195 views

CQRS, Where exactly is business logic that coordinates between aggregates?

Where exactly to put business logic. While everyone said put it in the aggregate. Yes, But what if business logic need datas of multiples aggregate? Or if business logic need to update multiple ...
0
votes
1answer
44 views

Event Store deals with Domain events or representation of domain events

I am starting a new DDD architecture and I have a dilemma with Domain Events and the way they're retrieved and stored in an EventStore database. First of all, should the EventStore live in the Domain ...
1
vote
1answer
331 views

Serverless event-sourced architecture using AWS offerings

This is my first post on the Software Engineering Stack Exchange so let me know if something is wrong with it. I'm looking into the serverless offerings of Amazon to try to figure out if that is the ...
0
votes
1answer
81 views

Event sourcing and criteria based searching

I have done a lot of reading about Event Sourcing in my spare time recently. I understand that it is for situations (Bounded Contexts?) where the business is interested in how an entity arrived in ...
1
vote
1answer
160 views

Fastest way to persist an append-only ordered event stream

I'm looking to persist a stream of events and I want it to be: fast in both latency and throughput, looking at at least 100k events per second ordered (not by timestamp, as multiple events within the ...
1
vote
2answers
204 views

Can command handlers be separated from aggregate roots in CQRS

On one hand, the invariants should be protected (To make invalid states impossible early and preferably at compile time rather than run time), and on the other hand, passing domain knowledge out of ...
1
vote
1answer
49 views

Alarming on event driven systemev

How to define overall monitoring of event-driven architecture? Each component talk to other component via events. Consumer(s) react to events within minutes to days based on use case. Each component ...
3
votes
1answer
542 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 (...
3
votes
3answers
655 views

CQRS+Event Sourcing as Top Level Architecture: Anti-Pattern

I have been study DDD along with CQRS and Event Sourcing. I recently listened to a talk Greg Young gave a couple years ago where he said that CQRS and Event Sourcing are not a top level architecture ...
1
vote
3answers
116 views

Event Sourcing details in Domain Model

I have been studying DDD and have been experimenting with Event Sourcing as a storage mechanism. Prior to this (mostly CRUD-style applications with anemic data models stored in relational DBs), a "...
2
votes
3answers
395 views

Why “Event sourcing an entire system is a big mistake and considered an anti-pattern”?

Why event sourcing an entire system is a big mistake and considered an anti-pattern? And what situation it's consider an anti-pattern? Reference 1 Reference 2 Updated Question : Still don't ...
0
votes
1answer
47 views

Partitioning table by aggregate id for efficient eventsourcing in RDBMS

My events are stored in MySQL and I'm reaching a point where I have tens of millions of rows and things are starting to get sluggish when pulling an aggregate I have read about "table partitioning" ...
0
votes
1answer
99 views

Storing bank account data using Event Sourcing

Trying to change payment related stuff in current project, but still couldn't decide on architecture of small part. I hope you can share your feedbacks. Flow and state: We have payment account using ...
-1
votes
1answer
328 views

CQRS, How to query aggregate root using others fields rather than GUID (ID)?

There are many CQRS frameworks and event store libraries. All of them use GUID as aggregate root's ID. Those event store only let me query only by GUID. I realise that there are many times in last ...
2
votes
4answers
267 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 ...
0
votes
2answers
561 views

How to store Sagas with Event Sourcing

I have a long running process that collects together the IDs of Aggregates that have been edited/changed, so that a later command can 'publish' them to a legacy model. I understand that I should use ...
3
votes
4answers
245 views

Too many unecessary events

I'm new to eventsourced apps and since the beginning I'm facing an issue that I'm unsure how to resolve. I work in ecommerce and I always try to convey meaningful events to my aggregates like ...
2
votes
1answer
126 views

High scale architecture using Event Sourcing and Eventual Consistency

I want to share with you and know what your opinion/improvements are regarding a solution I was tasked with a technical interview I faced. The exercise: You need to create an API which will indicate ...
0
votes
2answers
359 views

Designing events in an event-driven (event sourced) architecture and managing duplication

I have been creating a POC for a part of our system but I'm finding some trouble communicating some of the ideas behind it. This takes ideas from Event Sourcing and Event Driven Architecture but ...
1
vote
1answer
107 views

Passing Meta info from Command through Aggregate to Event

I have a CQRS system in development that passes the Command to a CommandHandler, which gets an Aggregate from a Repository, and calls a method with the properties of the Command (converted to ...
1
vote
4answers
585 views

Inventory, Pricing and Product Catalog communication

Imagine that I am creating and Ecommerce application. For sake of simplicity, I will describe only 3 bounded contexts. 1. Product Catalog: it's responsible for maintain product descriptions, ...
3
votes
1answer
316 views

eventsource/CQRS - Replaying projections of an aggregate in order

I have a eventsourced project and I want to replay the following two events, in order: ProductCreatedEvent PriceChangedEvent I've been told that projections should be asynchronous, so when replaying,...
0
votes
0answers
87 views

How do I not lose the “reactive” nature of my services, simply because one of the services isn't reactive?

I've lately been very interested in reactive microservice design with streaming and event-driven architectures. When one writes (i.e., manages) services, this paradigm works extremely well by simply ...
0
votes
0answers
60 views

Event Collaboration queries in micro services architecture

After reading through Martin Fowler's description of the Event Collaboration pattern (https://martinfowler.com/eaaDev/EventCollaboration.html) it appears that following the pattern entails doing away ...
0
votes
3answers
727 views

DDD: Event handlers and aggregates in functional programming

When implementing a DDD driven system (based on event sourcing) using a functional programming language (Clojure), should one separate event handler functions from aggregate functions? In my naive ...
1
vote
2answers
111 views

Efficient data conversion in Event Sourcing

We're using a similar concept to Event Sourcing to store the data/actions of a collaborative system we have running. The system has some 2-3k users that use it daily and it's growing. As time goes ...
5
votes
3answers
381 views

How do I avoid implementing my Event Sourced projections twice?

I'm currently teaching myself event sourcing and have got the concept enough to start developing a dummy app in C# and EventStore. My app is an easy-to-understand bank account system. If we model a ...
5
votes
2answers
377 views

Designing event-driven architecture for multiple services

I've created about a dozen services for a intranet. Now I've gotten to the point that these services are more coupled to each other than I'm comfortable with, and I've been having problems where once ...
3
votes
3answers
215 views

With event sourcing, how to get the response of a call that is a side-effect?

Let's say my user requests my ES/CQRS system to open a support ticket: The controller sends an ask-support command, this command checks if the user has enough credit to do that, then emits an asked-...