There is now a domain-specific language for designing control flows:
'package.json' -> SOURCE Read(ReadFile) OUT -> IN Split(SplitStr)
Split() OUT -> IN Count(Counter) COUNT -> IN Display(Output)
Read() ERROR -> IN Display()
NoFlo, showcased in my earlier post, already supports this, allowing you to specify flows in this language and then execute them on Node.js. Example:
$ noflo examples/linecount/count.fbp
The language itself is not new, coming from the 70s-era IBM Data Flow Development Manager (DFDM) system, NoFlo just brings it to the modern era through what could be called software archaeology.