OpenFaaS function composition
Last updated 3 years ago by ierceg .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @getlazy/faas-pipeline 
SYNC missed versions from official npm registry.


Complex OpenFaaS function composition

faas-pipeline offers executing of complex pipelines on top of OpenFaaS. It does this by:

  • Defining its own pipeline definition language
  • Defining its own protocol for data exchange between functions
  • Accepting pipeline definitions together with initial payload

faas-pipeline can:

  • Process payloads concurrently. This is called ~split. The result of ~split operation is an array of results of all functions that were executed concurrently.
  • Process payloads sequentially. This is called ~pipe. ~pipe operation results in a new payload based on its received payload.
  • Include optional parameters, beside payload, when invoking each function.
  • Send custom metrics for each invoked function to FaaS' built-in Prometheus.

These can be combined in any number of ways. For example:

		- ~split: # sends the received payload into fn1, fn2 and fn3
		- some-merging-fn: # this function acts on array of results from fn1, fn2 and fn3 with parameters of whatever1 and whatever2
			some-param: whatever1
			another-param: whatever2

Each compatible function must:

  • Expect to receive JSON with optional payload and params properties.
  • Return JSON with either error or result property and optional metrics property.

Execution stops on first error or when the entire pipeline has ran. Pipeline run thus either results in a free-form result or in a free-form error.

Current Tags

  • 1.0.0                                ...           latest (3 years ago)

1 Versions

  • 1.0.0                                ...           3 years ago
Maintainers (2)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (5)
Dev Dependencies (2)
Dependents (0)

Copyright 2014 - 2016 © taobao.org |