Skip to Content
This documentation is provided with the HEAT environment and is relevant for this HEAT instance only.
Core ConceptsSession Templates

Session Templates

Session Templates in HEAT serve as blueprints for defining the data workflow executed whenever new sessions are created. Each template outlines a Directed Acyclic Graph (DAG) of processing steps (“nodes”) and their dependencies. All sessions in HEAT are required to use a Session Template, ensuring consistent data handling across the platform.

Relationship to Projects

Every Session Template is associated with a single Project. This ensures templates and sessions remain logically grouped within the same context (e.g., a particular simulation type or training scenario).

How They Work

  1. Node Definitions
    Each Session Template consists of nodes, where each node represents a distinct operation—such as parsing CSV data, running a machine-learning analysis, or integrating with external APIs. Node dependencies are also defined here, creating a DAG that dictates execution order.

  2. Session Creation
    When a new session is initiated (e.g., via an Ingest), HEAT automatically spins up a copy of the template’s workflow. Every node in the template is instantiated in the session, carrying over any dependencies or parameters. Because every session must use a template, this step is essential to maintaining a standardized process.

  3. Execution Flow
    As each node completes, subsequent nodes in the DAG are triggered, maintaining the sequence laid out in the template. This approach ensures consistency, makes versioning and updates straightforward, and simplifies tracking data lineage.

Why Session Templates?

  • Consistency
    Every new session follows the identical workflow specified in its template, minimizing errors and fostering repeatable results.
  • Scalability
    Defining the process once lets you run an indefinite number of sessions without repetitive setup.
  • Modularity
    You can modify nodes or dependencies as needs evolve, without affecting active or completed sessions.

Common Use Cases

  • Multi-Step Processing
    Complex pipelines, such as data parsing, machine-learning inference, and generating summary reports, can be cleanly organized as a DAG within a Session Template.
  • Customized Workflows
    Varying simulation or data-collection processes may require different transformations. By creating multiple templates (under separate Projects), you keep each workflow isolated and manageable.

Best Practices

  • Design Smaller, Focused Nodes
    Rather than building a single node that handles multiple complex tasks, break your workflow into smaller steps. This approach simplifies debugging (as any failure is contained to a specific step) and allows partial success - ensuring downstream nodes (like a “dashboard aggregator”) can still generate valuable insights, even if some earlier nodes fail.

  • Pre-Process Data Early
    If an algorithm requires specific fields in a rigid schema, place a transformation node before the algorithm node to reshape or validate inputs. Failures at this stage clearly signal a data-format issue, eliminating confusion over whether the algorithm itself is at fault.

  • Ensure Nodes Are Idempotent
    Each node’s output should be determined solely by its inputs, without causing external side effects - such as permanently modifying a database. Instead, write any intermediate or final results to JSON (or a similarly consistent format). This design helps avoid inconsistent states when multiple sessions run in parallel or when you re-run a session for validation, and preserves the state of past outputs should subsequent reprocessing fail.

  • Document Node Dependencies
    Provide clear naming, descriptions, and dependency chains in your Session Template. This transparency makes it easier to diagnose and fix issues when nodes fail or behave unexpectedly.

  • Separate Workflows for Radically Different Data
    If a single template starts to accumulate too many edge cases or special conditions, create separate templates (and Projects) to maintain clarity and prevent “bloat.”

Next Steps

  • Visit Projects to see how Session Templates align within HEAT’s broader structure.
  • Explore Ingests to learn how new sessions are triggered automatically using these templates.
  • Check out Analytics & Algorithms to learn how custom processing modules (runners) fit into Session Templates’ DAGs.