Init guide environment...
How events flow through an event-driven system
sequenceDiagram
participant P as Publisher
participant EB as Event Bus
participant S1 as Subscriber A
participant S2 as Subscriber B
participant ES as Event Store
P->>EB: Emit OrderCreated Event
EB->>ES: Persist Event (Append-Only)
EB-->>S1: Deliver Event
EB-->>S2: Deliver Event
S1->>S1: Process (Update Inventory)
S2->>S2: Process (Send Notification)
S1-->>EB: ACK
S2-->>EB: ACK
Note over ES: Full audit trail preserved
Note over EB: Events are immutable & replayableExplore event-driven patterns with step-by-step animations
Essential principles for building robust event-driven systems
Compare event-driven patterns by key characteristics
| Pattern | Complexity | Scalability | Consistency | Debuggability | Best For |
|---|---|---|---|---|---|
| Pub/Sub | Loose coupling, fan-out, event broadcasting | ||||
| Event Sourcing | Audit trails, replay, temporal queries | ||||
| CQRS | Read-heavy workloads, independent scaling | ||||
| Saga | Distributed transactions, compensating actions |