CQRS with event sourcing
c4v1/01 Architecture overview
Separate write and read paths: commands append events to an event store; projections build read models for queries.
Curated · enterprise · CC-BY-4.0 · Published by Lattix · 9 elements · 9 relationships · 1 views
Read full architecture description
Command Query Responsibility Segregation splits the model that changes state from the models that answer questions. With event sourcing, the write side stores every change as an event, and read models are projections of that history. When to use: domains with complex rules and very different read and write loads, a need for a complete audit history, or several read shapes of the same data. Trade-offs: a full history, fast tailored reads and independent scaling, at the cost of eventual consistency between writes and reads, more components, and careful handling of event versioning and replays. Overkill for simple CRUD.
/02 Architecture views
View 1 of 1Semantic inspector
Select a diagram block or edge, or use the accessible lists below. Inspection does not modify the architecture.
Package-wide semantic coverage
Diagram presence is not evidence of architectural correctness or compliance. Counts describe only the loaded, authorized package snapshot.
- Depicted elements
- 9 / 9
- Depicted relationships
- 9 / 9
- Relationships with missing endpoints
- 0
- Unresolved view references
- 0
Architecture reference evidence
Four independent observations from this authorized package snapshot. This is not a quality score, engineering validation, security assessment, or compliance determination. Missing information cannot be assumed correct.
Structural consistency
Criterion observed
0 observed defects
Integrity findings: 0; duplicate viewpoint keys: 0
Detected duplicate identities, missing relationship endpoints, unresolved diagram bindings, and duplicate viewpoint keys. No findings does not prove the model is correct.
Diagram coverage
Criterion observed
18/18 depicted records
Elements: 9/9; relationships: 9/9
Recorded semantic elements and relationships appearing in at least one diagram. Presence alone is not validation.
Recorded relationship traceability
Criterion observed
9/9 documented connections
Relationships with missing endpoints: 0
Relationships with both endpoints recorded and all three identities depicted somewhere in the package. Diagram locations need not be the same viewpoint; paths are not inferred.
Description evidence
Observed gaps
9/18 described records
Elements: 9/9; relationships: 0/9
Records containing a nonempty descriptive summary or description attribute. Labels and IDs are not sufficient; presence does not verify technical accuracy.
Evidence rule set: hub-reference-evidence.v1. Counts are per recorded item, including duplicate records; absence of detected findings does not attest correctness.
Model integrity and coverage findings (0 integrity, 0 coverage)
Integrity findings identify inconsistent recorded references or identities. Coverage findings identify valid recorded items absent from diagrams. Neither category measures security posture, correctness of intent, or regulatory compliance.
Showing 0 of 0 findings
No findings in this category.
Diagram elements (9)
Diagram relationships (9)
Select an element or relationship to inspect its attributes, connections, and diagram appearances.
Read diagram as structured elements and relationships
Elements (9)
- ClientBusiness Actor
Sends commands and asks questions.
- Command APIAPI
Accepts intentions to change state.
- Query APIAPI
Answers questions from read models.
- Command handlerApplication Component
Validates commands against the aggregate's rules and appends events.
- Event storeData Store
Append-only log of every change: the source of truth.
- Event busSystem Software
Publishes appended events to projections.
- ProjectorApplication Component
Builds and updates read models from events; can rebuild them from history.
- Read modelData Store
Denormalized views shaped for each query.
- Query serviceApplication Component
Serves reads from the read models.
Relationships (9)
- Clientuses →Command API
- Clientuses →Query API
- Command handlerrealizes →Command API
- Query servicerealizes →Query API
- Command handleraccesses →Event store
- Event storeflows to →Event bus
- Event busflows to →Projector
- Projectoraccesses →Read model
- Query serviceaccesses →Read model
/03 Complete model inventory
Explore every element by type. Diagram navigation above shows one viewpoint at a time.
Business Actor (1)
- Client
API (2)
- Command API
- Query API
Application Component (3)
- Command handler
- Projector
- Query service
Data Store (2)
- Event store
- Read model
System Software (1)
- Event bus