3. The SAA-CLAD Symbiosis: From Philosophy to Practice
The Khora Engine is built on two core architectural concepts: the Symbiotic Adaptive Architecture (SAA) and the CLAD Pattern. It is crucial to understand that these are not two separate architectures; they are two sides of the same coin, representing the vision and its execution.
- SAA is the "Why": It is our philosophical blueprint. It describes what we want to achieve—a self-optimizing, adaptive engine where intelligent subsystems collaborate to meet high-level goals.
- CLAD is the "How": It is our concrete implementation strategy in Rust. It provides the strict rules, crate structure, and data flow patterns required to make the SAA vision a high-performance, maintainable reality.
Every abstract concept in the SAA has a direct, physical home within the CLAD structure. This explicit mapping ensures that our code is always a faithful implementation of our vision and provides a clear mental model for development.
The SAA-CLAD Mapping
SAA Concept (The "Why") | CLAD Crate (The "How") | Role in the Symbiosis |
---|---|---|
Dynamic Context Core (DCC) & GORNA | khora-control | The strategic brain that observes telemetry and allocates budgets. |
Intelligent Subsystem Agents (ISAs) | khora-agents | The tactical managers, each responsible for a domain (rendering, assets). |
Multiple ISA Strategies | khora-lanes | The fast, deterministic "workers" or algorithms an Agent can choose from. |
Adaptive Game Data Flows (AGDF) | khora-data | The foundation, primarily through the CRPECS, enabling flexible data layouts. |
Semantic Interfaces & Contracts | khora-core | The universal language (traits, core types) that allows all crates to communicate. |
Observability & Telemetry | khora-telemetry | The nervous system that gathers performance data for the DCC. |
Hardware & OS Interaction | khora-infra | The bridge to the outside world (GPU, OS), implementing core contracts. |
This clear separation of concerns is the key to resolving the classic conflict between complexity and performance. It allows Khora to be highly intelligent and dynamic in its Control Plane (control
, agents
) while being uncompromisingly fast and predictable in its Data Plane (lanes
, data
).