Back to page

Node Graph Instantiation Pipelines

Raw Markdown & AI/RAG Chunks
Raw Markdown Source 2252 chars
# Node Graph Instantiation Pipelines

To eliminate database lookup delays during high-speed routing events, **Asterisk 2** implements an in-memory graph staging array. The framework caches visual workspace configurations into compiled execution maps automatically.

---

## Cache Compilation & Injection Architecture

The flowchart below maps out how backend controllers load user JSON configurations into accessible memory maps:

```mermaid
graph LR
    %% Data Ledger
    subgraph PersistentLedger["Relational DB Storage"]
        DbConfig[("AppFlowConfigs DB Table<br/>(Contains Raw User JSON Strings)")]
    end

    %% Compilation Pipeline
    subgraph StagingEngine["Graph Compiler Engine"]
        ParseJson["Deserialize Canvas Arrays<br/>(Instantiates Abstract Node Maps)"]
        BuildIndex["Construct Pointer Hashmap<br/>(Indexes Target UUID Strings)"]
    end

    %% Runtime Consumption
    subgraph InterpreterTarget["Execution Runtime Cache"]
        MemMap["Shared ConcurrentDictionary<br/>(O(1) Instant Node Resolution)"]
    end

    %% Paths
    DbConfig ==>|"Fetch Config Row"| ParseJson
    ParseJson --> BuildIndex
    BuildIndex ==>|"Populate Cache"| MemMap

    %% Beautiful High-Contrast Styles
    classDef dbToken fill:#312e81,stroke:#ec4899,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef engineToken fill:#1e293b,stroke:#a855f7,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef targetToken fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:6px,ry:6px;

    class PersistentLedger,DbConfig dbToken;
    class StagingEngine,ParseJson,BuildIndex engineToken;
    class InterpreterTarget,MemMap targetToken;
```

---

## Memory Staging Rules

### 1. `O(1)` Hashmap Resolution Speeds
Compiled layout mappings bypass deep JSON search logic completely. User canvas objects translate into keyed memory arrays mapped directly by individual target module IDs, providing constant-time access routing.

### 2. Hot-Reload Cache Eviction
When client interface portals issue modification save requests, application handlers update primary database tables and immediately dispatch cache invalidation triggers across all connected memory maps. Subsequent incoming calls load refreshed layout parameters automatically.
AI Chunks (RAG) 3 chunks
Chunk #1 Node Graph Instantiation Pipelines
# Node Graph Instantiation Pipelines

To eliminate database lookup delays during high-speed routing events, **Asterisk 2** implements an in-memory graph staging array. The framework caches visual workspace configurations into compiled execution maps automatically.

---
Chunk #2 Cache Compilation & Injection Architecture
## Cache Compilation & Injection Architecture

The flowchart below maps out how backend controllers load user JSON configurations into accessible memory maps:

```mermaid
graph LR
    %% Data Ledger
    subgraph PersistentLedger["Relational DB Storage"]
        DbConfig[("AppFlowConfigs DB Table<br/>(Contains Raw User JSON Strings)")]
    end

    %% Compilation Pipeline
    subgraph StagingEngine["Graph Compiler Engine"]
        ParseJson["Deserialize Canvas Arrays<br/>(Instantiates Abstract Node Maps)"]
        BuildIndex["Construct Pointer Hashmap<br/>(Indexes Target UUID Strings)"]
    end

    %% Runtime Consumption
    subgraph InterpreterTarget["Execution Runtime Cache"]
        MemMap["Shared ConcurrentDictionary<br/>(O(1) Instant Node Resolution)"]
    end

    %% Paths
    DbConfig ==>|"Fetch Config Row"| ParseJson
    ParseJson --> BuildIndex
    BuildIndex ==>|"Populate Cache"| MemMap

    %% Beautiful High-Contrast Styles
    classDef dbToken fill:#312e81,stroke:#ec4899,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef engineToken fill:#1e293b,stroke:#a855f7,stroke-width:2px,color:#fff,rx:6px,ry:6px;
    classDef targetToken fill:#0f172a,stroke:#38bdf8,stroke-width:2px,color:#fff,rx:6px,ry:6px;

    class PersistentLedger,DbConfig dbToken;
    class StagingEngine,ParseJson,BuildIndex engineToken;
    class InterpreterTarget,MemMap targetToken;
```

---
Chunk #3 Memory Staging Rules
## Memory Staging Rules

### 1. `O(1)` Hashmap Resolution Speeds
Compiled layout mappings bypass deep JSON search logic completely. User canvas objects translate into keyed memory arrays mapped directly by individual target module IDs, providing constant-time access routing.

### 2. Hot-Reload Cache Eviction
When client interface portals issue modification save requests, application handlers update primary database tables and immediately dispatch cache invalidation triggers across all connected memory maps. Subsequent incoming calls load refreshed layout parameters automatically.