AITeky Learn

AiTeky Original Interactive Learning & Practice Advanced

Streaming and orchestration: logs, late data, lag and pipelines that run on time

Build an append-only log with partitions and offsets, choose a watermark for late events, make a restart safe, schedule a dependency graph and find its critical path, size consumers against a traffic spike, and estimate the chance a nightly pipeline finishes on time with retries.

A batch job reads a finished pile of data. A stream processes data as it arrives, and an orchestrator decides which jobs run, in what order, and what happens when one fails. Almost every data-engineering incident lives in these two places: an event that arrived late and was counted in the wrong hour, a consumer that fell behind, a restart that counted the same order twice, a pipeline that did not finish before the morning report.

This course builds the machinery in plain Python so you can see how it behaves. We do not install a message broker or a scheduler; we write the idea of each (an append-only log with partitions and offsets, a watermark, a checkpoint, a topological ordering, a retry policy) and simulate it with a fixed random seed. The earlier data engineering course introduced events, windows and duplicates; this one goes after what goes wrong at scale.

You build a log and see why ordering holds only within one partition. You choose a watermark and measure the trade between waiting for late events and reporting on time. You crash a consumer and compare a naive restart with a safe one. You schedule a graph of tasks, find the critical path and see the effect of the number of workers. The industry lessons size consumers for a sale-day spike with a lag simulation, and estimate the probability that a nightly pipeline meets its deadline given task durations, failure rates and retries.

All the data are simulated, and every rate, duration and failure probability is an assumption flagged in the lesson. No broker or scheduler was run. Real systems add their own overheads and limits, so use these as a way to reason and to ask the right questions, then measure your own system.

You need the Python course; the data engineering course is the natural companion.

  • Learn lessons explain one idea at a time and let you compute it.
  • Industry ready lessons decide and plan. Each ends with the interview questions that go with it.

Locked. Sign up free

Learn

Understand each idea with everyday examples. No coding background needed.

  1. 01 45 min Free sample πŸ”’ AiTeky Pass The log: partitions, offsets and what ordering really means Build an append-only log with partitions and consumer offsets, route events by key, replay from any point, and show that order is guaranteed only inside one partition, which is why the choice of key matters.
  2. 02 50 min πŸ”’ AiTeky Pass Late events and the watermark: how long do you wait? Simulate 20,000 events that arrive with delays, group them in one-minute event-time windows, and measure for several watermark settings how many events are dropped as late against how long each result waits, then choose a setting from a stated requirement.
  3. 03 50 min πŸ”’ AiTeky Pass Crashes, checkpoints and "exactly once" Crash a payment consumer in the middle of a stream and compare three restart rules. Count the lost and doubled payments, then make the effect exactly-once with an idempotent write and measure what the checkpoint interval costs.
  4. 04 50 min πŸ”’ AiTeky Pass Pipelines as graphs: order, the critical path and how many workers help Describe a nightly pipeline as tasks with dependencies, find a valid order with a topological sort, detect a cycle, compute the earliest finish time and the critical path, and measure how the finish time changes with 1 to 8 workers.

Industry ready

Real problems from real jobs, and the questions interviewers ask about them.

  1. 05 55 min πŸ”’ AiTeky Pass On the job: consumer lag on sale day Simulate a sale-day traffic spike against a topic with 12 partitions, measure the lag and the delay for different numbers of consumers, find that 8 consumers are no better than 6, that a hot key defeats even 12, and write the sizing recommendation with the fix.
  2. 06 55 min πŸ”’ AiTeky Pass On the job: will the report be ready by six? Simulate 1,500 nights of a 13-task pipeline with random durations, task failures and retries with back-off, estimate the chance it finishes before the deadline for different retry settings, test a fix, size a 30-day backfill, and write the runbook answer for the business.

We use essential cookies to run the site. With your permission we also set one anonymous ID to count unique visitors, and analytics cookies to see which pages help learners. Cookie notice

Join AiTeky Learn. It's free.

Create a free account to track your progress, save items for later and get study suggestions.

Sign up free Log in