Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
CADET
CADET

Getting started

  • Quickstart
  • Installation
  • Version Matrix

Research goals

  • Choose Your Research Goal
    • Cooperative Driving
    • Computation Placement
    • Communication
    • Model Benchmarking
    • Distributed Sensing
  • Cooperative Driving
  • Computation Placement
  • Communication
  • Model Benchmarking
  • Distributed Sensing

Using CADET

  • Ways to Use CADET

Tutorials

  • Tutorial 1: First Experiment (Replay + Reference App + Delay Link)
  • Tutorial 2: CARLA Braking Experiment
  • Tutorial 3: Comparing Network Backends
  • Tutorial 4: Multi-Device Deployment
  • Tutorial 5: Sweeps and Reproducibility
  • Tutorial 6: Write an App Plugin
  • Tutorial 7: V2V and V2I Experiments

How-to guides

  • Use the replay source
  • Use the synthetic source
  • Live source
  • Register per-device model artifacts
  • Configure link distributions
  • Wi-Fi cell
  • Transport tuning
  • Run and resume sweeps
  • Dashboard
  • Read outputs and run.json
  • Recovery with cadet down

Reference

  • Config Reference
  • CLI Reference
  • Metrics Reference
  • Output Format
  • Tested configurations
  • API Reference
    • cadet.cli
    • cadet.config
    • cadet.core
    • cadet.orchestrator
    • cadet.network
    • cadet.roles
    • cadet.sources
    • cadet.metrics

Explanation

  • Architecture
  • Data Source Layer
  • Processing Core Layer
  • NetWaggle Layer
  • Analysis Layer
  • Network Backend Semantics
  • Reproducibility
  • Design Goals
  • Dataset Mode
  • Requirements and scope

Apps

  • App Plugin Guide

Examples

  • Examples Gallery
    • Distributed Sensing
    • Dataset-mode VLM serving
  • Dataset-mode VLM serving

Help

  • Frequently Asked Questions

Community

  • Citing CADET
  • Contributing
Back to top
View this page
Edit this page

Tutorial 1: First Experiment (Replay + Reference App + Delay Link)¶

This tutorial runs a complete CADET experiment without a simulator: the replay source feeds pre-recorded frames, the reference app measures round-trip latency, and a delay link adds 60 ms of emulated latency.

By the end you will have:

  • a working local CADET setup,

  • a completed run with output files,

  • an understanding of how the config, orchestrator, and metrics fit together.

Prerequisites¶

  • CADET installed (see Quickstart).

  • A directory of images to replay (JPEG or PNG, sorted lexicographically). If you do not have one, the synthetic-source note in Step 1 below lets you skip it entirely.


Step 1: Write the config¶

Create my_first_experiment.yaml:

extends: configs/base.yaml

experiment:
  name: first_experiment
  app: reference
  repetitions: 1

source:
  kind: replay
  path: /path/to/your/images    # directory of .jpg/.png files
  fps: 10.0

nodes:
  - name: client
    host: localhost
    role: client
    device: cpu

  - name: server
    host: localhost
    port: 5100
    role: server
    device: cpu

links:
  - name: inference_link
    from: client
    to: server
    network:
      mode: delay
      distribution:
        kind: constant
        value_ms: 60.0

app:
  plugin: reference

Note

Channels vs links: Frames between client and server travel on the link when you want network emulation. A channel is unshaped plumbing (simulator → client, for example). Using both a channel and a link between the same two nodes would route frames on the channel, bypassing emulation entirely. Use a link whenever you want latency, jitter, or loss on the data path.

Note

No images? Replace the source block with:

source:
  kind: synthetic
  count: 50
  width: 224
  height: 224
  fps: 10.0

The synthetic source generates solid-colour frames in memory and needs no external files.


Step 2: Validate¶

cadet validate my_first_experiment.yaml

A clean config prints no errors. If you see PreflightError, check that port 5100 is not already in use.


Step 3: Run¶

cadet run my_first_experiment.yaml

You will see orchestrator log lines:

[orch] starting serve:server
[orch] sim hook: ...
[orch] starting client:client
[orch] run first_experiment-abc1234567-r0 ok (all workers exited cleanly)

The run completes when all frames have been sent and the client exits.


Step 4: Examine the output¶

Results land in outputs/first_experiment/reference/<run_id>/:

ls outputs/first_experiment/reference/
abc1234567-r0/
├── run.json
├── config.yaml
├── link_report.json
└── *_latency_location_log.csv

Open link_report.json to see the configured vs achieved latency:

{
  "inference_link": {
    "configured": {"mode": "delay", "distribution": {"kind": "constant", "value_ms": 60.0}},
    "achieved":   {"p50_ms": 60.0, "p99_ms": 60.0},
    "messages":   {"sent": 50, "received": 50, "unanswered": 0},
    "latency_ms": {"p50": 60.4, "p99": 61.2, "min": 59.9, "max": 62.1}
  }
}

The measured p50 is ≈ 60 ms — the delay backend honours the configured constant at the message level. Compare this to the netem tutorial where the same 60 ms config produces ≈ 149 ms due to TCP Nagle.


Step 5: Sweep delay values¶

Add a sweep to the config to run three latency conditions in one command:

sweep:
  axes:
    links[0].network.distribution.value_ms: [30, 60, 120]
cadet sweep my_first_experiment.yaml

Three output directories appear under outputs/first_experiment/reference/, one per delay value. Each has a unique run_id derived from its resolved config. Re-running the sweep skips any cell that already has a run.json with "status": "complete".


Next steps¶

  • Add jitter: change the distribution to kind: lognormal with p50_ms: 60 and p99_ms: 200 to model a realistic tail.

  • Try netem: change network.mode to netem and add bandwidth_mbps: 10 to see how TCP reacts. See Network Backend Semantics for the full comparison.

  • Use CARLA: replace the source with kind: carla and follow the CARLA tutorial for the full braking scenario.

Next
Tutorial 2: CARLA Braking Experiment
Previous
Ways to Use CADET
Made with Furo
On this page
  • Tutorial 1: First Experiment (Replay + Reference App + Delay Link)
    • Prerequisites
    • Step 1: Write the config
    • Step 2: Validate
    • Step 3: Run
    • Step 4: Examine the output
    • Step 5: Sweep delay values
    • Next steps