Hands-on Python lessons
Event streaming
with Python.
Process events, group them into windows and handle late arrivals. Learn how state, replay and recovery affect a streaming application.
Course contents
Events, logs and consumers
Follow events through transformations, logs and independent consumers.
- 01Follow an eventFrom a record to a useful stream.Lab
- 02Evolve an event schemaA record can parse and still mean the wrong thing.Lab
- 03Read a partitioned logOrdering has a scope.Lab
- 04Stream live through KafkaA producer, a socket, and an engine that keeps listening.Lab
- 05Retain or compact a logHistory and latest state answer different questions.Lab
- 06Give consumers their own positionReading does not erase the log.Lab
Transformation and routing patterns
Validate events, route failures and expand records into multiple outputs.
Time, windows and late data
Use event-time windows and decide how to handle late arrivals.
- 10Choose the right clockThe same order can belong to two different windows.Lab
- 11Close a windowGive an endless calculation a boundary.Lab
- 12Merge a sessionA late event can connect two groups.Lab
- 13Wait for late eventsTrade a faster answer for a more complete one.Lab
- 14When can time move forward?Slow partitions, idle inputs and late returns.Reading
- 15Correct a late resultClosing a window and forgetting it are separate decisions.Lab
Stateful patterns, joins and views
Keep state by key, join streams and maintain changing results.
- 16Keep state by keyTwo shops. Two running totals.Lab
- 17Where does a key live?Partitions, exchanges and parallel state.Reading
- 18Build a materialized viewUpdates replace facts; deletes must leave enough history.Lab
- 19From streams to tables and backAn append, an upsert and a retraction carry different meaning.Reading
- 20Enrich a streamA small lookup changes the meaning of a record.Lab
- 21Join changing streamsLatest values and all combinations answer different questions.Lab
- 22Count the join outputOne event can create more than one answer.Lab
- 23Look up the pastLatest context can rewrite yesterday.Lab
- 24When is a streaming answer final?Join horizons, corrections and changelog contracts.Reading
- 25Detect an event sequenceTwo failures followed by success is a stateful question.Lab
- 26Recognize sequences and absenceA missing event needs a clock, not only a predicate.Reading
Failure, recovery and integration
Replay safely and recover state while handling retries and external writes.
- 27Replay without double countingOne order can have two deliveries.Lab
- 28Forget state deliberatelyA smaller state store changes the answers you can defend.Lab
- 29When is it safe to forget?State, timers, expiry and the meaning of a result.Reading
- 30Recover after a failureThe write succeeded. The offset did not.Lab
- 31What makes a snapshot consistent?A moving system needs a coordinated cut.Reading
- 32Exactly once—at which boundary?Replay is expected. Duplicate effects are a design choice.Reading
- 33Retry with a budgetTransient failure is a scheduling decision, not an infinite loop.Lab
- 34Connect transactions to streamsFollow an order from a database transaction to the broker and the consumer’s own database.Reading
Performance and capacity
Measure work and latency, handle overload and plan recovery capacity.
- 35Measure operation effortCount the work before timing it.Lab
- 36Measure latency and batchingA higher throughput can hide a longer wait.Lab
- 37When the consumer falls behindA queue buys time. It cannot create capacity.Lab
- 38Where does the waiting go?Slow sinks, blocked channels and checkpoint cost.Reading
- 39Budget for recoveryNormal capacity is not recovery capacity.Lab
Production delivery and governance
Backfill history, deploy changes and operate a streaming job.
- 40Run a bounded backfillReplay a declared range into a versioned destination.Lab
- 41Why did more workers not help?State migration and the limit of a single hot key.Reading
- 42What is the job waiting for?A diagnosis from source to visible result.Reading
- 43Test and deploy a changing streamA passing example is the beginning of a release contract.Reading
- 44Operate data with ownership and careSecurity, privacy and retention are part of the stream contract.Reading
Design review and capstone
Review a streaming design, then investigate an incident.
Continue learning
Measure execution with the native performance guide, or explore request/reply and publish/subscribe in Messaging Patterns Lab →