CASE FILE: 0x03

Zero-Crash SDK Architecture

Eliminating non-deterministic process termination through managed-runtime refactoring.

Mission Briefing: The Seamless Substitution

After building the Real-Time Engine, we needed a robust Windows Control SDK. It had to be a "drop-in" replacement for the legacy vendor's C# SDK, enabling our cockpit software to switch engines with zero code changes.

THE MYSTERY: "SILENT CRASHES"

High-load simulations caused the application to vanish. Because the SDK was a Hybrid Bridge, unmanaged Access Violations bypassed the .NET safety net, terminating the process without logs.

Architecture: From Fragile Bridge to Unified Protocol

LEGACY: HYBRID ENTANGLEMENT
Windows UI
└─ Direct Link
Legacy C# SDK Wrapper
└─ SSH (Start / File Xfer)
└─ Thrift (Partial RPC)
└─ TCP (Signal Push)
Remote Engine Target

Fragile & Multi-Protocol

REFACTORED: UNIFIED THRIFT/TCP
Windows UI
└─ Native C# Code Call
Refactored C# SDK
├─ Thrift RPC (Streamlined Control)
└─ TCP (High-Speed Data)
Remote Systemd Daemon

Stable & Hardened

Hardening through Pure C#

THRIFT_SDK_INTEGRATION

Evicted SSH from the control loop. The SDK now handles all remote management via Thrift RPC. By bringing the protocol logic into the managed .NET environment, we eliminate unmanaged access violations that previously crashed the host process.

IMMORTAL_DAEMON

Real-time logic was moved to a target Systemd Service. Self-healing headers ensure the engine is always online, independent of the Windows UI state.

systemd-unit.service
[Service]
ExecStart=/usr/bin/rt_engine
Restart=always
RestartSec=1s
...
// Self-Healing Logic
Ensures persistent simulation availability even after remote failures.

Dead Man's Switch: Safety First

Windows_UI
Linux_Daemon
"Persistent Thrift RPC heartbeats establish a watchdog loop. If the UI silence persists for 3 cycles, the Linux Daemon triggers a safe shutdown of the FPGA hardware."
RPC HEARTBEAT ACTIVEWATCHDOG ARMED

Results: Order from Chaos

SILENT CRASHES0
STRESS TEST7*24h
MAINTENANCEAUTO

SYSTEM_POST_MORTEM

ARCH_1Respect the Runtime Boundary

The 'no-man's land' between managed and unmanaged memory is where 90% of critical bugs hide.

ARCH_2Stateless Control, Stateful Daemons

Moving state to a target background daemon makes the UI layer simple, responsive, and resilient.

ARCH_3Silent Errors are the Loudest

A crash with no logs is a sign of architectural mismatch. Solving it requires moving the gate to a safer runtime.