Richard Bucker

Flow Based Programming - groups

Posted at — May 25, 2014

The Flow Based Programming model is essentially sending strongly typed messages between nodes that are running in separate threads. (at least in my model). The entry and exit point of each node is typed and has a queue; they act with the ability to fan-out and fan-in.When one node is sending typed messages to another node… the messages can be consumed serially and without being interfered with by other linked nodes. Meaning a fan-in input can consume all of the input group from one fan-out before accepting input from other groups or other nodes.The producer of the group needs to identify the group, make a connection to the target subscriber (one to one), and if granted permission to start sending… starts, until the publisher runs our of data at which time the publisher sends an end of group message.Creating the pipes is the first challenge. (i) using the same pipe for grouped and ungrouped messages will be a bit messy; the channel itself cannot tell the difference between the message types prior to consuming the message. (ii) creating a group message channel and then spawning a dynamic channel has some benefit (iii) creating the channels with big enough queues can be a serious challenge so that the pending channels have been queued up (iv) redirecting the messages to a typed queue offer other challenges. Whatever the implementation it’s important to keep the processing and reprocessing to a minimum.