# openingenium/execution_server architecture

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

- Interactive diagram: https://gitdiagram.com/openingenium/execution_server
- Repository: https://github.com/openingenium/execution_server

## Overview

Ingenium Execution Server is a Tornado REST service for running procedure steps against test venues. The main workflow is platform clients registering an execution, submitting a typed step, and retrieving execution state/results; execution work is assigned to persistent worker processes, with Redis preserving request-spanning state. Step implementations cover commanding, telemetry/EVR queries and verification, and operator input. The README documents authentication, logging, and additional lifecycle operations. Some step modules are unsampled, so their internal call relationships are not inferred.

Main entry points: [`image/execution_server.py`](https://github.com/openingenium/execution_server/blob/main/image/execution_server.py) (Worker pool), [`image/ingenium_embedded/ingenium_library.py`](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/ingenium_library.py) (Venue and step library), [`image/ingenium_embedded/cmd_step.py`](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/cmd_step.py) (Command steps), [`image/ingenium_embedded/bus_1553_step.py`](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/bus_1553_step.py) (1553 bus steps)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API and execution"]
  node_http["REST handlers"]
  node_workers["Worker pool"]
end

subgraph group_state["Runtime state"]
  node_state_manager["Execution state<br/>[state_manager.py]"]
  node_redis[("Redis")]
end

subgraph group_steps["Procedure steps"]
  node_verification["Verification logic"]
  node_commands["Command steps<br/>[cmd_step.py]"]
  node_command_files["Command file steps<br/>[cmd_file_step.py]"]
  node_bus["1553 bus steps<br/>[bus_1553_step.py]"]
  node_custom["Custom scripts"]
  node_query_evr["EVR queries<br/>[query_evr_step.py]"]
  node_wait_evr["EVR waits<br/>[wait_evr_step.py]"]
  node_list_dp["Data product listing"]
  node_wait_dp["Data product waits"]
  node_manual_eip["EIP input<br/>[manual_eip_step.py]"]
  node_other_steps["Other step types"]
end

subgraph group_shared["Shared services"]
  node_config["Runtime configuration<br/>[ingenium_config.py]"]
  node_library["Venue and step library"]
  node_json_logging["JSON logging<br/>[json_log_config.py]"]
  node_logging["Logging utility<br/>[logging_util.py]"]
end

node_client(("Ingenium platform"))
node_venue{{"Test venue services"}}

node_client -->|"calls REST API"| node_http
node_http -->|"submits steps"| node_workers
node_http -->|"reads and updates"| node_state_manager
node_state_manager -->|"reads and writes"| node_redis
node_workers -.->|"dispatches step"| node_commands
node_workers -.->|"dispatches step"| node_command_files
node_workers -.->|"dispatches step"| node_bus
node_workers -.->|"dispatches step"| node_custom
node_workers -.->|"dispatches step"| node_query_evr
node_workers -.->|"dispatches step"| node_wait_evr
node_workers -.->|"dispatches step"| node_list_dp
node_workers -.->|"dispatches step"| node_wait_dp
node_workers -.->|"dispatches step"| node_manual_eip
node_workers -.->|"dispatches step"| node_other_steps
node_http -->|"configures runtime"| node_config
node_http -->|"uses shared library"| node_library
node_commands -->|"calls shared functions"| node_library
node_commands -->|"uses verification"| node_verification
node_bus -->|"calls shared functions"| node_library
node_bus -->|"uses verification"| node_verification
node_custom -->|"calls shared functions"| node_library
node_query_evr -->|"queries EVRs"| node_library
node_query_evr -->|"verifies results"| node_verification
node_wait_evr -->|"queries EVRs"| node_library
node_logging -->|"initializes logger"| node_json_logging
node_logging -->|"reads log level"| node_config
node_library -->|"calls venue API"| node_venue

click node_http "https://github.com/openingenium/execution_server/blob/main/image/execution_server.py"
click node_workers "https://github.com/openingenium/execution_server/blob/main/image/execution_server.py"
click node_state_manager "https://github.com/openingenium/execution_server/blob/main/image/state_manager.py"
click node_config "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/ingenium_config.py"
click node_library "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/ingenium_library.py"
click node_verification "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/verification_lib.py"
click node_commands "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/cmd_step.py"
click node_command_files "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/cmd_file_step.py"
click node_bus "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/bus_1553_step.py"
click node_custom "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/custom_script_step.py"
click node_query_evr "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/query_evr_step.py"
click node_wait_evr "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/wait_evr_step.py"
click node_list_dp "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/list_data_products_step.py"
click node_wait_dp "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/wait_data_products_step.py"
click node_manual_eip "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/manual_eip_step.py"
click node_other_steps "https://github.com/openingenium/execution_server/tree/main/image/ingenium_embedded"
click node_json_logging "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/json_log_config.py"
click node_logging "https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/logging_util.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_http,node_workers toneBlue
class node_state_manager,node_redis toneAmber
class node_verification,node_commands,node_command_files,node_bus,node_custom,node_query_evr,node_wait_evr,node_list_dp,node_wait_dp,node_manual_eip,node_other_steps toneMint
class node_config,node_library,node_json_logging,node_logging toneRose
class node_client,node_venue toneIndigo
```

## Components

### API and execution

- [REST handlers](https://github.com/openingenium/execution_server/blob/main/image/execution_server.py): `image/execution_server.py`
- [Worker pool](https://github.com/openingenium/execution_server/blob/main/image/execution_server.py): `image/execution_server.py`

### Runtime state

- [Execution state](https://github.com/openingenium/execution_server/blob/main/image/state_manager.py): `image/state_manager.py`
- **Redis**

### Procedure steps

- [Verification logic](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/verification_lib.py): `image/ingenium_embedded/verification_lib.py`
- [Command steps](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/cmd_step.py): `image/ingenium_embedded/cmd_step.py`
- [Command file steps](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/cmd_file_step.py): `image/ingenium_embedded/cmd_file_step.py`
- [1553 bus steps](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/bus_1553_step.py): `image/ingenium_embedded/bus_1553_step.py`
- [Custom scripts](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/custom_script_step.py): `image/ingenium_embedded/custom_script_step.py`
- [EVR queries](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/query_evr_step.py): `image/ingenium_embedded/query_evr_step.py`
- [EVR waits](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/wait_evr_step.py): `image/ingenium_embedded/wait_evr_step.py`
- [Data product listing](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/list_data_products_step.py): `image/ingenium_embedded/list_data_products_step.py`
- [Data product waits](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/wait_data_products_step.py): `image/ingenium_embedded/wait_data_products_step.py`
- [EIP input](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/manual_eip_step.py): `image/ingenium_embedded/manual_eip_step.py`
- [Other step types](https://github.com/openingenium/execution_server/tree/main/image/ingenium_embedded): `image/ingenium_embedded`

### Shared services

- [Runtime configuration](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/ingenium_config.py): `image/ingenium_embedded/ingenium_config.py`
- [Venue and step library](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/ingenium_library.py): `image/ingenium_embedded/ingenium_library.py`
- [JSON logging](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/json_log_config.py): `image/ingenium_embedded/json_log_config.py`
- [Logging utility](https://github.com/openingenium/execution_server/blob/main/image/ingenium_embedded/logging_util.py): `image/ingenium_embedded/logging_util.py`

### Other components

- **Ingenium platform**
- **Test venue services**

## Connections

- Ingenium platform → REST handlers: calls REST API (evidence: `README.md`)
- REST handlers → Worker pool: submits steps (evidence: `README.md`)
- REST handlers → Execution state: reads and updates (evidence: `image/execution_server.py`)
- Execution state → Redis: reads and writes (evidence: `image/state_manager.py`)
- Worker pool → Command steps: dispatches step
- Worker pool → Command file steps: dispatches step
- Worker pool → 1553 bus steps: dispatches step
- Worker pool → Custom scripts: dispatches step
- Worker pool → EVR queries: dispatches step
- Worker pool → EVR waits: dispatches step
- Worker pool → Data product listing: dispatches step
- Worker pool → Data product waits: dispatches step
- Worker pool → EIP input: dispatches step
- Worker pool → Other step types: dispatches step (evidence: `image/execution_server.py`)
- REST handlers → Runtime configuration: configures runtime (evidence: `image/execution_server.py`)
- REST handlers → Venue and step library: uses shared library (evidence: `image/execution_server.py`)
- Command steps → Venue and step library: calls shared functions (evidence: `image/ingenium_embedded/cmd_step.py`)
- Command steps → Verification logic: uses verification (evidence: `image/ingenium_embedded/cmd_step.py`)
- 1553 bus steps → Venue and step library: calls shared functions (evidence: `image/ingenium_embedded/bus_1553_step.py`)
- 1553 bus steps → Verification logic: uses verification (evidence: `image/ingenium_embedded/bus_1553_step.py`)
- Custom scripts → Venue and step library: calls shared functions (evidence: `image/ingenium_embedded/custom_script_step.py`)
- EVR queries → Venue and step library: queries EVRs (evidence: `image/ingenium_embedded/query_evr_step.py`)
- EVR queries → Verification logic: verifies results (evidence: `image/ingenium_embedded/query_evr_step.py`)
- EVR waits → Venue and step library: queries EVRs (evidence: `image/ingenium_embedded/wait_evr_step.py`)
- Logging utility → JSON logging: initializes logger (evidence: `image/ingenium_embedded/logging_util.py`)
- Logging utility → Runtime configuration: reads log level (evidence: `image/ingenium_embedded/logging_util.py`)
- Venue and step library → Test venue services: calls venue API (evidence: `image/ingenium_embedded/ingenium_library.py`)
