Build a real-time cold-chain monitoring pipeline with Apache Flink: refrigerated trucks stream Avro readings into Kafka, a detector job raises alerts per shipment in event time with keyed state, timers and Flink CEP, a Flink SQL job computes per-minute statistics, and both reach ClickHouse exactly once through crashes, late data, schema changes, upgrades and rescaling, on kind and on Amazon EKS with checkpoints in Amazon S3.
Data Engineer. Advanced.
For data engineers who write Java and SQL, run Docker and use kubectl, and want to build stateful streaming pipelines whose results stay exact: event time and watermarks, keyed state and timers, Flink CEP and SQL windows, exactly-once delivery from Kafka to ClickHouse, and upgrades and rescaling through savepoints, on kind and on EKS.
In this project you build a streaming pipeline with Apache Flink: two jobs that read sensor readings from Kafka, keep state per shipment, and write alerts and statistics that reach ClickHouse exactly once, even while you crash, upgrade and rescale them. You run it on a local kind cluster and, as an optional milestone, on Amazon EKS with checkpoints in Amazon S3.
This page explains the pipeline as a whole: what each part does, what moves between the parts, and why the design looks the way it does. The technology lessons go deeper into each tool, and the source guides go file by file; this page should make sense without either.
Kafka is where every reading enters the pipeline and every result leaves the jobs. The guarantees the rest of the project depends on start here: a shipment's readings arrive in order, two jobs read the same readings independently, results appear only when a job commits them, and each workload can touch only its own data.
Last quarter, a sensor firmware update added one field and broke Frostbourne's parser for a day. This lesson is about making that kind of change routine: every record carries a reference to the exact schema it was written with, a registry decides which changes are allowed, and readers built for the newest schema still read the oldest records.
Before looking at what the detector computes, it helps to know what Flink does with the program you write: how a Java main method becomes tasks running on several machines, how records move between them, and where state lives. Every later lesson relies on these words: task, subtask, slot, parallelism, keyed stream, operator chain.
The old nightly script counted readings in the minute they arrived. A truck leaving a dead zone uploads six minutes of buffered readings at once, and they all landed in one minute: the statistics were wrong, and an excursion inside the dead zone could vanish. This lesson is about judging every reading by when it happened, and about the hard part that follows: deciding when you've waited long enough for the readings of a moment, and what to do with those that come later still.
A rule like "above 8 °C for more than 5 minutes" can't be decided from one reading. The detector has to remember, per shipment, when the excursion started and how warm it got, and it has to act when five minutes of event time have passed, even if no reading arrives at that exact moment. This lesson teaches Flink's keyed state and timers through the detector's three duration rules, its deduplication, and the alerts they produce.
The three rules of the previous lesson are about durations: something lasts too long. Release v2 adds a different kind of rule, a sequence: the door opens, and within four minutes the cargo is at least 3 °C warmer than when it opened. Opening the door on a hot loading dock is normal; the cargo warming fast afterwards is the warning sign. This lesson teaches Flink CEP, the library for rules like that, through the door-warming pattern.
The dashboards want, for each shipment and each minute, how many readings arrived, the lowest, highest and average temperature, and how many readings had the door open. That's a GROUP BY over time, and Flink can express it in SQL. This lesson teaches how Flink SQL runs over a stream, how window table functions group by event time, and how the metrics job mixes the DataStream API with SQL.
Last quarter's nightly job, rerun after a failure, counted the same excursions twice, and two disputed shipments couldn't be reproduced. The streaming pipeline must do better: every alert and every statistic reaches ClickHouse once, even when a TaskManager dies mid-stream, Kafka restarts or ClickHouse goes away for a minute. This lesson explains how three mechanisms combine to give that: Flink's checkpoints, Kafka transactions committed on those checkpoints, and output tables
Alerts and statistics are useful only where people can query them: the operations team's dashboards, and auditors asking what happened to a shipment last Tuesday. Here that's ClickHouse, which reads the four output topics itself. This lesson explains how ClickHouse stores data, how its Kafka engine and materialized views turn a topic into rows, and how the tables are designed so a record delivered twice is stored once.
The old nightly script couldn't be changed without losing its running counts. A streaming job has the same problem, only sharper: its state is the memory of every incident in progress. Stop it carelessly and the detector forgets that SHP-0003 has been above 8 °C for four minutes; start it from scratch and it re-reads a week of readings. This lesson teaches how Flink carries state across a code change or a change of parallelism, through the two drills that exercise it.
Kafka and Flink are stateful, distributed systems with their own ideas of membership, storage and upgrades. Running them with plain Deployments would leave you to script every step: create the broker before the topics, take a savepoint before replacing a job's pods, restore from it afterwards. This project hands those steps to two operators, Strimzi for Kafka and the Flink Kubernetes Operator for the jobs, and this lesson explains what they do, how they're installed, and how
A streaming job is hard to test for the same reasons it's hard to write: results depend on time, on arrival order, on failures, and on several systems agreeing. "It ran and produced something" proves little. This project tests at five layers, each against results known in advance, and this lesson explains what each layer can and can't catch, and the simulator and oracle that make exact expectations possible.
The kind lab runs everything on your computer. On AWS, the same platform and job manifests run on Amazon EKS, with three things replaced: Flink's checkpoints go to Amazon S3 instead of SeaweedFS, Kafka's and ClickHouse's volumes are Amazon EBS volumes, and images come from Amazon ECR. This lesson explains each replacement, the identity design that keeps access keys out of the cluster, and the Terraform that builds it. The deployment guide is where you run it; this lesson only
A pipeline that's correct on day one still needs someone to notice when results stop, slow down or look wrong, and to find out why. This lesson gathers the signals the pipeline exposes, explains what each means and what normal looks like, and gives a method for going from a symptom to a cause. It also covers the routine changes of day two.
This guide takes you from the downloaded source to the pipeline running in two places. First a local kind cluster, which costs nothing: you deploy Kafka, the schema registry, ClickHouse and both Flink jobs, run a scenario whose correct results are known in advance, and then crash, upgrade and rescale the jobs while they run. Then, as an optional milestone, the same manifests on a small Amazon EKS cluster with checkpoints in Amazon S3. The cleanup guide removes both again.
Most problems in this pipeline show up as one of three things: something doesn't start, results stop arriving, or results arrive but differ from what they should be. Each points to a different part of the evidence. The first useful question is always: at which stage of the data path does the evidence stop looking normal? Readings in Kafka, the jobs' progress, committed outputs, ClickHouse's consumers: the first abnormal stage is where to dig.
An interview about this project rarely asks "what does the code do?". It asks why you chose this design over the obvious alternatives, and what happens when something fails. The question bank has twenty questions in five areas: architecture, time and state, exactly-once and schemas, operations and upgrades, and platform, security and testing. Each has a model answer, the talking points an interviewer listens for, and follow-ups that change a constraint.
This guide removes what the deployment guide created: first the AWS resources of the EKS milestone, which cost money every hour they exist, then the local kind lab. Each part works from any partial state, so use it whenever you stop, even if a deployment step failed halfway.
Before any cluster exists, you build the container that holds every tool and run the tests that guard every change to the jobs. Nothing in this milestone costs money or needs an AWS account.
You create the local Kubernetes cluster the lab runs in, install the two operators that will run Kafka and Flink for you, and put the job images where the cluster can start them. At the end the cluster is ready but the coldchain namespace is still empty.
You deploy the whole pipeline into the coldchain namespace in dependency order: secrets, Kafka with its topics and users, the schema registry, ClickHouse with its tables, the checkpoint store, then the two Flink jobs.
You send 40 minutes of simulated truck readings through the pipeline and check every result against answers computed in advance. This is the moment the pipeline proves itself: not "it ran", but "it produced exactly these alerts and windows, once each".
You break things on purpose while a scenario runs: kill TaskManagers and ClickHouse, upgrade the detector to a release with new state and a new rule, and change its parallelism. After each, the verifier must pass exactly as before.
Before anything billable exists, you make sure the EKS milestone can finish and be removed: a sign-in that works inside the toolbox, permission to create and delete the resources, enough vCPU quota for the nodes, and the inputs the scripts read.
You create the AWS side of the milestone with two Terraform roots: first the bucket that holds Terraform's state, then everything else in one apply. Your account is billed from here until the cleanup finishes.
You build the images for the nodes' Arm processors, push them to ECR, install the operators and deploy the same manifests as on kind, with the EKS overlays. Then you run the small scenario on EKS and check where the checkpoints went and how the jobs got their credentials.
You remove everything the EKS milestone created, in an order that leaves nothing billable behind, and confirm it with a check that reads the account directly.
You delete the kind cluster and everything in it, then the toolbox, Maven's cache, the base images and the files the scripts wrote, once you no longer need them.
Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.
AWS usage is separate from project access. The kind lab runs on your computer and costs nothing. The optional EKS milestone costs about USD 0.36 per hour in ap-south-1 at on-demand prices (an EKS control plane, two m7g.xlarge nodes, public IPv4 addresses and EBS storage, with S3 and ECR adding cents); a two-hour session costs well under USD 1. Charges continue until cleanup finishes. This is a learning reference, not a hosted lab or a production-readiness guarantee.
Vectametric Project Source Licence (2026-09-27): lawfully obtained source may be copied, modified and deployed for personal learning and interview preparation, including personal portfolio demonstrations with attribution. These permissions continue after online access expires. Do not resell or redistribute the Source Pack or its original source files, unchanged or modified. Commercial or client production use requires separate written permission. Third-party components downloaded when building or running the lab, such as the Maven dependencies in the pom.xml files, Apache Flink and its connectors, Apache Kafka, Strimzi, the Flink Kubernetes Operator, Apicurio Registry, ClickHouse, SeaweedFS, kind, kubectl, Helm, Terraform and its AWS provider, and the AWS CLI, retain their own licences. See LICENSE.txt and the Project Source Licence section of the site Terms for the full rules.
You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.
Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.
No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.
The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.
The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.
Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.
Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy