Graphs

Computational graphs are the underlying data model for Tierkreis. Atomic operations are carried out on the graphs nodes and edges carry values. The graphs are directed, which means, the order of operations is defined by the edges. A node can only be evaluated when all its values (incoming edges) are provided. Hence all parent nodes need to be evaluated beforehand. Using this information, Tierkreis finds all nodes for computation by starting from the outputs. From this follows an important distinction: In order to run a graph, its inputs and outputs need to be defined. The resulting object is called a Workflow.

Types of nodes

This tutorial will guide you through using the basic nodes for constructing a graph. The available node types are:

  • Input

  • Output

  • const: constant values

  • ifelse: lazy evaluated conditional statement with two branches

  • eifelse: eager evaluated conditional statement with two branches

  • task: worker tasks, shell scripts etc…

  • eval: higher-order graph evaluation; evaluating a subgraph

  • loop: higher-order loop; iterate over a graph until a boolean termination criterion is met

  • map: higher-order map; evaluate the same graph over a collection of independent inputs

  • embed: higher-order graph embedding; embeds a graph into another graph inplace.

Note

Higher-order in this context means that the node expects one of the inputs to be a graph in the form of Workflows where inputs and and ouptus are defined. Task nodes can consume and produce Workflows.

Node Metadata

Each node can be annotated with metadata. Currently this is only used to enable breakpoints.