Flow-Based Programming

Caleb Roberts
3 min readAug 24, 2021

Node to self

Working with nodes in ETH.build has me thinking of using them in more of my work in the future. Before I begin diving in, I felt it was apropos to do a little research myself. Using nodes to form the chains was a blast, and if you used something like TouchDesigner, you could really develop a highly dynamic and efficient workflow. Follow along with me as we explore and learn some more about the world of flow-based programming.

Node-based programming and flow-based are the same things, although officially flow-based would take the cake. Essentially think of it as a visual way of programming. There is a network of what are known as “black boxes,” each exchanging data through processes defined by the user. This happens in a process known as “message passing”. This allows you to be able to make endless connections, forming new applications as you please. You create a chain from one node to the next, define the process and continue until you achieve your desired result.

As you can see, there is a connection between a and b and a and c. If you were in the driver’s seat, you could define the processes between the two connections and create an application yourself. A, B, and C would be the processes executing code commands. O1 and O2 are output ports from A, and the INs are incoming ports for B and C, respectively. These help M and N form their connections, thus allowing the processes assigned to them to find their rightful homes.

Ports allow you the ability to have one component used multiple times within a black box network. What is known as IPs, or Information Packets, travel down these connections like those shown above in the example. M and N would be bounded buffers, each only containing a set amount of IPs at any given time. These packets contain chunks of real discernable data unless only sending a signal to a black box.

You could think of this as a pipeline of data being processed. The IPs are sent throughout the network of boxes, allowing for processes to be completed along the way. Modifying or eliminating a node comes with no added cost, and the data will still flow in the form of the IPs.

Now, we have a simple network. Each node has its respective process defined in the black text to make it easy to discern between them. The block to the far left receives the request, sending the IP to the process request node, sending the processed request to the Router, allowing the backend nodes to receive the data. These will then run a process, sending the return up to the handle back-end data node. This node then processes said data, sending it to the Process response node, which then sends the response for the request to the return response node, thus completing the request/response cycle.

As you can see, there are many possibilities for how you can define your FBP. It can be simple or very complex, like in the example above. This is an example of what you might find yourself in if you were to use TouchDesigner. TouchDesigner is a visual development platform, giving you tools at your disposal to create stunning real-time projects and robust user experiences. The results are outstanding, and I have watched many videos of people using TouchDesigner to visualize a masterpiece. Check back in next time; who knows; I may be giving my own tutorial on TouchDesigner. Thanks again for reading and take care.

--

--