Running Case: SensorGrid Berlin¶
Every unit of this course opens with a chapter of one continuous story. The case is fictional, but each problem in it is a real problem that engineers meet when a workload outgrows a single core.
The situation
The city of Berlin operates SensorGrid, a network of 20,000 sensors on lamp posts, bus stops and school roofs. Each sensor measures air quality, temperature, noise and traffic, and sends a reading every five seconds.
- That is \(20{,}000 \times \frac{86{,}400}{5} \approx 3.5 \times 10^{8}\) readings per day.
- The environment office wants a daily report by 7 a.m., live alerts within seconds, and a machine learning model that predicts pollution peaks.
- Today, one Python script on one core needs six hours for the daily report. Alerts arrive too late. The model has never been trained on more than a week of data.
You join the SensorGrid team.
How the case grows¶
flowchart LR
subgraph A["Part A · One fast machine"]
direction TB
C1["U1 Six hours<br/>is too slow"] --> C2["U2 First sensor<br/>program in C++"] --> C3["U3 What the<br/>CPU does"] --> C4["U4 Cache friendly<br/>data layout"]
end
subgraph B["Part B · Many machines"]
direction TB
C5["U5 Data outgrows<br/>one server"] --> C6["U6 Readings in<br/>Cassandra"] --> C7["U7 Yearly batch<br/>in Hadoop"] --> C8["U8 Live ingestion<br/>with Kafka"]
end
subgraph C["Part C · Every core, the GPU"]
direction TB
C9["U9 Parallel loops<br/>with OpenMP"] --> C10["U10 ETL<br/>as tasks"] --> C11["U11 The race<br/>condition bug"] --> C12["U12 Train on<br/>the GPU"]
end
A --> B --> C
Stakeholders¶
| Stakeholder | Need | What they care about |
|---|---|---|
| Environment office | Daily pollution report by 7 a.m. | Throughput, reliability |
| Emergency coordination | Alert within seconds when a threshold is crossed | Latency |
| Data science team | Train models on years of readings | Scalability, GPU time |
| IT operations | Survive node failures, control cost | Fault tolerance, efficiency |
Numbers we reuse¶
| Quantity | Value |
|---|---|
| Sensors | 20,000 |
| Reading interval | 5 s |
| Readings per day | \(\approx 3.5 \times 10^{8}\) |
| Size of one reading | about 100 bytes |
| Raw data per day | \(\approx 35\) GB |
| Raw data per year | \(\approx 12.6\) TB |
These numbers are chosen so that each part of the course becomes necessary: one core is too slow (Part A), one machine is too small (Part B), and the model training needs thousands of lanes (Part C).