02 / Pattern library
Patterns.
Reusable ways to reason about event-driven enterprise systems.
Trace a change. Inspect the state.
Understand the trade-off.
Architecture in motion
02 patterns01
CompositionalCommand Query
Command Query
Responsibility Segregation
Separate the history you preserve from the state you need to read.
Explore CQRS ↗CQRS / Follow the change.
Event-backed architectureSIMULATED
Separate responsibilities
Preserve what happened. Build a separate model for the questions you need to answer.
Cart quantity / hatsRecorded: 0 / Projected: 0
No events yet. Start with a write.
Choose a state, or step through the system.
Presentation: ← → to step · Esc to exit
Presentation: ← → to step · Esc to exit
02
Event source
Database Write Through
Keep the database as your write boundary. Let committed changes travel.
Explore the pattern ↗Database Write Through / Follow the change.
Database-originated changeSIMULATED
The database remains the write boundary
Applications keep writing to the database. Committed changes become input to downstream systems.
Order status / order-01DB: Empty / View: Empty
No events yet. Start with a write.
Choose a state, or step through the system.
Presentation: ← → to step · Esc to exit
Presentation: ← → to step · Esc to exit