Data Flows with Apache OpenWhisk and Composer
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
apps
functions
.gitignore
LICENSE
NOTICE
README.md

README.md

Data Flows with Apache OpenWhisk and Composer

This project contains samples how to write applications with Composer and Apache OpenWhisk.

While the functions in applications are stateless, the applications manage the state and are responsible how the data flows between the functions. This project contains a pattern how to handle data flows and how to convert data.

For details check out the two articles on my blog:

Setup

Prerequisites:

Run these commands to deploy the functions and the apps:

$ git clone https://github.com/nheidloff/openwhisk-data-flows.git
$ cd openwhisk-data-flows
$ bx login -a api.ng.bluemix.net -o yourBluemixOrg -s yourBluemixSpace
$ wsk package create composer-demo-nh
$ wsk action update composer-demo-nh/simple1 functions/simple1.js
$ wsk action update composer-demo-nh/simple2 functions/simple2.js
$ wsk action update composer-demo-nh/error functions/error.js
$ wsk action update composer-demo-nh/read-person-profile functions/read-person-profile.js
$ wsk action update composer-demo-nh/transform-read-person-profile functions/transform-read-person-profile.js
$ wsk action update composer-demo-nh/send-mail functions/send-mail.js
$ cd functions
$ npm install
$ zip -rq transformsendmail.zip transform-send-mail.js package.json node_modules
$ wsk action update composer-demo-nh/transform-send-mail --kind nodejs:8 transformsendmail.zip
$ cd ..
$ fsh app update composer-demo-nh/in-app-conversions apps/in-app-conversions.js
$ fsh app update composer-demo-nh/send-mail-app apps/send-mail-app.js

To run the applications invoke these commands:

$ fsh app invoke composer-demo-nh/in-app-conversions -p input-param1 input-param1-value
$ fsh app invoke composer-demo-nh/send-mail-app -p id nheidloff -p subject Hello