Analytics & ML · Study deck

Edge Processing: Aggregation Decisions

A threshold is a cutoff used to keep or discard readings.

Data Dora is your guide for this deck.

edgepatternsprocessing
Data Dora, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Tune filter thresholds with false-alarm evidence.
  • Select an edge aggregation window from latency and bandwidth needs.
  • Explain: A threshold filter sends exceptions and discards routine readings.
  • Explain: Hybrid architectures run simple detection at edge (anomaly flags, threshold checks) while cloud handles deep analysis (root cause diagnosis, long-term forecasting).
Reference-model Levels 1 to 4 distinguish edge transformation from connectivity and data accumulation.
Reference-model Levels 1 to 4 distinguish edge transformation from connectivity and data accumulation.
iotclass.org

Major section

Checkpoint: Run the Four Contracts

A threshold filter sends exceptions and discards routine readings.

  • An inference step sends anomaly evidence, while Store-Forward keeps buffered readings until the network returns.
Farm edge gateway aligns heterogeneous sensors, combines redundant readings, buffers an outage, and writes a lineage-preserving cloud record.
Farm edge gateway aligns heterogeneous sensors, combines redundant readings, buffers an outage, and writes a lineage-preserving cloud record.
iotclass.org

Major section

Edge ML vs Cloud ML Inference

Hybrid architectures run simple detection at edge (anomaly flags, threshold checks) while cloud handles deep analysis (root cause diagnosis, long-term forecasting).

  • A factory safety system needs 20 ms edge response, but weekly predictive maintenance reports can use cloud-trained models updated monthly.
Farm edge gateway aligns heterogeneous sensors, combines redundant readings, buffers an outage, and writes a lineage-preserving cloud record.
Farm edge gateway aligns heterogeneous sensors, combines redundant readings, buffers an outage, and writes a lineage-preserving cloud record.
iotclass.org

Major section

Batch vs Streaming at Edge

Option A (Batch Processing): Collect sensor data locally for 1-60 minutes, process in batches, upload aggregated results.

  • Option B (Real-Time Streaming): Process each sensor reading immediately as it arrives with sub-second latency.
  • A smart meter can batch hourly readings, but a pipeline pressure sensor must stream in real-time to detect ruptures within seconds.

Why it matters

In this illustrative comparison, batching reduces compute cycles by 80-95% and extends battery life 3-5x on the specified constrained device, but introduces 1-60 minute detection latency.

iotclass.org

Major section

Edge Does Not Always Save Cost

Edge aggregation reduces cloud traffic by 90%: 36 MB/month.

  • Priced subtotal: ~$533/month, before power, repairs, and OTA costs.
  • Software updates: Edge devices require OTA update infrastructure.
  • Small deployments (<1,000 sensors, <1 GB/month): Cloud is usually cheaper.

Key terms

Hardware
Hardware is amortized over multi-year deployments 3.
Maintenance
Maintenance is minimal (reliable hardware, remote updates) 4.

Why it matters

The Reality: Edge computing reduces bandwidth costs but introduces hardware and maintenance costs that can exceed cloud savings in many scenarios.

iotclass.org

Major section

Checkpoint: Price the Trade-off

Edge ML is attractive for 10-50 ms decisions, while cloud ML often pays a 200-500 ms round trip.

  • Cost savings need enough volume: the chapter's decision framework separates small deployments, medium deployments, and large deployments above 10,000 sensors or 10 GB/month.

Why it matters

In this illustrative comparison, batch processing reduces compute cycles by 80-95%, but introduces 1-60 minute detection latency.

iotclass.org

Major section

Illustrative Supermarket Fleet

Each store has 12 display cases with 3 sensors each (temperature, defrost status, compressor current), reporting every 30 seconds.

  • 40,000 stores x 12 cases x 3 sensors = 1,440,000 sensors.
  • Key Insight: The three sensor types in the same deployment use three different edge patterns.
  • Pattern selection is per-sensor, not per-deployment.

Why it matters

Result for this illustrative fleet: Edge processing reduces modeled daily cellular costs from EUR 16,600 to about EUR 722.69 -- a 95.6% reduction by record count.

iotclass.org

Major section

Checkpoint: Validate the Fleet Mix

The illustrative supermarket fleet starts with 40,000 stores, 12 display cases per store, and 3 sensors per case.

  • The raw daily total is 33.2 GB; the illustrative mixed edge plan models 1,445.38 MB after processing, with compressor byte savings depending on summary encoding.
iotclass.org

Deck summary

Key takeaways

A threshold filter sends exceptions and discards routine readings.

  • Hybrid architectures run simple detection at edge (anomaly flags, threshold checks) while cloud handles deep analysis (root cause diagnosis, long-term forecasting).
  • Option A (Batch Processing): Collect sensor data locally for 1-60 minutes, process in batches, upload aggregated results.
  • Edge aggregation reduces cloud traffic by 90%: 36 MB/month.
  • Edge ML is attractive for 10-50 ms decisions, while cloud ML often pays a 200-500 ms round trip.
iotclass.org

Retrieval practice

Recall check 1 of 2

Data Dora says: answer from memory, then check your reasoning.

Q1A gateway uses the chapter’s aggregation function on a window of readings. What should it send upstream?

AA separate upload for each original reading
BA summary containing statistics and window context
CAn inference label replacing the window statistics
DA buffered batch awaiting restored connectivity
Show answer

Answer: B The example returns minimum, maximum, average, deviation, count, and window end.

Q2An agricultural gateway buffers readings during a link outage. In the example, when should it clear the buffer?

AAfter a network connection becomes available
BAfter copying readings into an upload batch
CAfter the batch upload reports success
DAfter accepting the next sensor reading
Show answer

Answer: C The buffer is cleared inside the successful upload condition.

iotclass.org

Retrieval practice

Recall check 2 of 2

Data Dora says: answer from memory, then check your reasoning.

Q3What records a local decision, its evidence version and its outcome for later review?

ATime-Bound Stream Ingestion
BUnit-Normalized Local Transform
CContextual Pattern Detector
DAuditable Action Trigger
Show answer

Answer: D The local command records the decision, evidence version, and outcome so fast response still supports later review and replay.

iotclass.org

Print reference

Answers

Answer key.

  1. B · The example returns minimum, maximum, average, deviation, count, and window end.
  2. C · The buffer is cleared inside the successful upload condition.
  3. D · The local command records the decision, evidence version, and outcome so fast response still supports later review and replay.
iotclass.org