Flow based programming an overview

Post on 16-May-2015

1.888 views 4 download

Tags:

Transcript of Flow based programming an overview

Flow-based programmingAn overview

VisuFlow Stockholm Meetup #1

Samuel Lampa@smllmp

+samuellampasaml.rilspace.org

Developer atwww.uppmax.uu.sewww.farmbio.uu.sewww.rilpartner.se

What is this?

- A call graph! (of my little go app)

What is this?

What if we could take control of this...…and define the graph declaratively? Wow! :)

qq

FBP Inventor J. Paul Morrison

q

Invented at the 60's at IBM

The flow based programming book- A must read

→ tinyurl.com/fbpbook

“In computer programming, flow­based 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 component­oriented”

Wikipedia

FBP vs DataFlow

“FBP is a particular form of dataflow programming based on bounded buffers, information packets with defined lifetimes, named ports, and separate definition of connections.

Wikipedia

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

Many similar tools: Unix pipes

Many similar tools: LabView

Many similar tools: Yahoo Pipes

Many similar tools: Apple Quartz Composer

Implementations

● Java (JavaFBP)● C# (C#FBP)● C++ (Dspatch, Blockie.io) ● Javascript (NoFlo, Node Red)● Go (GoFlow)● Python (PaPy)● Common lisp● Shell script (net2sh)● D (Dendrite)● …?

Resurgence in FBP interest with NoFlo

NoFlo creator Henri Bergius

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!)

Book on Data Flow, FBP and Reactive Programming

Node-RED

Blockie.io

My adventures in GoFlow

My adventures in GoFlow: Network

My adventures in GoFlow: Component

My adventures in GoFlow: Aspiring bioinformatics library :)

Some links

● Main website:

www.jpaulmorrison.com/fbp● Mailing list:

tinyurl.com/fbplist● Google+:

gplus.to/flowbased

Thank you!