Command Query Responsibility Segregation design pattern

learn more… | top users | synonyms

14
votes
5answers
6k views

Is it bad practice for services to share a database in SOA?

I have recently been reading Hohpe and Woolf's Enterprise Integration Patterns, some of Thomas Erl's books on SOA and watching various videos and podcasts by Udi Dahan et al. on CQRS and Event Driven ...
5
votes
1answer
198 views

How to query Aggregate Root to react to event from other AR

I want to create a little GPS tracking program. Simplified: Users can create Tracks. To make things scale Track and User are two separate AR's. Track contains an AuthorUser which it refers to by ...
27
votes
6answers
3k views

Better to have 2 methods with clear meaning, or just 1 dual use method?

To simplify the interface, is it better to just not have the getBalance() method? Passing 0 to the charge(float c); will give the same result: public class Client { private float bal; float ...
3
votes
2answers
3k views

REST Service and CQRS

I am struggling with architecture on a new project. I am using the following patterns/technology. CQRS - anything going in goes through a command REST - using WebAPI MVC - asp.net mvc Angular - ...
2
votes
2answers
135 views

Deleting subtrees in hierarchical agreggates

I am working on a file-system-like application where I use CQRS/event-sourcing to handle the state of folders and files (creating, moving, renaming, etc). Each node (folder or file) is represented by ...
5
votes
2answers
210 views

CQRS and validations

I'm starting to introduce myself in CQRS concepts, but I get stucked with the following situation: Supouse you have an entity that must have an unique name. In order to verify that, prior to create ...
5
votes
1answer
2k views

CQRS + Event Sourcing: (is it correct that) Commands are generally communicated point-to-point, while Domain Events are communicated through pub/sub?

I'm basically trying to wrap my head around the concept of CQRS and related concepts. Although CQRS doesn't necessarily incorporate Messaging and Event Sourcing it seems to be a good combination (as ...