Crosscutting concepts

arc42 §8.

These concepts cut across building blocks and runtime scenarios.

Architecture View: Codec — compile-time generic ARCH_0030
status: open
refines: ADR_0005, BB_0003

Every connector instance is parameterised on its PayloadCodec. Concrete connector types are MqttConnector<JsonCodec>, MqttConnector<MsgPackCodec> (when feature-enabled), etc. The codec is invoked inside Publisher::loan so encoded bytes land directly in shared memory; on the receive side, decode runs over the borrowed payload slice. There is no intermediate serialised buffer.

Architecture View: Error handling — single error type, explicit origins ARCH_0031
status: open
refines: REQ_0213, REQ_0214

ConnectorError is the framework’s single error type. Each variant has exactly one origin point in the framework; routing of variants to user-visible vs. observable surfaces is explicit:

Class

Originates in

Propagates as

Surfaces to user as

Transport

taktora-connector-transport-iox

Result from send / try_recv

Err from the call

Codec

taktora-connector-codec

Result from encode / decode

Err from send (encode) or try_recv (decode)

Routing

gateway, on inbound topic miss

HealthEvent::RoutingError

observable; gateway never aborts

PayloadOverflow

ChannelWriter::send pre-loan check

Err from send

typed; user resizes channel or splits payload

Stack

tokio task in gateway

HealthEvent::StackError + Down; triggers reconnect

observable; recovers via ReconnectPolicy

BackPressure

bridge try_send failure

Err from send + Degraded

typed; caller retries or drops

Down

ChannelWriter::send pre-check

Err from send

typed; caller decides drop vs. retry

Shutdown

host shutdown signal

Err from any in-flight op

unique variant — caller treats as graceful end

No silent failures: every error class is either returned to the user or emitted as a HealthEvent.

Architecture View: Observability — Observer + ExecutionMonitor adapter ARCH_0032
status: open
refines: REQ_0273, BB_0005

The gateway is a taktora-executor consumer (Plugin and gateway are both... (ADR_0007)), so Observer::on_app_* and ExecutionMonitor::pre_execute / post_execute hooks already cover the gateway items. HealthEvent arrives on a dedicated taktora-executor Channel<HealthEvent> exposed by Connector::subscribe_health. Behind a tracing cargo feature, taktora-connector-host provides an adapter that maps both into tracing span events so a single RUST_LOG=... config controls the full stack.

Architecture View: Back-pressure — explicit at every bounded buffer ARCH_0033
status: open
refines: REQ_0260, REQ_0261

Four bounded buffers participate; saturation surfaces explicitly at each. The framework never silently drops outbound user messages; inbound is protocol-bounded — drops are reported via HealthEvent::DroppedInbound rather than pretended-prevented.

        flowchart LR
  U[user code] -->|send| W[ChannelWriter]
  W -->|loan/publish| SHM["iceoryx2 SHM<br/>(bounded queue)"]
  SHM -->|wakes| GI[GatewayItem]
  GI -->|try_send| BR1["Tokio bridge OUT<br/>(bounded mpsc)"]
  BR1 --> TT[Tokio task]
  TT -->|publish| B[Broker]
  B -->|publish| TT
  TT -->|send| BR2["Tokio bridge IN<br/>(bounded crossbeam)"]
  BR2 -->|wakes| GI2[InboundGatewayItem]
  GI2 -->|loan/publish| SHM2["iceoryx2 SHM<br/>(bounded queue)"]
  SHM2 --> R[ChannelReader]
    

Cross-cutting traceability

Used filter: types(building-block)

ID

Title

Status

Implements

BB_0001

taktora-connector-core

open

REQ_0220; REQ_0221; REQ_0222

BB_0002

taktora-connector-transport-iox

open

REQ_0200; REQ_0205; REQ_0206

BB_0003

taktora-connector-codec

open

REQ_0210; REQ_0212

BB_0004

taktora-connector-mqtt

open

REQ_0250; REQ_0251; REQ_0258

BB_0005

taktora-connector-host

open

REQ_0270; REQ_0271; REQ_0272

BB_0010

ConnectorEnvelope (sub-block of BB_0002)

open

REQ_0200; REQ_0201; REQ_0202; REQ_0203; REQ_0204

BB_0011

ServiceFactory (sub-block of BB_0002)

open

REQ_0206

BB_0020

MqttConnector (sub-block of BB_0004, plugin side)

open

REQ_0250; REQ_0251

BB_0021

MqttGateway (sub-block of BB_0004, gateway side)

open

REQ_0258; REQ_0259; REQ_0260; REQ_0261

BB_0022

Tokio bridge (sub-block of BB_0021)

open

REQ_0259; REQ_0260; REQ_0261

BB_0023

Dispatch scratch (pre-allocated)

open

REQ_0060

BB_0024

taktora-bounded-alloc crate

open

REQ_0300; REQ_0301; REQ_0302; REQ_0303; REQ_0304

BB_0025

Cyclic scan trigger and dispatch

implemented

FEAT_0011

BB_0026

Iceoryx2 channel surface (Channel / Publisher / Subscriber)

implemented

FEAT_0012

BB_0027

Chain and DAG sequencing primitives

implemented

FEAT_0013

BB_0028

Deadline trigger and timing monitor

implemented

FEAT_0014

BB_0029

ThreadAttributes (worker affinity and priority)

implemented

FEAT_0015

BB_0030

taktora-connector-ethercat

open

REQ_0310; REQ_0311; REQ_0312; REQ_0321

BB_0031

EthercatConnector (sub-block of BB_0030, plugin side)

open

REQ_0310; REQ_0311

BB_0032

EthercatGateway (sub-block of BB_0030, gateway side)

open

REQ_0312; REQ_0313; REQ_0325

BB_0033

PDO mapping (sub-block of BB_0030)

open

REQ_0314; REQ_0315

BB_0034

Tokio bridge for ethercrab (sub-block of BB_0030)

open

REQ_0322; REQ_0323; REQ_0324

BB_0035

Cooperative shutdown (Stoppable + WaitSet stop wakeup)

implemented

FEAT_0016

BB_0040

taktora-connector-zenoh

open

REQ_0400; REQ_0420; REQ_0440; REQ_0444

BB_0041

ZenohConnector (sub-block of BB_0040, plugin side)

open

REQ_0400; REQ_0401; REQ_0420

BB_0042

ZenohGateway (sub-block of BB_0040, gateway side)

open

REQ_0403; REQ_0426; REQ_0440; REQ_0442

BB_0043

Zenoh query handles (sub-block of BB_0041)

open

REQ_0420; REQ_0421; REQ_0422; REQ_0423; REQ_0424

BB_0044

Tokio bridge for zenoh (sub-block of BB_0042)

open

REQ_0403; REQ_0404; REQ_0405; REQ_0406

BB_0050

Per-task cycle statistics

open

REQ_0100; REQ_0105; REQ_0106

BB_0051

Statistics snapshot view

open

REQ_0103; REQ_0105; REQ_0106

BB_0052

xtask-preempt-rt harness

open

REQ_0111

BB_0053

taktora-stats crate

open

REQ_0104; REQ_0105

BB_0054

Connector cycle telemetry

open

REQ_0262; REQ_0263; REQ_0264; REQ_0265; REQ_0266; REQ_0267

BB_0060

ethercat-esi (parser crate)

open

FEAT_0051

BB_0061

ethercat-esi-codegen (IR + backend trait)

open

FEAT_0052

BB_0062

ethercat-esi-codegen-ethercrab (concrete backend)

open

FEAT_0053

BB_0063

ethercat-esi-rt (runtime trait crate)

open

FEAT_0054

BB_0064

ethercat-esi-build (build.rs glue)

open

FEAT_0055

BB_0065

ethercat-esi-cli (cargo subcommand)

open

FEAT_0056

BB_0066

ethercat-esi-verify (EEPROM diff tool)

open

FEAT_0057

BB_0067

taktora-connector-ethercat EsiDevice adapter

open

FEAT_0050

BB_0070

taktora-connector-can crate

open

REQ_0600; REQ_0602; REQ_0603; REQ_0604; REQ_0605

BB_0071

CanConnector (sub-block of BB_0070, plugin side)

open

REQ_0600; REQ_0601; REQ_0612; REQ_0615; REQ_0621

BB_0072

CanGateway (sub-block of BB_0070, gateway side)

open

REQ_0613; REQ_0614; REQ_0620; REQ_0624; REQ_0625; REQ_0630; REQ_0631

BB_0073

Tokio bridge for CAN (sub-block of BB_0072)

open

REQ_0605; REQ_0606; REQ_0607; REQ_0608

BB_0074

Per-iface filter compiler (sub-block of BB_0072)

open

REQ_0622; REQ_0623; REQ_0624

BB_0075

MockCanInterface (sub-block of BB_0070)

open

REQ_0604

BB_0080

fieldbus-od-core

open

FEAT_0061

BB_0081

canopen-eds parser crate

open

FEAT_0062

BB_0082

canopen-eds-codegen

open

FEAT_0063

BB_0083

canopen-eds-codegen-taktora

open

FEAT_0064

BB_0084

canopen-eds-rt

open

FEAT_0065

BB_0085

canopen-eds-build

open

FEAT_0066

BB_0086

canopen-eds-cli

open

FEAT_0067

BB_0087

canopen-eds-verify

open

FEAT_0068

BB_0088

taktora-connector-can adapter (follow-on)

open

FEAT_0060

BB_0090

taktora-log facade crate

open

FEAT_0071

BB_0091

taktora-log-dlt DLT-backend crate

open

FEAT_0072

BB_0092

DLT daemon client (within taktora-log-dlt)

open

FEAT_0072

BB_0093

Cycle-overrun fault primitive surface

implemented

FEAT_0018

BB_0094

Framework fail-fast boundary

open

FEAT_0024

BB_0095

Absolute-grid timer and cyclic scheduling clock

implemented

REQ_0268

BB_0096

ethercat-netcfg SM-watchdog resolution and validation

open

FEAT_0085

Used filter: types(architecture)

ID

Title

Status

Refines

ARCH_0001

System context

open

FEAT_0030

ARCH_0002

Level-1 building block decomposition

open

BB_0001; BB_0002; BB_0003; BB_0004; BB_0005; BB_0030; BB_0040

ARCH_0010

Send path (app → broker)

open

REQ_0205; BB_0021; BB_0022

ARCH_0011

Receive path (broker → app)

open

REQ_0205; REQ_0254; BB_0021; BB_0022

ARCH_0012

Health and reconnect lifecycle

open

REQ_0230; REQ_0234; BB_0021

ARCH_0013

Shutdown coordination

open

REQ_0243; BB_0005; BB_0021

ARCH_0020

In-process gateway deployment

open

REQ_0240; REQ_0241

ARCH_0021

Separate-process gateway deployment

open

REQ_0240; REQ_0242

ARCH_0030

Codec — compile-time generic

open

ADR_0005; BB_0003

ARCH_0031

Error handling — single error type, explicit origins

open

REQ_0213; REQ_0214

ARCH_0032

Observability — Observer + ExecutionMonitor adapter

open

REQ_0273; BB_0005

ARCH_0033

Back-pressure — explicit at every bounded buffer

open

REQ_0260; REQ_0261

ARCH_0040

EtherCAT bus bring-up sequence

open

REQ_0313; REQ_0314; REQ_0315; BB_0032; BB_0033

ARCH_0041

Cyclic process-data exchange and working-counter health

open

REQ_0316; REQ_0317; REQ_0319; REQ_0320; BB_0032; BB_0034

ARCH_0042

Optional Distributed Clocks bring-up

open

REQ_0318; BB_0032

ARCH_0043

Zenoh query request/response flow

open

REQ_0420; REQ_0421; REQ_0423; REQ_0424; BB_0042; BB_0043

ARCH_0050

Toolchain layering (crate dependency graph)

open

FEAT_0050

ARCH_0051

Build-time vs runtime separation

open

FEAT_0050

ARCH_0052

Build-time generation flow

open

FEAT_0055

ARCH_0053

Preop bring-up flow (per device)

open

FEAT_0054

ARCH_0054

Toolchain crate placement in workspace

open

FEAT_0050

ARCH_0060

CAN frame send path (app → bus)

open

REQ_0613; REQ_0621; BB_0072; BB_0073

ARCH_0061

CAN receive path with multi-iface demux

open

REQ_0614; REQ_0620; REQ_0622; REQ_0624; BB_0072; BB_0074

ARCH_0062

CAN bus health and bus-off recovery

open

REQ_0630; REQ_0632; REQ_0633; REQ_0634; REQ_0635; BB_0072

ARCH_0070

Toolchain layering (crate dependency graph)

open

FEAT_0060

ARCH_0071

Build-time vs runtime separation

open

FEAT_0060

ARCH_0072

Logging runtime data flow

open

FEAT_0070

ARCH_0073

Logging control-plane (runtime level changes)

open

FEAT_0075