easily - no server setup1 — Event Driven - respond to events by invoking functions — Functions are loaded and executed On Demand — BYO Programming Language — Use a hosted platform with AWS Lambda, Red Hat Cloud Functions2, etc… — or, be adventurous: build your own OpenWhisk install! 2 Red Hat's OpenShift based version of OpenWhisk 1 Once your serverless platform is running 2
any supported language including Node, Java, and Python — Use your functions for cool stuff — Event Triggers (e.g., call it when the contents of an S3 bucket change) — Chain them, composing small functions together for larger behavior 4
improve and expand upon Apache OpenWhisk, including the integration of our software portfolio — Recently contributed Kubernetes support upstream — Needed to run OpenWhisk on OpenShift — Created templates to simplify setup of OpenWhisk on OpenShift https:// github.com/projectodd/openwhisk-openshift — Working on AMQP Feed Support for OpenWhisk 5
loading OpenWhisk into OpenShift, which installs and configures all of the components: oc process -f https://git.io/openwhisk-template | oc create -f - 6
work with OpenWhisk, containing your function — Actions are stateless — Invoking an action generations an "activation id" that can be used to retrieve results — Actions can be chained together using sequences 7
sequences where the output of a function is the input to a subsequent function*. Let's use this function to change the input name before calling hello… def main(args): name = args.get('name', 'Nosuch Person').split(" ") name.reverse() return {'name': ", ".join(name)} * Make sure your output and input parameter names match up! 13
must already be created. Their names are the keys for the new sequence. With this setup, alphaName is called first, with its output being fed to helloPy. The response from OpenWhisk is the output of helloPy. $ wsk -i action create mungeHello --sequence alphaName,helloPy ok: created action mungeHello 15
a normal action: just call it by the sequence name: $ wsk -i action invoke --result mungeHello --param name "Brendan McAdams" { "greeting": "Hello McAdams, Brendan!" } 16
Triggers can be linked, via rules, to one or more actions — Example - A trigger named uploadPhoto might, when invoked, call several actions: nsfwFilter, generateThumbnail, and parseLocation — When the uploadPhoto trigger is called, the rule forwards the invocation parameters to each of the 3 linked actions. 17
functionality in a package — Packages bundle together Actions and Feeds, allowing us to bundle related code to deploy an event driven workflow — Feeds are similar to Triggers, but act as a stream receiving multiple event types — Packages allow us to bundle together related code to easily deploy a event driven workflow — Prebuilt packages include support for Alarms, RSS Feeds, Kafka Integration, and more. 18