# osnquantum/opensdnlab architecture

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

- Interactive diagram: https://gitdiagram.com/osnquantum/opensdnlab
- Repository: https://github.com/osnquantum/opensdnlab

## Overview

OpenSDNLab is an interactive IPv4/IPv6 and SDN experiment platform. Its principal workflow creates a topology from experiment configuration, turns it into an addressed and validated deployable inventory, deploys it with a selected controller, and collects network measurements. Results can be persisted and exposed through analysis APIs and dashboards. The graph also preserves documented capabilities—replay, plugins, live monitoring, and topology building—even where their implementation was not sampled; those connections are not asserted. Evidence limits reflect the supplied excerpts and SOURCE INDEX.

Main entry points: [`engine/services/experiment_pipeline.py`](https://github.com/osnquantum/opensdnlab/blob/main/engine/services/experiment_pipeline.py) (Experiment Pipeline), [`server/routes`](https://github.com/osnquantum/opensdnlab/tree/main/server/routes) (Experiment & Analysis Routes), [`engine/deployment/deployment_manager.py`](https://github.com/osnquantum/opensdnlab/blob/main/engine/deployment/deployment_manager.py) (Deployment Manager), [`server/app.py`](https://github.com/osnquantum/opensdnlab/blob/main/server/app.py) (Web API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User Experience"]
  node_web_api["Web API<br/>[app.py]"]
  node_api_routes["Experiment &amp; Analysis Routes"]
  node_dashboard["Live Dashboard"]
end

subgraph group_experiments["Experiment Workflow"]
  node_pipeline["Experiment Pipeline"]
  node_experiment_service["Experiment Service"]
  node_scenario["Scenario Generation"]
  node_blueprint["Topology Blueprint"]
  node_addressing["Address Assignment<br/>[address_manager.py]"]
  node_validation["Topology Validation"]
  node_inventory["Deployable Inventory"]
end

subgraph group_network_runtime["Network Runtime"]
  node_deployment["Deployment Manager"]
  node_mininet["Mininet Backend<br/>[mininet_backend.py]"]
  node_controllers["Controller Selection"]
  node_controller_plugins["Controller Plugins"]
end

subgraph group_observability["Monitoring &amp; Analysis"]
  node_monitoring["Monitoring Manager"]
  node_collectors["Metric Collectors"]
  node_metric_store[("Metric Repository")]
  node_analysis["Analysis &amp; Analytics"]
  node_controller_analysis["Controller Impact Analysis"]
end

subgraph group_platform["Platform Services"]
  node_experiment_store[("SQLite Experiment Store")]
  node_jobs["Experiment Job Management<br/>[job_manager.py]"]
  node_plugin_system["Plugin System<br/>[plugin_manager.py]"]
  node_adaptive["Adaptive Recovery"]
end

node_user(("Lab User"))

node_user -.->|"uses"| node_web_api
node_web_api -.->|"registers routes"| node_api_routes
node_api_routes -.->|"starts experiments"| node_pipeline
node_pipeline -->|"creates experiment"| node_experiment_service
node_pipeline -->|"builds blueprint"| node_blueprint
node_pipeline -->|"assigns addresses"| node_addressing
node_pipeline -->|"validates blueprint"| node_validation
node_pipeline -->|"builds inventory"| node_inventory
node_pipeline -->|"deploys inventory"| node_deployment
node_deployment -->|"creates controller"| node_controllers
node_deployment -->|"deploys network"| node_mininet
node_controllers -.->|"selects implementation"| node_controller_plugins
node_monitoring -->|"runs collectors"| node_collectors
node_api_routes -->|"queries runs"| node_experiment_store
node_api_routes -->|"requests analysis"| node_controller_analysis
node_controller_analysis -.->|"provides chart data"| node_dashboard
node_analysis -.->|"serves visualizations"| node_dashboard
node_collectors -.->|"records measurements"| node_metric_store
node_pipeline -.->|"uses scenarios"| node_scenario
node_pipeline -.->|"persists experiment"| node_experiment_store
node_api_routes -.->|"manages jobs"| node_jobs
node_plugin_system -.->|"enables extensions"| node_controller_plugins
node_adaptive -.->|"reacts to degradation"| node_monitoring

click node_web_api "https://github.com/osnquantum/opensdnlab/blob/main/server/app.py"
click node_api_routes "https://github.com/osnquantum/opensdnlab/tree/main/server/routes"
click node_dashboard "https://github.com/osnquantum/opensdnlab/tree/main/server/static/js"
click node_pipeline "https://github.com/osnquantum/opensdnlab/blob/main/engine/services/experiment_pipeline.py"
click node_experiment_service "https://github.com/osnquantum/opensdnlab/blob/main/engine/services/experiment_service.py"
click node_scenario "https://github.com/osnquantum/opensdnlab/tree/main/engine/scenario"
click node_blueprint "https://github.com/osnquantum/opensdnlab/blob/main/engine/network/blueprint/network_blueprint.py"
click node_addressing "https://github.com/osnquantum/opensdnlab/blob/main/engine/network/managers/address_manager.py"
click node_validation "https://github.com/osnquantum/opensdnlab/blob/main/engine/network/validators/blueprint_validator.py"
click node_inventory "https://github.com/osnquantum/opensdnlab/blob/main/engine/network/inventory/inventory_manager.py"
click node_deployment "https://github.com/osnquantum/opensdnlab/blob/main/engine/deployment/deployment_manager.py"
click node_mininet "https://github.com/osnquantum/opensdnlab/blob/main/engine/deployment/backends/mininet_backend.py"
click node_controllers "https://github.com/osnquantum/opensdnlab/blob/main/engine/controllers/controller_manager.py"
click node_controller_plugins "https://github.com/osnquantum/opensdnlab/tree/main/engine/controllers/plugins"
click node_monitoring "https://github.com/osnquantum/opensdnlab/blob/main/engine/monitoring/monitoring_manager.py"
click node_collectors "https://github.com/osnquantum/opensdnlab/tree/main/engine/monitoring/collectors"
click node_metric_store "https://github.com/osnquantum/opensdnlab/blob/main/engine/metrics/metric_repository.py"
click node_analysis "https://github.com/osnquantum/opensdnlab/tree/main/engine/analysis"
click node_controller_analysis "https://github.com/osnquantum/opensdnlab/blob/main/server/services/controller_analysis_service.py"
click node_experiment_store "https://github.com/osnquantum/opensdnlab/blob/main/engine/repository/sqlite/sqlite_repository.py"
click node_jobs "https://github.com/osnquantum/opensdnlab/blob/main/engine/jobs/job_manager.py"
click node_plugin_system "https://github.com/osnquantum/opensdnlab/blob/main/engine/core/plugin_manager.py"
click node_adaptive "https://github.com/osnquantum/opensdnlab/tree/main/engine/adaptive"

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_web_api,node_api_routes,node_dashboard,node_user toneBlue
class node_pipeline,node_experiment_service,node_scenario,node_blueprint,node_addressing,node_validation,node_inventory toneAmber
class node_deployment,node_mininet,node_controllers,node_controller_plugins toneMint
class node_monitoring,node_collectors,node_metric_store,node_analysis,node_controller_analysis toneRose
class node_experiment_store,node_jobs,node_plugin_system,node_adaptive toneIndigo
```

## Components

### User Experience

- [Web API](https://github.com/osnquantum/opensdnlab/blob/main/server/app.py): `server/app.py`
- [Experiment & Analysis Routes](https://github.com/osnquantum/opensdnlab/tree/main/server/routes): `server/routes`
- [Live Dashboard](https://github.com/osnquantum/opensdnlab/tree/main/server/static/js): `server/static/js`

### Experiment Workflow

- [Experiment Pipeline](https://github.com/osnquantum/opensdnlab/blob/main/engine/services/experiment_pipeline.py): `engine/services/experiment_pipeline.py`
- [Experiment Service](https://github.com/osnquantum/opensdnlab/blob/main/engine/services/experiment_service.py): `engine/services/experiment_service.py`
- [Scenario Generation](https://github.com/osnquantum/opensdnlab/tree/main/engine/scenario): `engine/scenario`
- [Topology Blueprint](https://github.com/osnquantum/opensdnlab/blob/main/engine/network/blueprint/network_blueprint.py): `engine/network/blueprint/network_blueprint.py`
- [Address Assignment](https://github.com/osnquantum/opensdnlab/blob/main/engine/network/managers/address_manager.py): `engine/network/managers/address_manager.py`
- [Topology Validation](https://github.com/osnquantum/opensdnlab/blob/main/engine/network/validators/blueprint_validator.py): `engine/network/validators/blueprint_validator.py`
- [Deployable Inventory](https://github.com/osnquantum/opensdnlab/blob/main/engine/network/inventory/inventory_manager.py): `engine/network/inventory/inventory_manager.py`

### Network Runtime

- [Deployment Manager](https://github.com/osnquantum/opensdnlab/blob/main/engine/deployment/deployment_manager.py): `engine/deployment/deployment_manager.py`
- [Mininet Backend](https://github.com/osnquantum/opensdnlab/blob/main/engine/deployment/backends/mininet_backend.py): `engine/deployment/backends/mininet_backend.py`
- [Controller Selection](https://github.com/osnquantum/opensdnlab/blob/main/engine/controllers/controller_manager.py): `engine/controllers/controller_manager.py`
- [Controller Plugins](https://github.com/osnquantum/opensdnlab/tree/main/engine/controllers/plugins): `engine/controllers/plugins`

### Monitoring & Analysis

- [Monitoring Manager](https://github.com/osnquantum/opensdnlab/blob/main/engine/monitoring/monitoring_manager.py): `engine/monitoring/monitoring_manager.py`
- [Metric Collectors](https://github.com/osnquantum/opensdnlab/tree/main/engine/monitoring/collectors): `engine/monitoring/collectors`
- [Metric Repository](https://github.com/osnquantum/opensdnlab/blob/main/engine/metrics/metric_repository.py): `engine/metrics/metric_repository.py`
- [Analysis & Analytics](https://github.com/osnquantum/opensdnlab/tree/main/engine/analysis): `engine/analysis`
- [Controller Impact Analysis](https://github.com/osnquantum/opensdnlab/blob/main/server/services/controller_analysis_service.py): `server/services/controller_analysis_service.py`

### Platform Services

- [SQLite Experiment Store](https://github.com/osnquantum/opensdnlab/blob/main/engine/repository/sqlite/sqlite_repository.py): `engine/repository/sqlite/sqlite_repository.py`
- [Experiment Job Management](https://github.com/osnquantum/opensdnlab/blob/main/engine/jobs/job_manager.py): `engine/jobs/job_manager.py`
- [Plugin System](https://github.com/osnquantum/opensdnlab/blob/main/engine/core/plugin_manager.py): `engine/core/plugin_manager.py`
- [Adaptive Recovery](https://github.com/osnquantum/opensdnlab/tree/main/engine/adaptive): `engine/adaptive`

### Other components

- **Lab User**

## Connections

- Lab User → Web API: uses
- Web API → Experiment & Analysis Routes: registers routes
- Experiment & Analysis Routes → Experiment Pipeline: starts experiments
- Experiment Pipeline → Experiment Service: creates experiment (evidence: `engine/services/experiment_pipeline.py`)
- Experiment Pipeline → Topology Blueprint: builds blueprint (evidence: `engine/services/experiment_pipeline.py`)
- Experiment Pipeline → Address Assignment: assigns addresses (evidence: `engine/services/experiment_pipeline.py`)
- Experiment Pipeline → Topology Validation: validates blueprint (evidence: `engine/services/experiment_pipeline.py`)
- Experiment Pipeline → Deployable Inventory: builds inventory (evidence: `engine/services/experiment_pipeline.py`)
- Experiment Pipeline → Deployment Manager: deploys inventory (evidence: `engine/services/experiment_pipeline.py`)
- Deployment Manager → Controller Selection: creates controller (evidence: `engine/deployment/deployment_manager.py`)
- Deployment Manager → Mininet Backend: deploys network (evidence: `engine/deployment/deployment_manager.py`)
- Controller Selection → Controller Plugins: selects implementation
- Monitoring Manager → Metric Collectors: runs collectors (evidence: `engine/monitoring/monitoring_manager.py`)
- Experiment & Analysis Routes → SQLite Experiment Store: queries runs (evidence: `server/routes/controller_analysis.py`)
- Experiment & Analysis Routes → Controller Impact Analysis: requests analysis (evidence: `server/routes/controller_analysis.py`)
- Controller Impact Analysis → Live Dashboard: provides chart data
- Analysis & Analytics → Live Dashboard: serves visualizations
- Metric Collectors → Metric Repository: records measurements
- Experiment Pipeline → Scenario Generation: uses scenarios
- Experiment Pipeline → SQLite Experiment Store: persists experiment
- Experiment & Analysis Routes → Experiment Job Management: manages jobs
- Plugin System → Controller Plugins: enables extensions
- Adaptive Recovery → Monitoring Manager: reacts to degradation
