Event-Driven Architecture
Event-driven architecture (EDA) treats state changes as first-class events. When something happens — an order is placed, a payment fails, a user signs up — the service publishes an event describing what occurred. Other services subscribe and update their own state or trigger side effects. No service calls another directly; they react to facts.
This creates temporal decoupling: the publisher does not know or care who listens. New consumers can be added without changing the producer. The cost is eventual consistency — you cannot assume all services see the new state immediately. Event sourcing takes EDA further by storing events as the source of truth and rebuilding state by replaying them.
Check your understanding
What should an event describe?Show answerHide answer
Answer
A fact that already happened (OrderPlaced), not an imperative command to another team’s service.What consistency model do you usually accept?Show answerHide answer
Answer
Eventual consistency — subscribers update on their own timeline.What is the main coupling benefit?Show answerHide answer
Answer
Producers need not know the full set of consumers; new listeners can subscribe later.