Traces for retroactive debugging of FBP programs
CoffeeScript HTML CSS JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin flowtrace-replay: Start of trace replaying tool (emulates a runtime) Aug 31, 2015
doc doc: Braindump about event store Apr 22, 2016
spec Add test setup for node.js Sep 1, 2015
src preformance: Make look reasonable Jul 19, 2016
ui ui: Fix exception on flowtrace with no events Apr 5, 2016
.gitignore UI: Install noflo using browserify Sep 14, 2015
.travis.yml Travis: Update to nodejs 4 Nov 25, 2016
CHANGES.md README: Update with recent status of project/tools Dec 18, 2015
Gruntfile.coffee Grunt: Run browserify as part of build Nov 25, 2016
README.md README: Update with recent status of project/tools Dec 18, 2015
bower.json UI: Install the-graph via bower Sep 14, 2015
component.json Bump Nov 22, 2015
index.js
package.json Bump Nov 25, 2016

README.md

Flowtrace

A flowtrace is a persisted record of the execution of an Flow-based Programming (FBP) or dataflow program. It is used for retroactive (after-the-fact) debugging; to locate, understand and fix bugs.

The concept is analogous to a 'stacktrace' or 'core dump' for imperative code.

This project will define a data format to store traces in, and provide debugging tools for working with these traces.

Status

Minimally useful

  • NoFlo has support for creating flowtraces, from noflo-nodejs 0.6 and noflo-runtime-msgflo 0.2.2
  • Several commandline tools exist for working with flowtraces
  • Note: File format not 100% finalized
  • Some not-yet-useful timeline UI prototypes exist

See braindump and UI notes for ideas/plans.

Installing

First make sure you have Node.js with NPM installed.

To install locally in a project. Recommended.

npm install flowtrace
export PATH=./node_modules/.bin:$PATH

To install globablly on your system

npm install -g flowtrace

Display flowtrace on commandline

flowtrace-show reads a flowtrace, and renders a human-friendly log output from it.

./bin/flowtrace-show mytrace.flowtrace.json

Example output:

-> IN repeat CONN
-> IN repeat DATA hello world
-> IN stdout CONN
-> IN stdout DATA hello world
-> IN repeat DISC
-> IN stdout DISC

When used in a terminal, supports colors.

Show a flowtrace in Flowhub

flowtrace-replay reads a flowtrace, and then acts as a live FBP runtime. That means it can be used with any FBP IDEs/client which support the FBP runtime protocol.

flowtrace-replay mytrace.flowtrace.json

By default this will open Flowhub in your browser, automatically connect and show you the graph. To replay the data press the play button. You should then see the data flowing through edges.

Flowtrace replayed in Flowhub

You can specify which --ide to use, and disable automatic opening of browser with -n.

flowtrace-replay --ide http://localhost:8888 -n

You can also set the --host and --port. See --help for all options.