Compare deadline feasibility and telemetry volume for two inference placements.
The focus of this experiment is to calculate application data volume and communication savings. Students then compare edge and cloud inference latency or resource assumptions, and justify placement under stated network and hardware budgets. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.
Learning objectives
Calculate application data volume and communication savings.
Compare edge and cloud inference latency or resource assumptions.
Justify placement under stated network and hardware budgets.
Identify the configured inputs (Deadline (ms); Network round trip (ms); Edge inference (ms); Cloud inference (ms); Raw upload (bytes/sample)) and record the corresponding observed outputs with units where applicable.
Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.
Expected learning outcomes
On completion, students can calculate application data volume and communication savings, compare edge and cloud inference latency or resource assumptions, and justify placement under stated network and hardware budgets.
Required deliverables
Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing justify placement under stated network and hardware budgets. Separate predicted values from observations.
Prerequisite knowledge and related learning
Review the following catalogue prerequisites before starting. After completion, continue to Model drift & lifecycle monitoring.
The supplied model, datasets and local Python or Colab notebook. Report the data partition and execution environment; do not claim physical edge-device performance from host measurements.
Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.
M07 · learning outcome
Understand the experiment
Edge versus cloud · two independent lanes
Queue waiting and network round trip contribute to observed latency
Scientific architecture · Edge vs cloud inference budget
Scientific concept map: Sensor data — Payload and rate; Edge inference — Local compute; Cloud inference — Network + compute; Latency budget — Deadline; Decision — Compare feasible placement.
Scientific foundations and analytical reasoning
End-to-end edge latency may avoid network round trip; cloud latency includes network and inference. Upload volume depends on sample rate and payload.
Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.
Scientific theory · Queueing and inference placement
End-to-end latency includes waiting, processing and communication. A serialized service with arrival interval A and service time S has utilization S/A; if arrivals persist faster than service, backlog grows. Edge inference can reduce communication but may have constrained computation. Deadline success is a separate metric from mean latency.
Worked example and engineering interpretation
At 100 ms arrival interval and 25 ms service, ideal deterministic utilization is 0.25. With 120 ms serialized service it is 1.2, so backlog grows under sustained arrivals. Count completed on-time jobs and unfinished jobs separately; a fast mean can hide missed deadlines.
Engineering principles · additional worked teaching example
End-to-end latency includes acquisition, network and computation. If edge compute20 ms and cloud RTT60+compute25=85 ms, both meet100 ms, with margins80 and15. Raw payload rate equals bytes/sample × samples/s before headers.
From theory to experiment
Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.
How to investigate Edge vs cloud inference budget
Compare deadline feasibility and telemetry volume for two inference placements.
Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.
Experiment-specific guided practice
Objective: Compare deadline feasibility and telemetry volume for two inference placements.
Set Deadline (ms) = 100; Network round trip (ms) = 80; Edge inference (ms) = 25; Cloud inference (ms) = 40; Raw upload (bytes/sample) = 128; Sample rate (Hz) = 10. Observe the calculated results and trace.
Change Edge inference (ms) = 150; Network round trip (ms) = 250. Reference edge meets the deadline and cloud misses; changed both miss.
Restore the reference values. Compute bytes per second and latency; run the local inference CLI to observe actual host processing, not model latency.
Reference check:
Model boundary:
Independent task and submission evidence
2. Change Edge inference (ms) = 150; Network round trip (ms) = 250. Reference edge meets the deadline and cloud misses; changed both miss. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.
Trial
Changed setting
Fixed settings
Predicted result
Actual observation / units
Evidence / uncertainty
A: baseline
Reference
Record
Predict
Record
Record
B: one change
Record
Same as A
Predict
Record
Record
A: repeat
Restore
Same as A
Predict
Record
Record
Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.
Compare deadline feasibility and telemetry volume for two inference placements.
Method: Configured latency and payload budget; deterministic analytical model.
Data provenance: deterministic generated teaching fixture or configured analytical model. No real sensor data, physical inference performance, or production deployment is claimed.
Worked engineering reasoning and boundary conditions
Engineering reference configuration: Deadline (ms) = 100; Network round trip (ms) = 80; Edge inference (ms) = 25; Cloud inference (ms) = 40; Raw upload (bytes/sample) = 128; Sample rate (Hz) = 10. In the classroom model, Edge latency model = 25 ms; Cloud latency model = 120 ms; Edge traffic = 160 B/s; Cloud traffic = 1280 B/s. Latency sums assume serial stages, no queueing, and configured RTT; payload-only traffic excludes transport overhead. No actual network or device benchmark. Configured latency and payload budget; deterministic analytical model
Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.
Mathematical representation and interpretation
Communication volume
N devices each emit r records per second for T seconds, with b bytes per record. The result B is application bytes, excluding link and transport overhead unless explicitly added.
\[B=N\,r\,T\,b\]
Concept animation · independent state notebook
Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.
Step 1 of 3 · Calculated state 1
Calculated state 1
Item
Edge deadline
Value
MET
Explanation
Calculated state 2
Item
Cloud deadline
Value
MISSED
Explanation
Calculated state 3
Item
Policy
Value
Edge inference
Explanation
Teaching example only; inspect live calculations or real practical evidence separately.
Recall the concept before revealing its explanation.
0 / 3 revealed
M07 · 01 / 08Which aspects of inference placement are compared?Reveal explanation
Engineering explanation
Compare deadline feasibility and telemetry volume for two inference placements.
The cloud model includes communication RTT plus processing; edge inference avoids the configured round trip.
M07 · 05 / 08Why not compare payload traffic as total wire traffic?Reveal explanation
Engineering reasoning
Protocol headers, security overhead, retransmissions and other communication are excluded by a payload-only calculation.
M07 · 06 / 08Edge and cloud inference are compared. Select every technically valid statement.
A. Include communication time in the cloud path budget.
B. Separate latency feasibility from inference accuracy.
C. Cloud inference has zero communication latency by definition.
D. Lower message volume necessarily establishes better classification accuracy.Reveal explanation
Applied scenario
Correct: A. Include communication time in the cloud path budget.; B. Separate latency feasibility from inference accuracy.
M07 · 07 / 08In Edge vs cloud inference budget, which reference and changed settings are prescribed for Edge inference (ms); Network round trip (ms)?Reveal explanation
Controlled configuration
Edge inference (ms): 25 → 150; Network round trip (ms): 80 → 250; hold the remaining settings fixed.
M07 · 08 / 08What expected result distinguishes the reference and changed trials in Edge vs cloud inference budget?Reveal explanation
Expected observation
Reference edge meets the deadline and cloud misses; changed both miss.
Loading live engineering instrument…Supplementary research apparatusLoading experiment-specific apparatus…Scientific model · primary investigation
Simulation task
Compare deadline feasibility and telemetry volume for two inference placements.
Explore the model using its own controls. Record a prediction before changing a condition. Compare the reference with a changed condition, then use the Experiment tab for the procedure, acceptance criteria and notebook. Model outputs and physical observations must remain separate.
Interactive engineering workbenchM07 · Scientific model
Readout from the original computational model; not physical measurements.
Loading instrument…
Awaiting model display.
Experimental instrumentation · A/B
Compare two model conditions
Capture a baseline, change one experimental condition, run the model if required and capture the comparison. Snapshots contain visible controls and display text, not physical sensor readings. Review before exporting.
Ask Dr. Mohammad locally, or prepare an experiment-aware prompt for ChatGPT, Gemini or Claude. The external providers open in their own tabs; nothing is automatically submitted.
Public course objective, displayed commands, source excerpts and procedure. Private assessment content is not collected.
Prepare a contextual AI prompt
0 characters
Common secret and email patterns are redacted on preparation; this is not a comprehensive privacy filter. Review the entire editable prompt, including student work and unpublished research, before sharing. The providers apply their own accounts, privacy settings and limits.
Prepare → review → copy & open your selected provider → paste and submit there.
Independent theoretical exercises
Before the simulation or practical, solve both experiment-specific tasks. List the given inputs, show the intermediate calculation or state trace, identify the expected observation, and state a limitation. Show formulas and intermediate calculations where relevant, or draw the requested state/sequence diagram. These are independent classroom fixtures; where they differ from the reference configuration below, do not treat them as measured values. Compare your predictions with the corresponding experiment afterwards.
01 · Predict and derive using the given inputs
Compare 25 ms edge with 80+40 ms cloud against 100 ms deadline. Compute margin for each.
Engineering method — End-to-end latency includes acquisition, network and computation. If edge compute20 ms and cloud RTT60+compute25=85 ms, both meet100 ms, with margins80 and15. Raw payload rate equals bytes/sample × samples/s before headers. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
02 · Compare or justify using evidence
At 128 B/sample and 10 Hz compute bytes/s and per minute; compare upload of 16-byte inference results.
Engineering method — End-to-end latency includes acquisition, network and computation. If edge compute20 ms and cloud RTT60+compute25=85 ms, both meet100 ms, with margins80 and15. Raw payload rate equals bytes/sample × samples/s before headers. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
03 · Design calculation
Design calculation · Independent work
Deadline90 ms, edge35 ms, cloud RTT70 plus compute30. Compare margin and raw payload rate at 96 B × 20 Hz.
Design calculation — End-to-end latency includes acquisition, network and computation. If edge compute20 ms and cloud RTT60+compute25=85 ms, both meet100 ms, with margins80 and15. Raw payload rate equals bytes/sample × samples/s before headers. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
Work is saved locally when browser storage is available. Export it for submission; no remote upload or automatic grade is assigned.
Expanded independent theoretical exercise bank
Progress from calculation and interpretation to diagnosis and controlled engineering design. Complete the questions without opening the simulation first; show intermediate steps.
Intermediate · Explain a changed-input result
Independent theoretical exercise · M07-01
Use the reference configuration (Deadline (ms) = 100; Network round trip (ms) = 80; Edge inference (ms) = 25; Cloud inference (ms) = 40; Raw upload (bytes/sample) = 128; Sample rate (Hz) = 10), but change Network round trip (ms) = 82. The model reports Cloud latency model = 122 ms. Explain the governing rule and assumptions that make this output plausible; identify an independent verification method.
Intermediate · Quantitative comparison
Independent theoretical exercise · M07-02
Two model observations of Cloud latency model are 120 ms (reference) and 122 ms (changed condition). Compute signed change and, when the reference is nonzero, percentage change. Explain why units matter.
Intermediate · Interpret a technical trace
Independent theoretical exercise · M07-03
For Edge inference (ms) = 27, the model supplies this excerpt from Calculated trace:
Item · Value · Explanation
Edge deadline · MET ·
Cloud deadline · MISSED ·
Policy · Edge inference ·
Count rows whose Value value is exactly “MET”, and identify the displayed row numbers. Explain what the count describes.
Advanced · Reverse reasoning
Independent theoretical exercise · M07-04
An observation is Edge latency model = 27 ms. Candidate A uses Deadline (ms) = 100; Network round trip (ms) = 80; Edge inference (ms) = 25; Cloud inference (ms) = 40; Raw upload (bytes/sample) = 128; Sample rate (Hz) = 10. Candidate B changes the listed settings (Edge inference (ms) = 27) and keeps the remaining settings fixed. Which is consistent with the observation? If both can explain it, say what additional evidence is required.
Advanced · Diagnose a reported mismatch
Independent theoretical exercise · M07-05
A student configures Cloud inference (ms) = 42 while preserving all other reference settings, but copies the reference report of Cloud latency model = 120 ms. Evaluate whether the report is justified. Identify the first configuration/output check to perform.
Challenging · Design a controlled verification
Independent theoretical exercise · M07-06
Design a controlled comparison for Edge vs cloud inference budget using reference Deadline (ms) = 100; Network round trip (ms) = 80; Edge inference (ms) = 25; Cloud inference (ms) = 40; Raw upload (bytes/sample) = 128; Sample rate (Hz) = 10 and test Network round trip (ms) = 82. Specify the changed setting(s), measured metric Cloud latency model, controls, repetitions, an acceptance check and what evidence can distinguish an actual implementation from the model.
Challenging numerical variant 1
Calculation · Independent work
A sensor sends 9 raw records per second of 40 B each for 12 s. Edge inference sends one 16 B summary each second. Ignoring headers, how many bytes are avoided over this interval?
Challenging numerical variant 2
Calculation · Independent work
A sensor sends 14 raw records per second of 40 B each for 28 s. Edge inference sends one 40 B summary each second. Ignoring headers, how many bytes are avoided over this interval?
Challenging numerical variant 3
Calculation · Independent work
A sensor sends 8 raw records per second of 40 B each for 23 s. Edge inference sends one 24 B summary each second. Ignoring headers, how many bytes are avoided over this interval?
Step-by-step experimental procedure
Compare deadline feasibility and telemetry volume for two inference placements.
1 · Reference workbench configuration
Use the named reference workbench and its reference inputs. Additional live instruments may have different controls; use the matching instrument. Record virtual and practical results separately.
Deadline (ms)100
Network round trip (ms)80
Edge inference (ms)25
Cloud inference (ms)40
Raw upload (bytes/sample)128
Sample rate (Hz)10
2 · Perform the investigation in order
Set Deadline (ms) = 100; Network round trip (ms) = 80; Edge inference (ms) = 25; Cloud inference (ms) = 40; Raw upload (bytes/sample) = 128; Sample rate (Hz) = 10. Observe the calculated results and trace.
Change Edge inference (ms) = 150; Network round trip (ms) = 250. Reference edge meets the deadline and cloud misses; changed both miss.
Restore the reference values. Compute bytes per second and latency; run the local inference CLI to observe actual host processing, not model latency.
3 · Compare controlled trials
Trial
Independent change
Expected check
Observation
Reference
Use reference inputs above
Reference edge meets the deadline and cloud misses; changed both miss.
Reference edge meets the deadline and cloud misses; changed both miss.
Record actual result
4 · Analyze and report
Compute bytes per second and latency; run the local inference CLI to observe actual host processing, not model latency.
Required evidence: Record the edge vs cloud inference budget comparison and justify the changed outcome from the calculated trace.
Model boundary: Configured latency and payload budget; deterministic analytical model
Controlled investigation · reproducible evidence
Method. Use the existing reference workbench configuration and the named controlled changes below. A controlled variable stays fixed while the independent variable is intentionally changed; the dependent variable is the resulting observed output. First predict each trial from the Concepts page. Run the baseline, then change only the specified setting and record the outcome. For deterministic traces one execution per case and a repeated verification are sufficient; for timing or stochastic measurements repeat at least five times, recording each run, median and range. Reset to the reference state between independent comparisons.
Evidence: attach the completed comparison table, one trace or screenshot per condition, and actual practical terminal/hardware evidence where applicable. Explain any prediction mismatch and distinguish modeled behavior from measured results.
Loading laboratory-specific procedure…
Python / Google Colab notebook
Original Python reference, generated teaching fixture. Validated locally in a fresh Jupyter kernel. Download, then upload to Google Colab.
Use 100 ms arrival interval, 25 ms edge service, 80 ms RTT, 40 ms cloud service and 100 ms deadline. Advance 20 arrivals.
Record both queue occupancies, completed deadline counts and payload bytes. Explain why the cloud lane accumulates waiting time.
Reset and increase arrival interval to 200 ms. Repeat 20 arrivals and compare queueing and completion counts.
Change edge service to 150 ms during a new run; compare the effect of new settings on later jobs. Export the modeled budget, not a hardware benchmark.
Evidence: retain your prediction, configuration, observations and exported event history; distinguish calculated teaching-model results from physical measurements.
Complete practical procedure & acceptance
Read the method, enter a prediction and save the reference baseline.
Apply the controlled change and compare metrics and plot. Compute bytes per second and latency; run the local inference CLI to observe actual host processing, not model latency.
Restore the reference and verify that the original metrics return. Enter an invalid parameter and confirm that export is disabled, then restore.
Run the independent local Python computation from the extracted portal root:
BASH · Command
python3 verification/ml168_practical.py all
Expected: ten passing checks and a result object for each lab. This uses Python standard library only. Compare the default result for M07 to the browser output.
Export actual observations and explain one limitation.
The CLI actually evaluates the trained logistic model on the host. Its single-call timer excludes training and transport, and is not comparable to the modeled network latency. Repeat on a Raspberry Pi if available, record device and software version; no physical test is implied.
Student submission: include your prediction, exported baseline and controlled result, actual terminal output, and a short interpretation. Do not submit the build validation report as your own evidence.
Experimental notebook
Record your own results. Values are not prefilled or independently verified.
Record & discuss
Portfolio exports use related core lab P43 for compatibility. The supplementary experiment ID is preserved in the attachment. Local completion is self-reported.
Download this notebook and open Google Colab. Select File → Upload notebook and choose the downloaded .ipynb.
Read the Markdown instructions before each executable cell. Use a Python runtime, run cells from top to bottom, and resolve imports if necessary.
Perform the baseline and controlled changes. Save the notebook with actual outputs and your written interpretation.
Execution scope: Default computational cells passed isolated local Python execution; physical equipment and live services require separate verification.
01Instructions · Markdown
# m07 · Edge vs cloud inference budget
**PSUT IoT Engineering Studio — Dr. Mohammad Alja’afreh**
## Introduction
Compare deadline feasibility and telemetry volume for two inference placements.
## How to run
1. Download this notebook from the laboratory page. Open Google Colab → File → Upload notebook.
2. Select a Python CPU runtime. Run cells from top to bottom using Shift+Enter, or Runtime → Run all.
3. Read the printed observations and assertions. Change one parameter at a time and rerun the relevant cell.
4. Save your own outputs and compare them to the portal Experiment tab.
**Execution boundary:** Original Python reference, generated teaching fixture. Do not run the hardware or service commands in Colab. No real credentials are needed. The notebook is self-contained.
02Instructions · Markdown
## Experiment-specific preparation
Compare deadline feasibility and telemetry volume for two inference placements.
**Reference procedure (use the matching simulator/WSL tool where named, not an unrelated service):**
1. Set Deadline (ms) = 100; Network round trip (ms) = 80; Edge inference (ms) = 25; Cloud inference (ms) = 40; Raw upload (bytes/sample) = 128; Sample rate (Hz) = 10. Observe the calculated results and trace.
2. Change Edge inference (ms) = 150; Network round trip (ms) = 250. Reference edge meets the deadline and cloud misses; changed both miss.
3. Restore the reference values. Compute bytes per second and latency; run the local inference CLI to observe actual host processing, not model latency.
**Evidence:**
**Boundary:**
03Instructions · Markdown
## 1. Objectives and reference condition
- Reproduce the specific computational mechanism in this laboratory.
- Inspect the output, compare the reference condition with a changed or rejected condition where implemented, and explain any discrepancy.
- Distinguish actual local Python execution from mock, physical and external-service observations.
## 2. Environment check
04Python · executable cell
PYTHON · Code cell
# =====================================================================
# M07 | Code cell 01 | Edge vs cloud inference budget
# Purpose: 1. Objectives and reference condition - Reproduce the specific computational mechanism in this laboratory. - Inspect the output, compare the reference condition with a changed or rejected condition where implem
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
import sys
print("Python",sys.version.split()[0])
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert sys.version_info >= (3,10)
## 3. Implementation
Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
06Python · executable cell
PYTHON · Code cell
# =====================================================================
# M07 | Code cell 02 | Edge vs cloud inference budget
# Purpose: implement only the mechanism named in this laboratory.
# Inputs: the explicit fictional fixture and reference parameters below.
# Output: printed observations and assertions for the controlled trial.
# =====================================================================
# Classroom budget in milliseconds and bytes, not measured latency.
deadline_ms=100
edge={'sensing':10,'inference':10,'overhead':5,'bytes':160}
cloud={'sensing':10,'network':85,'inference':15,'overhead':10,'bytes':1280}
def budget(path):return sum(v for k,v in path.items() if k!='bytes'),path['bytes']
### Step 2 · Run the reference calculation
Read the comments and variable definitions before execution. Assertions must pass; inspect values, not just completion.
08Python · executable cell
PYTHON · Code cell
# =====================================================================
# M07 | Code cell 03 | Edge vs cloud inference budget
# Purpose: implement only the mechanism named in this laboratory.
# Inputs: the explicit fictional fixture and reference parameters below.
# Output: printed observations and assertions for the controlled trial.
# =====================================================================
for name,path in [('edge',edge),('cloud',cloud)]:
latency,traffic=budget(path);print(name,latency,'ms',traffic,'bytes','deadline met',latency<=deadline_ms)
assert budget(edge)[0]==25 and budget(cloud)[0]==120
## Original portal implementation (reference only)
These are the actual laboratory snippets. They are retained for comparison; follow the portal setup for WSL, hardware or services. They are **not** executed by Run all.
```bash
python3 verification/ml168_practical.py all
```
```bash
python3 verification/ml168_practical.py infer --temperature 28 --vibration 2
```
10Instructions · Markdown
## 4. Results and analysis
Record the actual output and whether the assertions pass. Identify a parameter to vary, state your prediction, repeat the reference calculation, then explain the changed result.
| Trial | Configuration | Observation | Interpretation |
|---|---|---|---|
| A | Reference | | |
| B | One controlled change | | |
| C | Reference repeat | | |
**Limitations:** Original Python reference, generated teaching fixture. Notebook success does not certify external equipment or services.
11Instructions · Markdown
## Guided reasoning and evidence
A controlled comparison changes one independent input while keeping the other relevant inputs fixed; the dependent variable is the recorded output. Use this lab’s reference condition above.
**Independent task:** 2. Change Edge inference (ms) = 150; Network round trip (ms) = 250. Reference edge meets the deadline and cloud misses; changed both miss. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
| Trial | Input/configuration | Prediction | Observation | Evidence / limitation |
|---|---|---|---|---|
| A | Reference | | | |
| B | Changed input | | | |
| A repeat | Reference | | | |
A conclusion is supported only when it cites the recorded values or observed states and explains them with the experiment theory.
Shared research workbenches · network designer & advanced studiesConcurrent-device simulation & Monte Carlo research