Synchronization Architecture

Published Updated
CLI DevServer synchronization architecture and live file workflows.

CLI Local File Sync Workflow & DevServer Pipeline#

Explains how CLI DevServer synchronizes local .airpds and .airpm files with Aircada Studio and Engine in real time.

Dual-File Synchronization Architecture

Aircada provides real-time local file synchronization via CLI DevServer (aircada dev). This architecture bridges local project workspace files (datasets/*.airpds and option-models/*.airpm) with Aircada Studio and Engine.

text

  LOCAL WORKSPACE                         AIRCADA ENGINE

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   DevServer WS  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”

โ”‚ datasets/*.airpds    โ”‚โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–บโ”‚ Engine Hydration    โ”‚

โ”‚ option-models/*.airpmโ”‚  (aircada dev)  โ”‚ & Studio Adapters   โ”‚

โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Key Synchronization Characteristics

  1. Atomic File Write Protections: Writes to local .airpds and .airpm files use atomic .tmp $\rightarrow$ fs.rename operations, ensuring local files are never corrupted or truncated on disk.
  1. updatedAt Timestamp Reconciliation: Startup handshakes compare updatedAt timestamps between local files and Engine state to establish single-source-of-truth reconciliation.
  1. Live Studio UI Refreshes: Edits to .airpds or .airpm files trigger real-time onPricingModelAdapterReady view adapter updates in Web Studio UI without requiring full page reloads.
  1. Echo Suppression: Content hashing prevents infinite sync feedback loops between disk watchers and WebSocket events.