CQRS
DataSeparation of commands (write) and queries (read)
Principles
Commands modify stateQueries read stateSeparate models for each sideIndependent optimization
When to use
Very different read/write patterns, need to scale independently, complex systems
When not to use
Simple CRUD, simple domains
Pros and Cons
Ventajas
- + Independent read/write optimization
- + Specific models for each case
- + Independent scalability
- + Manageable complexity
Desventajas
- - Additional complexity
- - Eventual consistency between models
- - More code to maintain