Flow-based Programming

Panta rhei (Panta rhei) - Everything flows.

Animation of simple diagram

In computer programming, Flow-Based Programming (FBP) is a programming paradigm that uses a "data processing factory" metaphor for designing and building applications. FBP defines applications as networks of "black box" processes, which communicate via data chunks travelling across predefined connections (think "conveyor belts"), where the connections are specified externally to the processes. These black box processes can be reconnected endlessly to form different applications without having to be changed internally. FBP is thus naturally component-oriented.

FBP is a particular style of dataflow programming based on information packets with defined lifetimes, named ports, "bounded buffer" connections, and definition of connections external to the components, which therefore supports improved development time and maintainability, reusability, rapid prototyping, simulation, improved performance, and good communication among developers, maintenance staff, users, systems people, and management - not to mention that FBP naturally takes advantage of multiple cores... without the programmer having to struggle with the intricacies of multitasking!

Over the last 40+ years, many companies have come out with data streaming or FBP-inspired systems, including, more recently, some of the biggest companies in the industry, such as IBM, Microsoft, Facebook, Google, and the New York Times (see FBP External Links). We will probably never know if these systems trace their ancestry directly to Paul's ideas, as the changing hardware and software environment in the industry would probably have triggered similar solutions anyway, but it definitely seems to be "steam engine time" for these concepts!

FBP is described in J. Paul Morrison's book "Flow-Based Programming: A New Approach to Application Development", now in its 2nd edition, which can be obtained in paperback form from Amazon, or in 2 e-book formats: Kindle and epub.

Further down on this web page you will find a bunch of useful links, including a list of currently supported programming languages (on GitHub), and some videos demonstrating the use of the FBP diagramming tool, DrawFBP.

Video Interview with J. Paul Rodker Morrison, Summer 2013

If you have come across Flow-Based Programming by way of NoFlo or Flowhub, it is recommended that you read FBP vs. FBP-inspired Systems, which attempts to highlight the differences and similarities between FBP proper, or "classical" FBP, (the subject of this web site) on the one hand, and NoFlo and other similar FBP-inspired systems on the other. FBP does involve a significant paradigm shift for the majority of programmers, which may be why a number of systems such as NoFlo have appeared in recent years that appear to be a halfway house between FBP and conventional programming. While the FBP paradigm shift may cause some trouble at first, given the prevalence of the older programming approaches, in fact it embodies a simple mental model (not "simple" as in easy but "simple" as in elegant, to quote Joe Witt of HortonWorks), and has proven over several decades to result in applications that are more understandable and maintainable than those built using the conventional (von Neumann) paradigm.

For those of you who do not have the patience to wade through the whole book (TL;DR!), I would strongly advise reading at least Chapter 3, Basic Concepts, as this describes the fundamental concepts of FBP. This chapter will answer many of your basic questions about FBP, and act as a starting point if you wish to dig deeper.

At this point I would like to mention the "dropOldest" connection attribute (this function is self-explanatory), as it does not appear in my book - this function is now available in JavaFBP, C#FBP and can be specified in DrawFBP diagrams.

We know you are tired of Powerpoint presentations, but this one (from 2007) gives quite a good overview of FBP - as it was at that time. There is also a video (not very professional, I'm afraid!), where I present this at a Meetup in Toronto in Sept. 2013 organized by Paul Tarvydas, CEO of Tarvydas-Sanford Controls Inc., and Dann Toliver. It has a few jokes and reminiscences, and may be more accessible than the straight Powerpoint presentation! The Paul referred to in the video is Paul Tarvydas. Towards the end (at 40:12) there is a brief demo of the FBP diagramming tool, DrawFBP.

Links:

  1. Introduction
  2. History
  3. Concepts
  4. Software:

  5. Examples
  6. Comparison with other paradigms and methodologies
  7. FBP vs. FBP-inspired Systems
  8. Bibliography
  9. Chapters from the first edition - online
  10. External links

FBP on GitHub: The implementations listed above under "Software"

Six Youtube videos on DrawFBP, illustrating the use of DrawFBP, and a number of basic ("classical") FBP concepts (what we are now calling "FBP-inspired" or "FBP-like" systems do not necessarily contain all of these, although DrawFBP should be able to support most of these systems):

  1. DrawFBP video #1
  2. DrawFBP video #2
  3. DrawFBP video #3
  4. DrawFBP video #4
  5. DrawFBP video #5 - concept of "subnets", both at design and implementation time
  6. DrawFBP video #6 - simple interactive systems using WebSockets, with demo of JavaFBP-WebSockets (JavaFBP and HTML5)

Google group on Flow-Based Programming

C2-style Flow-Based Programming Wiki (last maintained in 2010)

Google+ Community on Flow-Based Programming

More general FBP Wiki by Vladimir Sibirov, et al., intended to cover both "classical" FBP and FBP-inspired approaches (still under development )

Twitter hashtag: #FlowBased