Skip to content

Latest commit

 

History

History
146 lines (115 loc) · 5.7 KB

File metadata and controls

146 lines (115 loc) · 5.7 KB

End-to-End Workflow Overview

High-level architecture diagram showing the complete flow from user function offload through execution, including monitoring and optimization.

High-Level Flow Summary

  1. Setup: Device Runtime authenticates with Cognit Frontend and registers application requirements (geolocation, latency, etc.) to get an assigned Edge Cluster flavour.
  2. Execution: User application offloads a function. Device Runtime sends the request to the NGINX Proxy of the assigned Edge Cluster (e.g., Flavour A).
  3. Monitoring: OpenNebula Probes continuously fetch energy metrics from Hosts (via Scaphandre) and application metrics from the Cognit Framework (via Prometheus Exporters).
  4. Optimization: Cognit Optimizer periodically reads resource usage and metrics from OpenNebula, runs an optimization algorithm, and scales the Edge Clusters (via ECF API) or updates assignment data in the database.

Note: For detailed sequence diagrams of each component's internal logic, please refer to the files in the components/ directory.

graph LR
    %% --- Color Definitions ---
    classDef device fill:#bbdefb,stroke:#0d47a1,stroke-width:2px,color:#000
    classDef cfe fill:#ffe0b2,stroke:#e65100,stroke-width:2px,color:#000
    classDef db fill:#e0e0e0,stroke:#616161,stroke-width:2px,color:#000
    classDef opt fill:#e1bee7,stroke:#4a148c,stroke-width:2px,color:#000
    classDef opennebula fill:#e0f7fa,stroke:#006064,stroke-width:2px,color:#000
    classDef framework fill:#fff9c4,stroke:#fbc02d,stroke-width:2px,color:#000
    classDef hosts fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px,color:#000
    classDef monitor fill:#fff3e0,stroke:#ef6c00,stroke-width:1px,stroke-dasharray: 2 2,color:#000
    classDef empty width:0px,height:0px,stroke:none,fill:none;

    %% --- 1. Device Layer (Left) ---
    subgraph Device_Layer [**DEVICE LAYER**]
        direction LR
        style Device_Layer fill:#e3f2fd,stroke:#1565c0,stroke-width:2px
        User[**USER APPLICATION**]:::device
        DR[**DEVICE RUNTIME**]:::device
        User -->|1. init call| DR
    end

    %% --- 2. Control Plane (Center Top) ---
    subgraph Control_Plane [**COGNIT FRONTEND**]
        direction LR
        style Control_Plane fill:none,stroke:#e65100,stroke-width:2px,stroke-dasharray: 5 5
        
        CF[**COGNIT FRONTEND**]:::cfe
        DB[(**DEVICE_CLUSTER_ASSIGNMENT<br/>DATABASE**)]:::db
        CO[**COGNIT OPTIMIZER**]:::opt
        
        %% Internal Links
        CF <-->|Store/Query| DB
        CO -->|Read assignments| DB
        CO -->|Update assignments| DB
    end

    %% --- 3. Infrastructure (Center Bottom) ---
    subgraph OpenNebula [**OPENNEBULA INFRASTRUCTURE**]
        direction TB
        style OpenNebula fill:#e0f7fa,stroke:#006064,stroke-width:2px
        
        ONEF[**OPENNEBULA FRONTEND**]:::opennebula
        Probes[**MONITORING PROBES**]:::monitor
        
        %% Probes reside in OpenNebula Monitoring
        ONEF --- Probes

        %% Optimizer Integrations
        CO -->|7. Query Resources & Metrics| ONEF
        CF -->|Query Clusters| ONEF
    end

    %% --- 4. Single Edge Cluster (Right) ---
    subgraph Cluster_A [**EDGE CLUSTER**]
        direction TB
        style Cluster_A fill:none,stroke:#7b1fa2,stroke-width:2px,stroke-dasharray: 5 5
        
        subgraph Cluster_Infra [**CLUSTER HOSTS**]
            direction LR
            style Cluster_Infra fill:#c8e6c9,stroke:#2e7d32,stroke-width:2px
            Host1[**HOST 1**<br/>**SCAPHANDRE**]:::hosts
            Host2[**HOST N**<br/>**SCAPHANDRE**]:::hosts
            
            %% Fused Scraping Point
            J_Hosts[ ]:::empty
        end

        subgraph Cognit_Framework [**COGNIT FRAMEWORK**]
            direction LR
            style Cognit_Framework fill:#fff9c4,stroke:#fbc02d,stroke-width:2px
            
            NGX1[**NGINX PROXY**]:::framework
            ECF1[**EDGE CLUSTER FRONTEND**]:::framework
            EXP1[**ECF PROMETHEUS EXPORTER**]:::monitor
            RMQ1[**RABBITMQ**]:::framework
            
            subgraph SR_Pool [**SERVERLESS RUNTIMES**]
                direction TB
                style SR_Pool fill:#fffde7,stroke:#fbc02d,stroke-width:1px
                SR1a[**RUNTIME 1**]:::framework
                SR1b[**RUNTIME N**]:::framework
                EXP_SR1[**RUNTIME PROMETHEUS EXPORTER**]:::monitor
                
                %% Fused Exporter Connection
                J_Runtimes[ ]:::empty
            end
            
            %% Fused Exporter Scraping Point
            J_Exporters[ ]:::empty
        end
        
        %% Internal Cluster Flows
        NGX1 -->|5a. Route| ECF1
        ECF1 <-->|5b. Async Task| RMQ1
        
        %% Fused RabbitMQ Consumption
        RMQ1 ==>|5c. Consume| SR1a & SR1b
        
        %% Fused Exporter Connections (Components PUSH to Exporters)
        SR1a -->|Push Metrics| J_Runtimes
        SR1b -->|Push Metrics| J_Runtimes
        J_Runtimes --> EXP_SR1
        
        ECF1 -->|Push Metrics| EXP1
        
        %% Monitoring Flows (Probes FETCH from Exporters)
        %% 1. Probes -> Joint Node -> ECF Exporter & Runtime Exporter
        Probes -.->|6a. Fetch Metrics| J_Exporters
        J_Exporters -.-> EXP1
        J_Exporters -.-> EXP_SR1
        
        %% 2. Probes -> Joint Node -> Hosts (Scaphandre)
        Probes -.->|6b. Fetch Energy| J_Hosts
        J_Hosts -.-> Host1
        J_Hosts -.-> Host2
    end

    %% --- Cross-System Flows ---
    
    %% Device Setup
    DR -->|2. Auth & Reqs| CF
    CF -->|3. Return Endpoint| DR

    %% Execution Routing
    DR -->|4. Execute Flavour A| NGX1

    %% Orchestration
    CO -->|8. Scale API| ECF1

    %% Layout Hints
    Device_Layer ~~~ Control_Plane
    Control_Plane ~~~ OpenNebula
Loading