Flow based programming an overview

27
Flow-based programming An overview VisuFlow Stockholm Meetup #1 Samuel Lampa @smllmp +samuellampa saml.rilspace.org Developer at www.uppmax.uu.se www.farmbio.uu.se www.rilpartner.se

Transcript of Flow based programming an overview

Page 1: 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

Page 2: Flow based programming   an overview

What is this?

Page 3: Flow based programming   an overview

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

What is this?

Page 4: Flow based programming   an overview

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

qq

Page 5: Flow based programming   an overview

FBP Inventor J. Paul Morrison

q

Invented at the 60's at IBM

Page 6: Flow based programming   an overview

The flow based programming book- A must read

→ tinyurl.com/fbpbook

Page 7: Flow based programming   an overview

“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

Page 8: Flow based programming   an overview

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

Page 9: Flow based programming   an overview

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

Page 10: Flow based programming   an overview

Many similar tools: Unix pipes

Page 11: Flow based programming   an overview

Many similar tools: LabView

Page 12: Flow based programming   an overview

Many similar tools: Yahoo Pipes

Page 13: Flow based programming   an overview

Many similar tools: Apple Quartz Composer

Page 14: Flow based programming   an overview

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)● …?

Page 15: Flow based programming   an overview

Resurgence in FBP interest with NoFlo

Page 16: Flow based programming   an overview
Page 17: Flow based programming   an overview

NoFlo creator Henri Bergius

Page 18: Flow based programming   an overview

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

Page 19: Flow based programming   an overview

Book on Data Flow, FBP and Reactive Programming

Page 20: Flow based programming   an overview

Node-RED

Page 21: Flow based programming   an overview

Blockie.io

Page 22: Flow based programming   an overview

My adventures in GoFlow

Page 23: Flow based programming   an overview

My adventures in GoFlow: Network

Page 24: Flow based programming   an overview

My adventures in GoFlow: Component

Page 25: Flow based programming   an overview

My adventures in GoFlow: Aspiring bioinformatics library :)

Page 26: Flow based programming   an overview

Some links

● Main website:

www.jpaulmorrison.com/fbp● Mailing list:

tinyurl.com/fbplist● Google+:

gplus.to/flowbased

Page 27: Flow based programming   an overview

Thank you!