Menu

FBP and stateless

Kevin Rattai

As explained in the home page, MonoFlow is a stateless system.

This may appear to be contrary to Flow Based Programming. Flow based programming, as described by J. Paul Morrison in his book "Flow Based Programming very explains paths or channels which connect nodes and clearly define the path that the data agents follow.

In this way, the data agents appear, for the most part, stateful. What that means is, at any given moment that the data is not mingled in a node, the information of the data agent can be easily known and remains constant. Even while in a node, the momentary state of the data agent information can be known, if that action is requested.

What is important to note is, MonoFlow is designed to explicitly allow for this stateful behaviour. By formally declaring channels between the nodes within a system designed in MonoFlow, one can ensure a stateful system.

The primary difference of MonoFlow from "traditional" FBP is, a stateless context is allowed for, by the very stateless nature of MonoFlow.

What that means is, although each node within MonoFlow will be aware of every other (unique and constrained) node in MonoFlow, the connections between nodes is not explicit. No node knows the state of any other node, unless there is an active query from one node to another. This is an observer context. This action places an otherwise stateless agent into a stateful context so that the observer can then determine how they might wish to interact with another node.

So MonoFlow does comply with formal FBP if expressed by the programmer. It simply does not mandate that behaviour.