GuideBeginner

Event Driven Architecture

Learn to build systems that communicate through events instead of direct calls: when an event beats a synchronous call, how a broker works, how to consume events idempotently, how to publish them reliably with the outbox pattern, and the bigger patterns they unlock — event sourcing, CQRS, sagas. You work through a single case study from start to finish: Mercado, whose checkout today is a fragile chain of synchronous calls (if `notifications` goes down, the order fails), which you'll turn into an event-driven flow where `orders` emits `OrderPlaced` and several services react in a decoupled way. Everything is simulated and executed in Python with an in-memory broker: you'll measure how at-least-once delivery produces duplicates and how an idempotent consumer neutralizes them, simulate a crash that exposes the dual-write problem and see how the outbox fixes it, rebuild an `Order`'s state by replaying its event log, and run a saga with compensation. By the end you know exactly what an event-driven system gains and what it costs compared to a synchronous one.

64
lessons
8
modules
English · Spanish
available in
Yes
certificate
Free
access
NIEVA

Outcomes

What you'll be able to do

  • Distinguish events from commands, and understand the temporal decoupling that pub/sub enables
  • Understand the broker: queue vs. topic, offsets, consumer groups, and why delivery is at-least-once (never exactly-once)
  • Build idempotent consumers that deduplicate by `event_id`, and handle ordering when it isn't guaranteed
  • Solve the dual-write problem with the outbox pattern: publish an event reliably in the same transaction as the data
  • Apply event sourcing: store the event log as the source of truth and rebuild state via replay
  • Apply CQRS: separate the write model from the read model and understand the read model's eventual consistency
  • Design sagas for business transactions that span multiple services, with compensating actions when a step fails
  • Convert a fragile synchronous flow into an event-driven one end to end, with idempotency, outbox, and a saga executed and measured

Before you start

What you need to bring

It's for you if...

  • Backend devs with a fragile synchronous flow (one call fails and the whole process breaks) who want to decouple it
  • Devs who already use a queue or message broker but don't apply idempotency or handle duplicates with judgment
  • Anyone who needs to understand event sourcing, CQRS, or sagas before deciding if their system needs them
  • Teams evaluating a move from synchronous calls to events who want to measure the tradeoff, not assume it

Requirements and materials

  • Basic Python (the brokers and simulations in this guide run in Python, no real Kafka or RabbitMQ)
  • General knowledge of databases and transactions
  • No prior experience with messaging, queues, or distributed systems required

Content

The syllabus, module by module

Open any of them to see its lessons.

Common questions

What people usually ask

Start whenever you like

Reviews

What students say

These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.

No approved reviews yet.

Be the first to share your experience!