Version: 8.3.0
Engine concepts

Nodes

A Node is an entity performing a treatement or job using ingoing data given in ingoing Ports provided by other Nodes or 'manually' set and providing itself data in outgoing Ports. A Node is eventually put into a scope (see Node hierarchy) in which all it's links with other Nodes can be performed. The most little scope if it exists of a Node is referenced by YACS::ENGINE::Node::_father.

There are 2 types of Node :

Node hierarchy

  • It has been called hierarchy 'MyHierarchy' of a node 'MyNode' the biggest tree which each node of this tree is an instance of ComposedNode and each leaves are instances of ElementaryNode. One of these leaves/nodes is 'MyNode'. The links between leaves/nodes nodes/nodes are established by the fatherness stored in each instance of Node (YACS::ENGINE::Node::_father).
  • The unique node of this tree only linked down (with _father equal to 0) and having no father is called RootNode of 'MyHierarchy'.
  • A level of hierarchy of 'MyHierarchy' is the set of node/leaf having the same father.
  • A scope of a the hierarchy 'MyHierarchy' is a subtree of 'MyHierarchy' tree. A scope is represented by the head node of this subtree.

Ports

A YACS::ENGINE::Port is an interface of a YACS::ENGINE::Node from the outside. Ports can have several semantics.

Control flow

The semantic of this port is to put constraints on the sequence of execution to synchronize nodes, on THE SAME LEVEL of Node hierarchy between them.

Data

Instances of these type of ports inherits from YACS::ENGINE::DataFlowPort. This type of port represents data exchange protocol performed physically by implementation in Runtime at the end of execution an instance of an ElementaryNode. So contrary to DataStream, this data exchange protocol is performed following Control flow synchronization.

DataStream

Instances of these type of ports inherits from YACS::ENGINE::DataStreamPort. DataStream ports are ports for data exchange NOT synchronized by Control flow.

Links

A link in YACS does not lie onto a C++ object. A link exists in YACS::ENGINE model only like a sorted pair (YACS::ENGINE::OutPort, YACS::ENGINE::InPort). The semantic of elements of pair can be different (Data or DataStream ). This pair is stored in both YACS::ENGINE::OutPort side and YACS::ENGINE::InPort side. The storage YACS::ENGINE::InPort side is only for edition facility (Node, Port suppression), but at execution time, only links info YACS::ENGINE::OutPort side is used.

A link is constructed by the call to YACS::ENGINE::ComposedNode::edAddLink method. The instance of YACS::ENGINE::ComposedNode on which apply edAddLink must be so that inPort and OutPort are both in its scope.

Point of view of engine at run time

It is important to note that a link defined by edAddLink method can hide potentially a serie of elementary links. This is particalary true when 2 dataflow ports inside 2 different loops are linked each other ; in this case Data / DataStream conversion is requested. An elementary link is a link in which the semantic of both elements in pair are exactly the same. So the complexity linked to modification of port semantic in a link is managed at edition time so that at run time only elementary links are seen.

Data types

YACS::ENGINE::TypeCode instances are destined to describe data structure of a piece of data expected by an instance of YACS::ENGINE::DataPort (for type checking at edition : static type checking) or held in YACS::ENGINE::Any instance (for type checking at execution : dynamic type checking). All data exchanged by calculation nodes through input and output data ports have a type.

The type is given by the port that holds the data by calling its YACS::ENGINE::DataPort::edGetType() method. All types are instances of the YACS::ENGINE::TypeCode class or one of its derived classes : YACS::ENGINE::TypeCode_objref, YACS::ENGINE::TypeCode_seq.

Context

A context is a set of libraries allowing directly or indirectly from C++ calls to :

  • launch on demand, a computation or a job specified uniquely by a string of character and a list of inputs and giving in return a list of data in specific data formats.
  • handle data of these specific data formats. Each of these data formats overlapping all or part of data overlapped by YACS::ENGINE::Any.

Concretely it takes form of set of :

  • middlewares (CORBA, SOAP, MPI, PVM ...)
  • high level langage interpreters (as python, perl, shell) callable from C++.
  • plateform (SALOME)

Runtime

A runtime exists in a given Context. A runtime is in charge to :

  • treat physically the basic execution of elementary tasks in a given context
  • the traduction of data in this context.
  • to perform the physical deployment of the execution.

The runtime simply appears in engine as an interface that a concrete runtime must implement to be piloted by YACS::ENGINE.

Deployment

This the 3rd point of view of a graph of execution, after links between nodes (see Links ) and hierarchy in nodes ( Node hierarchy ). Deployment concept is accessible in interface YACS::ENGINE::Task with the concept of YACS::ENGINE::ComponentInstance and YACS::ENGINE::Container.

  • a ComponentInstance is a common environement shared by a set of YACS::ENGINE::ServiceNode. Typically ServiceNodes sharing a same ComponentInstance are sharing a same state taking different form (environement var and/or memory space and/or internal variables...).
  • a Container is a common process shared by several ComponentInstances.

A task needed to be placed or deployed at runtime has to return something different from 0 on call to YACS::ENGINE::Task::getComponent(). YACS::ENGINE::ServiceNode is the abstract class representing all executable nodes needed to be deployed.

It's important to note that the placement (or deployment) of ServiceNodes can be performed at different moment at runtime.