The document discusses flow-based programming (FBP), its history and concepts. FBP defines applications as networks of processes that exchange data through message passing over predefined connections. This allows the processes to be reconnected without changing their code. The document provides examples of FBP networks and components implemented in various languages like Go, Java and JavaScript. It also discusses the benefits of FBP and its growing popularity with implementations like NoFlo.
6. Go(lang) characteristics
● Open source
● Compiled (like C, C++, Pascal, etc)
● Garbage collected (Like Java)
● Statically typed (Like C++, Java, C# etc)
● Statically linked
(includes dependent code in the executable when compiling, not just linking to it when running)
● Has primitives for writing concurrent code built into the language (channels and go-routines)
● Multiplexes go-routines on operating system threads
(rather than start one thread per go-routine).
● Has a C-like syntax
● Has a small set of keywords
● Has explicit error handling (no Exception handling)
● Supports Reflection
● Has no Generic programming
● Has, for its age, a rather extensive standard library (Less need to reinvent the wheel)
● Is supported by Google, Canonical and a few other companies.
7. Go(lang) benefits
● Easy Concurrency
… due to in-built primitives, multi-plexing, and in-built garbage collector.
● Good at handling many concurrent connections
… due to concurrency primitives and the multiplexing.
● Generally good performance, especially compared to scripting languages
… due to static typing, being compiled and good concurrency primitives.
● Easy to learn
… due to small language, and similarity with existing C-like languages.
● Very easy to deploy to production (servers)
… due to static linking (Just copy the executable to the destination server!)
● Predictable code
… due to the explicit error handling (see also downside for same reason)
● Getting a lot of media attention
… and with that, a fast growing community) due to big backers like Google.
8. Go(lang) potential drawbacks
● The lack of Generic programming means that some
redundancy might be needed at times, when implementing
the same algorithm for slightly varying data types.
● Somewhat verbose code might be needed at times due to
the explicit error handling (see also upside for same reason)
● Performance can be affected (to the worse) by the pauses
incurred by the garbage collector (but being worked on!)
● Might not produce as optimized code as some other
languages, due mostly to the young age of the language
(although that improves with each release!)
28. The flow based programming book
- A must read
→ tinyurl.com/fbpbook
29. “In computer programming, flowbased
programming (FBP) is a programming
paradigm that defines applications as
networks of "black box" processes, which
exchange data across predefined
connections by message passing, 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
componentoriented”
Wikipedia
30.
31.
32. Core FBP Concepts
● “Black box” processes (comp. to functions)
● Named in / outports as interfaces to processes
● Channels with bounded buffers
● Separate network definition
35. An array of benefits ...
● Change of connection wiring
without rewriting
components
● Inherently concurrent -
suited for the multi-core
CPU world!
● Testing, monitoring and
logging very easy:
Just plug in a mock-, logging-or
debugging component.
● Etc.
qq
45. NoFlo summary
● Based on Node.js
● Written in coffeescript
● 237 reusable components
● Successful (116% of 100k USD) Kickstarter for
in-browser UI
● FBP definition format in JSON
● Proof-of concept:
Re-implementation of Jekyll Static site generator:
16 000 LOC → 107 components
(4 custom ones of ~500 LOC, rest re-usable!)