Architecture

Architecture Diagrams

Visual maps of Spectra's runtime, rendering pipeline, IPC, and live data topics — embedded across the docs.

Runtime & IPC

How clients connect to spectra-backend, spawn window agents, and choose in-process vs multi-process mode.

Multiproc Architecture

Clients encode IPC messages; the backend daemon owns FigureModel and SessionGraph, then routes work to Vulkan window agents.

Spectra multiproc architecture

Python IPC Sequence

Session lifecycle from socket connect through figure creation, series append, state diff fan-out, and GPU frame render.

Python IPC sequence diagram

Runtime Modes

SPECTRA_RUNTIME_MODE selects in-process build/spectra or the default multiproc backend + agent topology.

Spectra runtime mode selection

Inproc Topology

Single-process build/spectra — UI, plot state, and Vulkan in one binary.

Core Model & Rendering

The object hierarchy from App down to series types, and the GPU path from state change to Vulkan draw calls.

Data Model Hierarchy

App → Figure → Axes / Axes3D → Series — the stable public object graph mirrored by Python proxies over IPC.

Data model hierarchy

Render Pipeline

State mutations become draw lists; RenderUpload stages CPU data while SPIR-V shaders and ImGuiIntegration share the swapchain pass.

Render pipeline

Adapters & Extensions

ROS2, PX4, Qt embedding, headless export, plugins, and the experimental WebGPU path.

ROS2 Data Path

Background executor introspects messages; SPSC rings decouple the render thread.

ROS2 data path

PX4 Workflows

Offline ULog browsing and live MAVLink telemetry share one plot stack.

PX4 workflows

Qt Embed

QtRuntime owns Vulkan init; the Qt event loop drives frames.

Qt embed integration

Plugin Extension Points

spectra_plugin_init registers commands, transforms, overlays, and more.

Plugin extension points

Easy Embed

One-liner offscreen render — no window, no daemon, pixels out.

Easy embed headless path

WebGPU Dual Runtime

Same C++ core; experimental 2D path via Dawn or browser WebGPU.

WebGPU dual runtime

Live Data Topics

ROS-style named streams published into the backend and plotted on demand from any window.