Lessons
Units
-
PyFlink: Stream Processing Workshop
Introduce the PyFlink streaming workshop that builds a producer, Kafka-compatible broker, consumer, and Flink pipeline into PostgreSQL.
-
Redpanda - a Kafka-compatible broker
Start a Redpanda broker in Docker Compose and learn how its internal and external listener addresses work.
-
Produce messages to Kafka
Produce taxi ride events from a Python script to a Kafka topic using a dataclass and JSON serializer.
-
Consume messages with Python
Consume taxi ride messages from Kafka in Python and deserialize them back into Ride objects.
-
Save events to PostgreSQL
Write consumed ride events into a PostgreSQL table with psycopg2 and see the limits of a plain consumer.
-
Why Flink?
Explain what Flink adds over a plain consumer, including windowing, checkpointing, parallelism, and connectors.
-
The Flink image and services
Build a PyFlink Docker image and define Flink JobManager and TaskManager services in Docker Compose.
-
The pass-through Flink job
Submit a Flink pass-through job that reads Kafka with Flink SQL and writes rides to PostgreSQL.
-
Offsets - earliest vs latest
Compare Flink startup offset modes, earliest-offset and latest-offset, and see why resubmitting creates duplicates.
-
Aggregation with tumbling windows
Count trips and sum revenue per pickup zone in hourly tumbling windows with a Flink job writing to PostgreSQL.
-
Late events and upserts
Use watermarks and a primary key upsert so late events correct already published window results in PostgreSQL.
-
Understanding window types
Compare tumbling, sliding, and session windows and the kinds of questions each one answers.
-
Cleanup
Stop the streaming workshop containers and optionally remove the PostgreSQL data volume.
-
Q&A
Answer common questions on Flink job recovery, lateness, streaming versus micro-batch, and production job submission.
Homework
Homework [DRAFT]
Closed1 question · 2027 cohort · closed Mar 8, 2027