Reference Architectures · Study deck

Practice: IoT Reference Architecture

A payload is the useful data carried inside a message.

Blueprint Bina is your guide for this deck.

iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • build a small layered IoT flow using device input, message formatting, local decision logic, and a review record;
  • explain which code or test artifact belongs to each architecture layer;
  • validate data-quality, threshold, and fallback behavior without relying on a specific board or cloud service;
  • extend the lab design toward accumulation, abstraction, application, and operations layers;
Reference architecture lab extension route from the core input, payload, and decision lab through accumulation, abstraction, application, operations, update evidence, and retest ownership.
Reference architecture lab extension route from the core input-payload-decision lab through accumulation, abstraction, application, operations, update evidence, and retest ownership.
iotclass.org

Major section

Start With the Review Record

The screen may show the right number while one hidden step uses stale or unsafe data.

  • For every hand-off, record the input, the output, the time, and the reason a value was accepted or rejected.
  • The evidence should show which layer noticed the change and which action followed.
  • A reviewer must be able to repeat the same cases.
  • This small lab does not prove a full service is ready for use.
Reference architecture lab test matrix showing normal, high-threshold, manual-trigger, invalid-reading, delayed-reading, and reset-recovery runs with the evidence required for each row.
Reference architecture lab test matrix showing normal, high-threshold, manual-trigger, invalid-reading, delayed-reading, and reset-recovery runs with the evidence required for each row.
iotclass.org

Major section

In 60 Seconds · Minimum Viable Understanding

You will define a small device scenario, separate sensing, message formatting, local decision logic, storage-ready records, and operator review, then prove each boundary with test output.

  • The goal is not to memorize a demo board.
  • That repeatability is what lets the lab stand in for a small architectural proof rather than a one-time demonstration.
  • The goal is to practice building a lab record that shows where each layer owns responsibility and how the design behaves when readings are valid, invalid, delayed, or outside limits.
iotclass.org

Major section

Lab Route

The worked run shows missing temperature carried as a missing field, which leads to an invalid decision and a fault indicator instead of a normal value.

  • The route in Figure: Reference architecture lab route showing the scenario starts with an environmental monitor and a clear outcome.
  • The route in the Reference architecture lab route showing the scenario, device input, payload contract, local decision, evidence capture, and acceptance record that make the lab reviewable diagram starts with an environmental monitor and a clear outcome.
  • Temperature, humidity, manual trigger, and quality status become an input record; the payload adds device and run identity with units.
  • A sensor, threshold, payload, or reset change then has a specific case to repeat.
Reference architecture lab route showing the scenario, device input, payload contract, local decision, evidence capture, and acceptance record that make the lab reviewable.
Reference architecture lab route showing the scenario, device input, payload contract, local decision, evidence capture, and acceptance record that make the lab reviewable.

Try it: Lab Route in the chapter

iotclass.org

Major section

Scenario and Setup · Layer Map

It produces a structured message, makes a local alert decision, and records enough evidence for review.

  • The decision consumes validated readings, not raw pins.
  • Lab RecordCaptured input, payload, decision, output, failed case, and reviewer note for each test run.
  • The tooling is acceptable only if it lets you observe the layer evidence listed in this chapter.
IoT lab evidence board showing test id, input, payload, local decision, output, reviewer note, pass result, and review condition.
IoT lab evidence board showing test id, input, payload, local decision, output, reviewer note, pass result, and review condition.
iotclass.org

Major section

Do Not Collapse the Layers · Payload Contract

That design is hard to test and hides responsibility boundaries.

  • Each layer should be callable and inspectable on its own.
  • The payload should be boring and stable.
iotclass.org

Major section

Test Matrix

This: Pass rule sequence supports the claim: Reference architecture lab test matrix showing normal, high-threshold, manual-trigger, invalid-reading, delayed-reading, and reset-recovery runs with the evidence required for each row.

  • Normal ReadingValid readings stay inside limits.
  • Local decision remains normal.
  • Payload remains valid.
  • Local decision becomes alert.

Check the decision

Run the matrix as evidence, not as a demonstration. For normal, threshold, invalid, delayed, and recovery cases, record input, expected local decision, published payload, and observed result; then mark the claim each row supports.

Reference architecture lab test matrix showing normal, high-threshold, manual-trigger, invalid-reading, delayed-reading, and reset-recovery runs with the evidence required for each row.
Reference architecture lab test matrix showing normal, high-threshold, manual-trigger, invalid-reading, delayed-reading, and reset-recovery runs with the evidence required for each row.

Key terms

Payload
Payload is valid.
Payload quality
Payload quality is marked invalid.
iotclass.org

Major section

Lab Record Board · Common Implementation Pitfall

With retest trigger included, their combined meaning is: IoT lab evidence board showing test id, input, payload, local decision, output, reviewer note, pass result, and review condition.

  • The most common failure is mixing layer responsibilities.
  • That structure makes every change risky.
  • A payload-format change should not alter threshold behavior.
  • A sensor replacement should not alter operator workflow.
Reference architecture lab route showing the scenario, device input, payload contract, local decision, evidence capture, and acceptance record that make the lab reviewable.
Reference architecture lab route showing the scenario, device input, payload contract, local decision, evidence capture, and acceptance record that make the lab reviewable.

Try it: Lab Record Board · Common Implementation Pitfall in the chapter

iotclass.org

Major section

Extension Plan

Data AccumulationStore accepted payloads with timestamps, quality flags, and run ids for later review.

  • Data AbstractionExpose a stable reading or zone record so applications do not depend on device-specific fields.
  • Application ViewShow normal, alert, invalid, stale, and manual-trigger states in a human-readable view.
Reference architecture lab extension route from the core input-payload-decision lab through accumulation, abstraction, application, operations, update evidence, and retest ownership.
Reference architecture lab extension route from the core input-payload-decision lab through accumulation, abstraction, application, operations, update evidence, and retest ownership.
iotclass.org

Major section

Key Concepts

For every case, compare raw input, formatted payload, decision output, visible behavior, and stored note using the same run identifier.

  • A disagreement reveals the boundary that needs repair.
  • A sensor, threshold, library, payload, or downstream workflow change then invokes the recorded review condition and repeats the affected cases.

Why it matters

Quality flag: A field that marks whether a reading is valid, missing, delayed, stale, or otherwise unsafe for normal decision logic.

iotclass.org

Major section

Overview: Evidence Is The Architecture

A fixture, sensor, or script must produce a raw reading with time, source, units, manual state, and quality before formatting or decision work begins.

  • The payload preserves a missing value as missing, and local logic marks the run invalid rather than treating it as an ordinary threshold case.
  • The record keeps the exact input, payload, output, note, and pass result together.
Reference architecture lab layer map separating core input, payload, and decision boundaries from later accumulation, abstraction, application, and operations responsibilities.
Reference architecture lab layer map separating core input, payload, and decision boundaries from later accumulation, abstraction, application, and operations responsibilities.
iotclass.org

Major section

Lab Record

They prove that the lab does not silently convert bad input into a confident application decision.

  • A useful lab row is specific enough to rerun.
  • For example, run-04 might inject temperature_c: null, humidity_percent: 63, manual_trigger: false, and quality.reason: missing_temperature.
  • If the same row only says "LED on" or "test passed," it is not architecture evidence.

Try it: Lab Record in the chapter

iotclass.org

Major section

Boundary Collapse Hides Defects

When input reading, payload formatting, threshold logic, output control, and review text live in one long loop, a lab can pass by accident.

  • A payload-format change can alter decision behavior.
  • A missing sensor value can look like a normal reading.
  • A dashboard label can become the only evidence that an alert happened.
  • Separated functions make defects visible.
iotclass.org

Major section

Boundary Collapse Hides Defects (continued)

The device-input layer can mark bad readings, the payload layer can carry quality evidence, the decision layer can refuse invalid data, and the lab-record layer can show which case failed.

  • The failure mode is usually an implicit dependency.
  • A function that formats JSON might also clamp values, so the decision layer never sees an out-of-range input.
  • The integrated run should prove the same boundaries in order, not replace them.
iotclass.org

Major section

Boundary Collapse Hides Defects (continued)

A display routine might translate invalid into the same red LED used for a high threshold, so the reviewer cannot distinguish a sensor fault from a real alert.

  • A reset routine might clear output state but leave the last payload in memory, so the next record looks current when it is stale.
  • A payload-format change should preserve decision outcomes for the same validated input.
  • A threshold change should alter only the decision cases it names.
iotclass.org

Major section

Summary

A clean lab separates device input, payload formatting, local decision logic, and evidence capture.

  • It then explains how the same core flow can grow into accumulation, abstraction, application, operations, and update evidence without collapsing responsibility boundaries.
Reference architecture lab layer map separating core input, payload, and decision boundaries from later accumulation, abstraction, application, and operations responsibilities.
Reference architecture lab layer map separating core input, payload, and decision boundaries from later accumulation, abstraction, application, and operations responsibilities.

This lab demonstrates layered architecture through evidence, not through a specific board or simulator.

iotclass.org

Deck summary

Key takeaways

The screen may show the right number while one hidden step uses stale or unsafe data.

  • You will define a small device scenario, separate sensing, message formatting, local decision logic, storage-ready records, and operator review, then prove each boundary with test output.
  • The worked run shows missing temperature carried as a missing field, which leads to an invalid decision and a fault indicator instead of a normal value.
  • It produces a structured message, makes a local alert decision, and records enough evidence for review.
  • That design is hard to test and hides responsibility boundaries.
iotclass.org

Retrieval practice

Recall check 1 of 3

Blueprint Bina says: answer from memory, then check your reasoning.

Q1Why does this reference-architecture lab insist you not collapse sensing, formatting, and decision logic into one step?

ABecause separate functions let sensing, formatting, and decisions run in parallel to reduce latency.
BBecause separated layers show which boundary owns valid, invalid, or delayed data.
CBecause compilers reject programs that read sensors and make decisions together.
DBecause each layer must be written in a different language or toolchain.
Show answer

Answer: B Keeping sensing, formatting, and decision layers separate lets the lab prove which boundary owns valid, invalid, or delayed data.

iotclass.org

Retrieval practice

Recall check 2 of 3

Blueprint Bina says: answer from memory, then check your reasoning.

Q2A lab run receives an invalid temperature reading, but the alert LED turns on because the threshold function used the raw value directly. Which architecture boundary failed?

AAn output presentation fault in how the LED reports an invalid reading.
BA storage boundary fault from applying the threshold before archiving the reading.
CA failed input-quality and local decision boundary from raw bad data.
DA network integrity fault from failing to reject the received sensor packet.
Show answer

Answer: C Layered lab evidence should show invalid readings as quality conditions.

iotclass.org

Retrieval practice

Recall check 3 of 3

Blueprint Bina says: answer from memory, then check your reasoning.

Q3During the architecture lab, a reset test shows the output state returns to normal, but the lab record does not include the input quality flag, payload fields, or local decision that produced that output. What should the reviewer require before accepting the lab?

AAccept normal-looking reset output without input quality, payload, or owning-layer evidence.
BRequire reset input, quality, payload, decision, output, result, owner, and review trigger.
CRequire a dashboard screenshot instead of recorded input, payload, and output traces.
DRemove reset test because recovery is only a production concern, not lab evidence.
Show answer

Answer: B A reference-architecture lab should be accepted only when the evidence record proves input quality, payload format, local decision, output state, review result, and ownership across normal and recovery cases.

iotclass.org

Print reference

Answers

Answer key.

  1. B · Keeping sensing, formatting, and decision layers separate lets the lab prove which boundary owns valid, invalid, or delayed data.
  2. C · Layered lab evidence should show invalid readings as quality conditions.
  3. B · A reference-architecture lab should be accepted only when the evidence record proves input quality, payload format, local decision, output state, review result, and ownership across normal and recovery cases.
iotclass.org