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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

The tag has no usage guidance.

-1
votes
1answer
13 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
109 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
28 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
67 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
52 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
49 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
78 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 ...
0
votes
1answer
28 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 ...
2
votes
1answer
102 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 (...
0
votes
2answers
149 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 ...
0
votes
3answers
75 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
2answers
277 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
39 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
55 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
129 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
144 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
147 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
229 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
105 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
136 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
60 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
238 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
174 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
78 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
36 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
409 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
96 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 ...
4
votes
3answers
159 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
286 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
118 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-...
1
vote
2answers
119 views

Recovering the state of the Write Service in an Event Sourced system

Quick question, I've been digging into CQRS and Event Sourcing and there's one thing that I have not been able to find info on, what happens when your Write Service crashes and you need to start it ...
3
votes
2answers
253 views

DDD creating an aggregate in response of an event on another

I am looking at a scenario for creating an aggregate instance from a trigger an a different aggregate. I've incorporated some logic in my DDD and Event Sourcing with Onion architecture learning ...
1
vote
1answer
430 views

Event Sourcing and cross Aggregate validation

I am looking into Event Sourcing (ES) and having a play around with some code Greg Young put together (Greg Young Git Repo). I like what ES offers in terms of functionality, but I am trying to apply ...
1
vote
1answer
282 views

Should I use NoSQL or RDBMS for materialized view in this CQRS / ES implementation?

I am going to try to build a implementation of CQRS and ES for large scale application (1M users) authentication API. Below is my initial architecture draft (Ignore Azure related stuff). I am going to ...
2
votes
2answers
512 views

CQRS, Event Sourcing and (near) Real Time Reporting

I am working with a small team that is developing a CQRS/ES "semi-microservice architecture. We are pretty far along, but running into some interesting challenges with our projections and further ...
2
votes
1answer
381 views

Using Event Sourced Aggregate Roots with the Specification Pattern

I have a Aggregate Roots that use the event sourcing technique of being built from a series of events in a Repository. This is all great for when I just need to manage change of state etc, but when I ...
10
votes
3answers
969 views

Rehydrating Aggregates from a “snapshots” projection rather than the Event Store

So I've been flirting with Event Sourcing and CQRS for a while now, though I've never had the opportunity to apply the patterns on a real project. I understand the benefits of separating your read ...
2
votes
0answers
205 views

Can Event Sourcing and an API Management platform leverage each other?

I'm evaluating the use of Kafka to implement Event Sourcing in a microservices environment that already makes use of an API Management platform. I was wondering if it is common and/or considered a ...
1
vote
1answer
241 views

Is there something “dirty” about using a non-linear store in Event Sourcing?

I just stumbled upon an article by Lucas Majerowicz titled "Add git-like functionality to your application using Event Sourcing". In it, he describes using Event Sourcing with events stored as nodes ...
1
vote
1answer
171 views

What is a good diagrammatic way to represent async event communication between two systems?

What is a good diagrammatic way to represent asynchronous event communication between two systems (the pub sub model)? I am not looking for tools but more of a representation. Is it a sequence diagram,...
0
votes
1answer
146 views

DDD - Same ID/Primary Key, different Aggragate Root class per Bounded Context

I am working on understanding DDD and want to see if this idea is sound, if it is common practice, and if there are any pitfalls or unforeseen complications. I want to effectively have one "entity" ...
0
votes
1answer
105 views

ES / CQRS concurrency

Trying to understand concurrency with CQRS, I came across that question: https://softwareengineering.stackexchange.com/a/349575/286881 But there is something I don't understand when it is said that: ...
3
votes
2answers
318 views

What's the process you use for determining bounded context in DDD?

I've been through a few iterations of DDD with a few different projects, yet I still struggle with properly defining bounded contexts. I continually find myself wanting to create very granular ...
0
votes
1answer
203 views

Can you rebuild/create new read models without Event Sourcing?

According to Vernon Vaughn's - Implementing Domain Driven design: ...Events are used to rebuild the state of the Aggregate by replaying them in the same order in which they occurred. The premise ...
0
votes
3answers
250 views

Which database strategy should I choose?

I am going to log some events happening in my program. My program is working on a database that I cannot change (add table). These events can be stored in a single table with no relations. I would ...
2
votes
2answers
823 views

How do event sourced systems make sure the read model is only updated once?

Currently looking into Event Sourcing in a Microservices architecture and I've found this article. It describes a possible implementation of CQRS and event sourcing. If the logic dealing with updating ...
1
vote
2answers
752 views

Handling aggregate root with deep object hierarchy

What is the correct way to apply commands to objects deep within the model hierarchy? Given the following model: public class Picture : AggregateRoot { private string title; private List<...
0
votes
0answers
134 views

DDD: How to solve this using Domain-Driven design?

I'm new to DDD and cutting my teeth on the following exercise. The use case is real, but my attempt to solve it with DDD is purely for learning. We have multiple Git repos, each containing a file ...
1
vote
2answers
377 views

Akka Event Sourcing - how to create Actor per Entity

I was reading Akka Persistance documentation and it says that Akka is good for Event Sourcing. Imagine I have a User entity. Each user is defined uniquely with ID and has some properties and some ...
7
votes
2answers
1k views

How do I deal with side effects in Event Sourcing?

Let's assume that we want to implement a small security subsystem for a financial application that warns the users via email if a strange pattern is detected. For this example, the pattern will ...