# ibm/digital-twin-benchmark-model architecture

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

- Interactive diagram: https://gitdiagram.com/ibm/digital-twin-benchmark-model
- Repository: https://github.com/ibm/digital-twin-benchmark-model

## Overview

DTBM is a collection of scripts for benchmarking digital-twin knowledge graphs and comparing them with LUBM and BSBM across graph backends. The main workflow is to choose a benchmark and backend, run the backend-specific scripts (which configure containers and execute tests), then collect benchmark results. DTBM model generation and the KITT-specific RDF import and BSBM query tools are distinct parts of that workflow. Backend script internals were not sampled, so those links are based on README statements rather than inspected calls.

Main entry points: [`graphdb/lubm_graphdb.sh`](https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/lubm_graphdb.sh) (LUBM runner), [`graphdb`](https://github.com/ibm/digital-twin-benchmark-model/tree/main/graphdb) (GraphDB scripts), [`kitt`](https://github.com/ibm/digital-twin-benchmark-model/tree/main/kitt) (KITT scripts), [`graphdb/factory_graphdb.sh`](https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/factory_graphdb.sh) (DTBM runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_benchmarks["Benchmark workloads"]
  node_dtbm["DTBM model"]
  node_lubm["LUBM workload<br/>[LUBM_Benchmark.py]"]
  node_bsbm["BSBM queries<br/>[bsbm_exp.py]"]
end

subgraph group_runners["Benchmark runners"]
  node_dt_runner["DTBM runner<br/>[factory_graphdb.sh]"]
  node_lubm_runner["LUBM runner<br/>[lubm_graphdb.sh]"]
  node_bsbm_runner["BSBM runner<br/>[bsbm_graphdb.sh]"]
  node_lubm_exec["LUBM query executor<br/>[LUBM_Benchmark.py]"]
  node_lubm_fix["LUBM RDF cleanup<br/>[fix_lubm.py]"]
end

subgraph group_backends["Graph backends"]
  node_blazegraph["Blazegraph scripts"]
  node_graphdb["GraphDB scripts"]
  node_virtuoso["Virtuoso scripts"]
  node_neo4j["Neo4j scripts"]
  node_kitt["KITT scripts"]
end

subgraph group_kitttools["KITT tools"]
  node_kitt_lubm["KITT LUBM runner<br/>[LUBM_Benchmark.py]"]
  node_kitt_import["RDF importer<br/>[import_rdf.py]"]
  node_kitt_lubm_import["LUBM RDF importer<br/>[import_lubm_rdf.py]"]
end

node_user(("Benchmark user"))
node_store[("Graph backend")]
node_results["Benchmark results"]

node_user -->|"runs DTBM"| node_dt_runner
node_user -->|"runs LUBM"| node_lubm_runner
node_user -->|"runs BSBM"| node_bsbm_runner
node_dt_runner -->|"generates model"| node_dtbm
node_dt_runner -->|"configures backend"| node_graphdb
node_lubm_runner -->|"executes workload"| node_lubm
node_lubm_runner -->|"configures backend"| node_graphdb
node_bsbm_runner -->|"configures backend"| node_graphdb
node_lubm_exec -->|"writes timings"| node_results
node_lubm_exec -->|"queries endpoint"| node_store
node_lubm_fix -.->|"prepares RDF"| node_lubm_runner
node_blazegraph -.->|"runs backend"| node_store
node_graphdb -.->|"runs backend"| node_store
node_virtuoso -.->|"runs backend"| node_store
node_neo4j -.->|"runs backend"| node_store
node_kitt -.->|"runs backend"| node_store
node_kitt -.->|"runs LUBM"| node_kitt_lubm
node_kitt -.->|"runs queries"| node_bsbm
node_kitt_import -->|"uploads RDF"| node_store
node_kitt_lubm_import -->|"uploads RDF"| node_store
node_kitt_lubm -->|"posts queries"| node_store
node_kitt_lubm -->|"writes timings"| node_results

click node_dtbm "https://github.com/ibm/digital-twin-benchmark-model/blob/main/dt_model_generator.py"
click node_lubm "https://github.com/ibm/digital-twin-benchmark-model/blob/main/LUBM_Benchmark.py"
click node_bsbm "https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/bsbm_exp.py"
click node_dt_runner "https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/factory_graphdb.sh"
click node_lubm_runner "https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/lubm_graphdb.sh"
click node_bsbm_runner "https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/bsbm_graphdb.sh"
click node_lubm_exec "https://github.com/ibm/digital-twin-benchmark-model/blob/main/LUBM_Benchmark.py"
click node_lubm_fix "https://github.com/ibm/digital-twin-benchmark-model/blob/main/fix_lubm.py"
click node_blazegraph "https://github.com/ibm/digital-twin-benchmark-model/tree/main/blazegraph"
click node_graphdb "https://github.com/ibm/digital-twin-benchmark-model/tree/main/graphdb"
click node_virtuoso "https://github.com/ibm/digital-twin-benchmark-model/tree/main/virtuoso"
click node_neo4j "https://github.com/ibm/digital-twin-benchmark-model/tree/main/neo4j"
click node_kitt "https://github.com/ibm/digital-twin-benchmark-model/tree/main/kitt"
click node_kitt_lubm "https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/LUBM_Benchmark.py"
click node_kitt_import "https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/import_rdf.py"
click node_kitt_lubm_import "https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/import_lubm_rdf.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_dtbm,node_lubm,node_bsbm,node_user toneBlue
class node_dt_runner,node_lubm_runner,node_bsbm_runner,node_lubm_exec,node_lubm_fix,node_store toneAmber
class node_blazegraph,node_graphdb,node_virtuoso,node_neo4j,node_kitt toneMint
class node_kitt_lubm,node_kitt_import,node_kitt_lubm_import toneRose
class node_results toneIndigo
```

## Components

### Benchmark workloads

- [DTBM model](https://github.com/ibm/digital-twin-benchmark-model/blob/main/dt_model_generator.py): `dt_model_generator.py`
- [LUBM workload](https://github.com/ibm/digital-twin-benchmark-model/blob/main/LUBM_Benchmark.py): `LUBM_Benchmark.py`
- [BSBM queries](https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/bsbm_exp.py): `kitt/bsbm_exp.py`

### Benchmark runners

- [DTBM runner](https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/factory_graphdb.sh): `graphdb/factory_graphdb.sh`
- [LUBM runner](https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/lubm_graphdb.sh): `graphdb/lubm_graphdb.sh`
- [BSBM runner](https://github.com/ibm/digital-twin-benchmark-model/blob/main/graphdb/bsbm_graphdb.sh): `graphdb/bsbm_graphdb.sh`
- [LUBM query executor](https://github.com/ibm/digital-twin-benchmark-model/blob/main/LUBM_Benchmark.py): `LUBM_Benchmark.py`
- [LUBM RDF cleanup](https://github.com/ibm/digital-twin-benchmark-model/blob/main/fix_lubm.py): `fix_lubm.py`

### Graph backends

- [Blazegraph scripts](https://github.com/ibm/digital-twin-benchmark-model/tree/main/blazegraph): `blazegraph`
- [GraphDB scripts](https://github.com/ibm/digital-twin-benchmark-model/tree/main/graphdb): `graphdb`
- [Virtuoso scripts](https://github.com/ibm/digital-twin-benchmark-model/tree/main/virtuoso): `virtuoso`
- [Neo4j scripts](https://github.com/ibm/digital-twin-benchmark-model/tree/main/neo4j): `neo4j`
- [KITT scripts](https://github.com/ibm/digital-twin-benchmark-model/tree/main/kitt): `kitt`

### KITT tools

- [KITT LUBM runner](https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/LUBM_Benchmark.py): `kitt/LUBM_Benchmark.py`
- [RDF importer](https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/import_rdf.py): `kitt/import_rdf.py`
- [LUBM RDF importer](https://github.com/ibm/digital-twin-benchmark-model/blob/main/kitt/import_lubm_rdf.py): `kitt/import_lubm_rdf.py`

### Other components

- **Benchmark user**
- **Graph backend**
- **Benchmark results**

## Connections

- Benchmark user → DTBM runner: runs DTBM (evidence: `README.md`)
- Benchmark user → LUBM runner: runs LUBM (evidence: `README.md`)
- Benchmark user → BSBM runner: runs BSBM (evidence: `README.md`)
- DTBM runner → DTBM model: generates model (evidence: `README.md`)
- DTBM runner → GraphDB scripts: configures backend (evidence: `README.md`)
- LUBM runner → LUBM workload: executes workload (evidence: `README.md`)
- LUBM runner → GraphDB scripts: configures backend (evidence: `README.md`)
- BSBM runner → GraphDB scripts: configures backend (evidence: `README.md`)
- LUBM query executor → Benchmark results: writes timings (evidence: `LUBM_Benchmark.py`)
- LUBM query executor → Graph backend: queries endpoint (evidence: `LUBM_Benchmark.py`)
- LUBM RDF cleanup → LUBM runner: prepares RDF
- Blazegraph scripts → Graph backend: runs backend
- GraphDB scripts → Graph backend: runs backend
- Virtuoso scripts → Graph backend: runs backend
- Neo4j scripts → Graph backend: runs backend
- KITT scripts → Graph backend: runs backend
- KITT scripts → KITT LUBM runner: runs LUBM
- KITT scripts → BSBM queries: runs queries
- RDF importer → Graph backend: uploads RDF (evidence: `kitt/import_rdf.py`)
- LUBM RDF importer → Graph backend: uploads RDF (evidence: `kitt/import_lubm_rdf.py`)
- KITT LUBM runner → Graph backend: posts queries (evidence: `kitt/LUBM_Benchmark.py`)
- KITT LUBM runner → Benchmark results: writes timings (evidence: `kitt/LUBM_Benchmark.py`)
