Timur Gordon 92feb504f8 fix repo links
2025-08-27 15:42:57 +02:00
2025-08-27 15:35:28 +02:00
2025-08-27 15:42:57 +02:00

Hero Code Home

Architecture Overview

The Hero Code system follows a hierarchical job execution architecture with three main components:

Coordinator

  • Manages DAGs (Direct Acyclic Graphs) that define flows of jobs
  • Orchestrates job execution by dispatching individual steps from DAGs to supervisors
  • Handles flow logic and determines the next steps based on job completion results

Supervisor

  • Receive job assignments from the coordinator
  • Dispatch jobs to appropriate runners based on job requirements
  • Act as intermediaries between coordinators and runners
  • Return job results back to the coordinator

Runner

  • Execute the actual jobs assigned by supervisors
  • Run job-specific code and return responses to supervisors
  • Specialized for different types of workloads and environments
  • Use Hero DB as their data layer for persistent storage and data operations

Runners run scripts in rhai or heroscript and are written in multiple languages. Each runner uses Hero DB as its data layer for persistent storage and data operations.

graph TD
    C[Coordinator<br/>DAG Management & Flow Logic]
    
    subgraph N1["Node 1 (Linux User)"]
        S1[Supervisor 1]
        R1[Runner 1<br/>System Runner]
        R2[Runner 2<br/>Python Runner]
        DB1[(Hero DB 1)]
    end
    
    subgraph N2["Node 2 (Linux User)"]
        S2[Supervisor 2]
        R3[Runner 3<br/>V Runner]
        R4[Runner 4<br/>OSIS Runner]
        DB2[(Hero DB 2)]
    end

    C <-->|Job & Result| S1
    C <-->|Job & Result| S2
    
    S1 <-->|Job & Result| R1
    S1 <-->|Job & Result| R2
    S2 <-->|Job & Result| R3
    S2 <-->|Job & Result| R4
    
    R1 <-->|Data| DB1
    R2 <-->|Data| DB1
    R3 <-->|Data| DB2
    R4 <-->|Data| DB2

    style C fill:#e1f5fe
    style S1 fill:#f3e5f5
    style S2 fill:#f3e5f5
    style R1 fill:#e8f5e8
    style R2 fill:#e8f5e8
    style R3 fill:#e8f5e8
    style R4 fill:#e8f5e8
    style DB1 fill:#fff3e0
    style DB2 fill:#fff3e0

Local Embedded Application Front End (leaf)

Leaf is a local embedded application front end. It is a web application that can be embedded in any web application. It is a set of widgets that can be used to build web applications.

Hero DB

Hero DB is the data layer used by runners in each node. It provides persistent storage and data operations for runners, enabling them to store and retrieve data as needed during job execution.

Herolibs

herolibs are libraries for hero code in different languages.

Description
Home for Hero Code
Readme 34 KiB
Languages
Shell 100%