All Projects → fibo → dflow

fibo / dflow

Licence: MIT license
is a minimal Dataflow programming engine

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to dflow

Purr Data
Purr Data - Jonathan Wilkes' cross-platform Pd-l2ork version
Stars: ✭ 412 (+488.57%)
Mutual labels:  dataflow-programming
Plumber
The General-Purpose Cross-Language Dataflow Programming
Stars: ✭ 26 (-62.86%)
Mutual labels:  dataflow-programming
Flow View
is a visual editor for Dataflow programming
Stars: ✭ 148 (+111.43%)
Mutual labels:  dataflow-programming
Nipype
Workflows and interfaces for neuroimaging packages
Stars: ✭ 557 (+695.71%)
Mutual labels:  dataflow-programming
Drawflow
Simple flow library 🖥️🖱️
Stars: ✭ 730 (+942.86%)
Mutual labels:  dataflow-programming
Mlr3pipelines
Dataflow Programming for Machine Learning in R
Stars: ✭ 96 (+37.14%)
Mutual labels:  dataflow-programming
Calvin Base
Calvin is an application environment that lets things talk to things, among other things.
Stars: ✭ 282 (+302.86%)
Mutual labels:  dataflow-programming
Dnai.Editor
Dnai Editor - Visual Scripting (Node Editor)
Stars: ✭ 117 (+67.14%)
Mutual labels:  dataflow-programming
Rete
JavaScript framework for visual programming and creating node editor
Stars: ✭ 7,156 (+10122.86%)
Mutual labels:  dataflow-programming
Javafbp
Java Implementation of Flow-Based Programming (FBP)
Stars: ✭ 138 (+97.14%)
Mutual labels:  dataflow-programming
Quickqanava
C++14 network/graph visualization library / Qt node editor.
Stars: ✭ 611 (+772.86%)
Mutual labels:  dataflow-programming
Raftlib
The RaftLib C++ library, streaming/dataflow concurrency via C++ iostream-like operators
Stars: ✭ 717 (+924.29%)
Mutual labels:  dataflow-programming
Nodeeditor
Qt Node Editor. Dataflow programming framework
Stars: ✭ 1,734 (+2377.14%)
Mutual labels:  dataflow-programming
Easylambda
distributed dataflows with functional list operations for data processing with C++14
Stars: ✭ 475 (+578.57%)
Mutual labels:  dataflow-programming
Persimmon
A visual dataflow programming language for sklearn
Stars: ✭ 174 (+148.57%)
Mutual labels:  dataflow-programming
Rpd
👌 A Minimal Engine for creating Node-Based Visual Programming User Interfaces
Stars: ✭ 370 (+428.57%)
Mutual labels:  dataflow-programming
Tfgraphviz
A visualization tool to show a TensorFlow's graph like TensorBoard
Stars: ✭ 40 (-42.86%)
Mutual labels:  dataflow-programming
graflow
A graph stream library for Javascript
Stars: ✭ 53 (-24.29%)
Mutual labels:  dataflow-programming
Chigraph
A visual systems language for beginners compiled using LLVM
Stars: ✭ 247 (+252.86%)
Mutual labels:  dataflow-programming
Dtcraft
A High-performance Cluster Computing Engine
Stars: ✭ 122 (+74.29%)
Mutual labels:  dataflow-programming

dflow

is a minimal Dataflow programming engine

Features

  • Implemented in TypeScript, available both on Node and Deno.
  • Expressive API.
  • Easily create nodes, just extending DflowNode class.
  • Example nodes catalog with basic JavaScript features. NOTA BENE: it is supposed that you implement your own nodes, for example node addition could be implemented using bigint or some floating point library, according to your needs.
  • Minimal internal type system. It is possible to connect an output of type T only to an input of type U, if and only if U includes T.
  • Graphic interface implemented with WebComponents. (demo here) (to be completed).

Installation

Node

With npm do

npm install dflow

Deno

Create an import_map.json file like this.

{
  "imports": {
    "dflow/": "https://unpkg.com/dflow/"
  }
}

Then you can import for example the following.

import { DflowHost } from "dflow/dflow.ts";
import { nodesCatalog } from "dflow/nodes/index.ts";

const dflow = new DflowHost({ nodesCatalog });

With deno you can then launch your script like this

deno run --importmap=import_map.json path/to/my/script.ts

It is recommended to point to a specific version, for instance to point to version 0.36 or whatever, then change your import map accordingly

{
  "imports": {
-    "dflow/": "https://unpkg.com/dflow/"
+    "dflow/": "https://unpkg.com/[email protected]/"
  }
}

Usage

This is a trivial sample graph that will run sin(π / 2) = 1 computation.

   ----------------
  | number = π / 2 |
   ----------------
   |
   |
   ---------
  | mathSin |
   ---------
    \
     \
     ------------
    | consoleLog |
     ------------

You can run the following code with any of the following:

  • launching command deno run https://raw.githubusercontent.com/fibo/dflow/main/examples/usage.js
  • cloning this repo and launching node examples/usage.js.

You should see a number 1 printed on output.

import { DflowHost } from "dflow";
import { nodesCatalog } from "dflow/nodes";

function rungraph() {
  // use builtin nodes
  const dflow = new DflowHost({ nodesCatalog });
  const catalog = dflow.nodesCatalog;

  // create nodes
  const numNode = dflow.newNode({
    kind: catalog.data.kind,
    // set numNode output to π / 2
    outputs: [{ data: Math.PI / 2 }],
  });
  const sinNode = dflow.newNode({
    kind: catalog.mathSin.kind,
  });
  const consoleLogNode = dflow.newNode({
    kind: catalog.consoleLog.kind,
  });

  // connect numNode to sinNode and sinNode to consoleLog
  dflow.connect(numNode).to(sinNode);
  dflow.connect(sinNode).to(consoleLogNode);

  // run graph
  dflow.run();
}

rungraph();

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].