The Streamed Dataflow Model of Computation
CAPH is based upon a strict dataflow model of computation : Applications are described as networks of computational units, called actors, exchanging streams of tokens through unidirection, buffered channels. Data to be processed is simply « pushed » in the input ports of the network and results are collected at output ports. Execution occurs as tokens litteraly « flow » through channels, into and out of actors, the behavior of each actor being specified as a set of firing rules.
This model of computation is illustrated on a very simple example below, involving four actors, operating on unstructured streams of tokens carrying integer values. Here the firing rules for each actor are very simple : an actor becomes active whenever tokens are available on all of its input channels and token(s) can be written on its output channel(s). In CAPH streams can also be structured by adding control tokens, allowing complex firing rules to be expressed.