hellhound.system.workflow

System’s workflow a vector describing the dataflow of the system. Components have an input and an output stream. Each stream is a manifold.stream. HellHound connects io of each component to another component based on the desciption given by the :workflow of the system.

System’s workflow is a vector of vectors. Each vector contains two mandatory element which are: * The name of the output component * The name of the input component and an optional predicate function. This function connects the output stream of output component to input stream of input component, and in case of existance of a predicate function, it only sends those messages which pass the predicate.

Predicate function should be a pure function obviousely.

connect

(connect sink source)(connect sink pred source)

Connects the given sink to the given source.

get-workflow

(get-workflow system)

Returns the workflow vectors of the given system.

message-router

(message-router source pred msg)

Applies the given pred function on incoming msg and sends it to downstream if the function returned true.

setup

(setup system)

Sets up the workflow of the system by wiring the io of each component in the order provided by the user in :workflow key.

wire-io!

(wire-io! components workflow)(wire-io! components workflow workflow-triple)

Walks through the workflow vectors and wire up the system workflow based on desciption given by each vector.

System’s workflow is a vector of vectors. Each vector contains two mandatory element which are: * The name of the output component * The name of the input component and an optional predicate function. This function connects the output stream of output component to input stream of input component, and in case of existance of a predicate function, it only sends those messages which pass the predicate.