# ifpb/last_wave architecture

> Architecture diagram of the GitHub repository ifpb/last_wave, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ifpb/last_wave
- Repository: https://github.com/ifpb/last_wave

## Overview

WAVE is a web-driven network experimentation tool: researchers configure an experiment, provision an emulated environment, run a workload, and inspect metrics in Grafana. The graph covers the sampled Flask UI/API and provisioning/Grafana code, plus documented topology and monitoring capabilities. The excerpts do not show every topology script or the client launcher implementation, so those runtime links are omitted where they cannot be verified.

Main entry points: [`wave/api/provision.py`](https://github.com/ifpb/last_wave/blob/main/wave/api/provision.py) (Environment provisioner), [`wave/api/api.py`](https://github.com/ifpb/last_wave/blob/main/wave/api/api.py) (Provision API), [`wave/app/views.py`](https://github.com/ifpb/last_wave/blob/main/wave/app/views.py) (WAVE web UI), [`wave/api/conf_grafana/createDataSources.py`](https://github.com/ifpb/last_wave/blob/main/wave/api/conf_grafana/createDataSources.py) (Grafana data sources)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Experiment interface"]
  node_webui["WAVE web UI<br/>[views.py]"]
  node_webapp["Flask app<br/>[app.py]"]
  node_config["Experiment config<br/>[confYaml.py]"]
end

subgraph group_control["Provisioning control"]
  node_api["Provision API<br/>[api.py]"]
  node_provision["Environment provisioner<br/>[provision.py]"]
  node_topologies["Topology scripts"]
  node_docker["Docker / Mininet"]
  node_paths["Runtime paths<br/>[paths.py]"]
end

subgraph group_workloads["Traffic workloads"]
  node_sinusoid["Sinusoid workload<br/>[sinusoid.py]"]
  node_flashcrowd["Flashcrowd workload<br/>[flashcrowd.py]"]
  node_stairstep["Stair-step workload<br/>[stair_step.py]"]
  node_microburst["Microburst workload<br/>[microburst.py]"]
end

subgraph group_observability["Metrics and dashboards"]
  node_grafana["Grafana"]
  node_apikey["Grafana API key<br/>[generateAPIKey.py]"]
  node_datasources["Grafana data sources"]
  node_dashboard["Dashboard setup<br/>[createDashboard.py]"]
  node_prometheus["Prometheus"]
end

node_researcher(("Researcher"))

node_researcher -->|"configures experiment"| node_webui
node_webapp -->|"registers routes"| node_webui
node_webui -->|"stores configuration"| node_config
node_webui -->|"calls over HTTP"| node_api
node_api -->|"dispatches lifecycle"| node_provision
node_provision -->|"uses config path"| node_paths
node_provision -->|"starts or stops"| node_docker
node_provision -->|"runs topology scripts"| node_topologies
node_provision -->|"dispatches profile"| node_sinusoid
node_provision -->|"dispatches profile"| node_flashcrowd
node_provision -->|"dispatches profile"| node_stairstep
node_provision -->|"dispatches workload"| node_microburst
node_api -->|"creates key"| node_apikey
node_api -->|"creates sources"| node_datasources
node_api -->|"creates dashboard"| node_dashboard
node_apikey -->|"requests API key"| node_grafana
node_datasources -->|"configures sources"| node_grafana
node_dashboard -->|"publishes dashboard"| node_grafana
node_datasources -->|"registers metrics source"| node_prometheus

click node_webui "https://github.com/ifpb/last_wave/blob/main/wave/app/views.py"
click node_webapp "https://github.com/ifpb/last_wave/blob/main/wave/app/app.py"
click node_config "https://github.com/ifpb/last_wave/blob/main/wave/app/provision/confYaml.py"
click node_api "https://github.com/ifpb/last_wave/blob/main/wave/api/api.py"
click node_provision "https://github.com/ifpb/last_wave/blob/main/wave/api/provision.py"
click node_topologies "https://github.com/ifpb/last_wave/tree/main/wave/app/provision"
click node_sinusoid "https://github.com/ifpb/last_wave/blob/main/loadGen/sinusoid/sinusoid.py"
click node_flashcrowd "https://github.com/ifpb/last_wave/blob/main/loadGen/flashcrowd/flashcrowd.py"
click node_stairstep "https://github.com/ifpb/last_wave/blob/main/loadGen/stair_step/stair_step.py"
click node_microburst "https://github.com/ifpb/last_wave/blob/main/loadGen/microburst/microburst.py"
click node_apikey "https://github.com/ifpb/last_wave/blob/main/wave/api/conf_grafana/generateAPIKey.py"
click node_datasources "https://github.com/ifpb/last_wave/blob/main/wave/api/conf_grafana/createDataSources.py"
click node_dashboard "https://github.com/ifpb/last_wave/blob/main/wave/api/conf_grafana/createDashboard.py"
click node_paths "https://github.com/ifpb/last_wave/blob/main/wave/api/paths.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_webui,node_webapp,node_config toneBlue
class node_api,node_provision,node_topologies,node_docker,node_paths toneAmber
class node_sinusoid,node_flashcrowd,node_stairstep,node_microburst toneMint
class node_grafana,node_apikey,node_datasources,node_dashboard,node_prometheus toneRose
class node_researcher toneIndigo
```

## Components

### Experiment interface

- [WAVE web UI](https://github.com/ifpb/last_wave/blob/main/wave/app/views.py): `wave/app/views.py`
- [Flask app](https://github.com/ifpb/last_wave/blob/main/wave/app/app.py): `wave/app/app.py`
- [Experiment config](https://github.com/ifpb/last_wave/blob/main/wave/app/provision/confYaml.py): `wave/app/provision/confYaml.py`

### Provisioning control

- [Provision API](https://github.com/ifpb/last_wave/blob/main/wave/api/api.py): `wave/api/api.py`
- [Environment provisioner](https://github.com/ifpb/last_wave/blob/main/wave/api/provision.py): `wave/api/provision.py`
- [Topology scripts](https://github.com/ifpb/last_wave/tree/main/wave/app/provision): `wave/app/provision`
- **Docker / Mininet**
- [Runtime paths](https://github.com/ifpb/last_wave/blob/main/wave/api/paths.py): `wave/api/paths.py`

### Traffic workloads

- [Sinusoid workload](https://github.com/ifpb/last_wave/blob/main/loadGen/sinusoid/sinusoid.py): `loadGen/sinusoid/sinusoid.py`
- [Flashcrowd workload](https://github.com/ifpb/last_wave/blob/main/loadGen/flashcrowd/flashcrowd.py): `loadGen/flashcrowd/flashcrowd.py`
- [Stair-step workload](https://github.com/ifpb/last_wave/blob/main/loadGen/stair_step/stair_step.py): `loadGen/stair_step/stair_step.py`
- [Microburst workload](https://github.com/ifpb/last_wave/blob/main/loadGen/microburst/microburst.py): `loadGen/microburst/microburst.py`

### Metrics and dashboards

- **Grafana**
- [Grafana API key](https://github.com/ifpb/last_wave/blob/main/wave/api/conf_grafana/generateAPIKey.py): `wave/api/conf_grafana/generateAPIKey.py`
- [Grafana data sources](https://github.com/ifpb/last_wave/blob/main/wave/api/conf_grafana/createDataSources.py): `wave/api/conf_grafana/createDataSources.py`
- [Dashboard setup](https://github.com/ifpb/last_wave/blob/main/wave/api/conf_grafana/createDashboard.py): `wave/api/conf_grafana/createDashboard.py`
- **Prometheus**

### Other components

- **Researcher**

## Connections

- Researcher → WAVE web UI: configures experiment (evidence: `wave/app/views.py`)
- Flask app → WAVE web UI: registers routes (evidence: `wave/app/app.py`)
- WAVE web UI → Experiment config: stores configuration (evidence: `wave/app/views.py`)
- WAVE web UI → Provision API: calls over HTTP (evidence: `wave/app/views.py`)
- Provision API → Environment provisioner: dispatches lifecycle (evidence: `wave/api/api.py`)
- Environment provisioner → Runtime paths: uses config path (evidence: `wave/api/api.py`)
- Environment provisioner → Docker / Mininet: starts or stops (evidence: `wave/api/provision.py`)
- Environment provisioner → Topology scripts: runs topology scripts (evidence: `wave/api/provision.py`)
- Environment provisioner → Sinusoid workload: dispatches profile (evidence: `wave/api/provision.py`)
- Environment provisioner → Flashcrowd workload: dispatches profile (evidence: `wave/api/provision.py`)
- Environment provisioner → Stair-step workload: dispatches profile (evidence: `wave/api/provision.py`)
- Environment provisioner → Microburst workload: dispatches workload (evidence: `wave/api/provision.py`)
- Provision API → Grafana API key: creates key (evidence: `wave/api/api.py`)
- Provision API → Grafana data sources: creates sources (evidence: `wave/api/api.py`)
- Provision API → Dashboard setup: creates dashboard (evidence: `wave/api/api.py`)
- Grafana API key → Grafana: requests API key (evidence: `wave/api/conf_grafana/generateAPIKey.py`)
- Grafana data sources → Grafana: configures sources (evidence: `wave/api/conf_grafana/createDataSources.py`)
- Dashboard setup → Grafana: publishes dashboard (evidence: `wave/api/conf_grafana/createDashboard.py`)
- Grafana data sources → Prometheus: registers metrics source
