SlideShare a Scribd company logo
1 of 31
Download to read offline
© 2017 IBM Corporation l Interconnect 2017
IBM Bluemix

Apache
OpenWhisk
Building serverless applications
with Apache OpenWhisk
@Joe_Sepi
Joe Sepi

Developer Advocate, IBM
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Increasingfocusonbusinesslogic
Decreasing concern (and control) over stack implementation
Bare Metal
VM VM
VM
Virtual machines
Functions
Containers
Serverless developers focus more on code, less on infrastructure
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Monolithic
Application
Break-down into
microservices
Make each
microservice HA
Protect against
regional outage
Region A
Region B
Microservices can be hard to manage at scale
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Emerging workloads are a good fit for event-driven programming
Execute logic in response to database change
Perform analytics on sensor input messages
Provide cognitive computing via chatbots
Schedule tasks performed for a short time
Invoke autoscaled APIs and mobile backends
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Memory
allocated
(MB)
Time executing
(milliseconds)
Instances
executing
simultaneously
(count)
Cloud resource cost
better matches
business value gained
Not a silver bullet, but this can result in
substantial savings for many workloads
New cost models more accurately charge for usage
IBM Bluemix Apache OpenWhisk@Joe_Sepi
OpenWhisk is a
cloud platform that
executes code in
response to events
OpenWhisk enables these serverless, event-driven workloads
Provides serverless deployment and operations model
Runs code only on-demand on a per-request basis
Optimized utilization, fine-grained metering at any scale
Flexible, extensible, polyglot programming model
Open source and open ecosystem (Apache Incubator)
Ability to run in public, private, and hybrid models
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Results
Developers work with packages, triggers, actions, and rules
Package
(feed)
Packages provide integration
with external event sources
P
Trigger
(event)
T
Data sources define events
they emit as Triggers
Rule (map)R
Action
(function)
A
Developers map Actions
to Triggers via Rules
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Apache
Incubator
OpenWhisk is built on solid open source foundations
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Bluemix provides management, tooling, and monitoring
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Bluemix provides management, tooling, and monitoring
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Bluemix provides management, tooling, and monitoring
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Sign up for an account at bluemix.net, then download CLI
© 2017 IBM Corporation l Interconnect 2017
IBM Bluemix
Apache OpenWhisk programming model
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Developers work with triggers, actions, rules, and packages
Data sources define events
they emit as Triggers.
Developers map Actions to
Triggers via Rules.
Packages provide integration
with external services.
T
A
P
R
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Triggers
A class of events that can occurT
Social events
Data changes
Device readings Location updates
User input
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Actions
Code that runs in response to an event
(that is, an event handler)
A
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Actions
Can be written in a variety of languages, such as
JavaScript, Python, Java, and Swift
A
function main(params) {
return { message: 'Hello, ' + params.name + ' from ' + params.place };
};
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Actions
Or any other language by packaging with DockerA
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Actions
Can be composed to create sequences
that increase flexibility and foster reuse
A
AA := A1 + A2 + A3
AB := A2 + A1 + A3
AC := A3 + A1 + A2
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Rules
An association of a trigger to an action
in a many to many mapping.
R
R := T A
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Packages
A shared collection of triggers and actionsP
A
A read
write
T changes A translate A forecast
A post
T topic
Open
Source A myAction
T myFeed
Yours
T commit
Third
Party
© 2017 IBM Corporation l Interconnect 2017
IBM Bluemix
Apache OpenWhisk in action
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Bluemix Interface
IBM Bluemix Apache OpenWhisk@Joe_Sepi
The OpenWhisk execution model
Pool of actions
Swift DockerJS
Trigger
1
Running
action
Running
action
Running
action
3
OpenWhisk
Engine
2 A
T
AAA
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Demo 1: Your first trigger, action, and rule
$ wsk action create handler handler.js
github.com/IBM/openwhisk-action-trigger-rule
$ wsk action invoke --blocking handler
$ wsk trigger create every-20-seconds 
--feed /whisk.system/alarms/alarm 
--param cron "*/20 * * * * *" 
--param maxTriggers 30
$ wsk action invoke --blocking handler
$ wsk rule create 
invoke-periodically 
every-20-seconds 
handler
Trigger
1
Running
action
2
T
A
1. Cron syntax alarm
2. Log the current time
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Demo 2: Database change triggered action
github.com/IBM/openwhisk-cloudant-trigger
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Demo 3: HTTP API request triggered action
github.com/IBM/openwhisk-rest-api-trigger
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Other sample applications
github.com/openwhisk/awesome-openwhisk
Project OpenFridge:
Improving customer service
with event driven IoT
Project OpenChecks
github.com/openwhisk/awesome-openwhisk
github.com/apache/incubator-openwhisk-external-resources
IBM Bluemix Apache OpenWhisk@Joe_Sepi
Managed service on

IBM Bluemix
bluemix.net/openwhisk
Delivered as

Open source via Apache
openwhisk.org
Get started on Bluemix, or explore the open source project
github.com/openwhisk
slack.openwhisk.org
twitter.com/openwhisk
medium.com/openwhisk
IBM Bluemix Apache OpenWhisk@Joe_Sepi
See more sample apps on GitHub
github.com/ibm
Reach out to us team
developer.ibm.com/code/work-with-us
Or, work with an IBM Code developer advocate
© 2017 IBM Corporation l Interconnect 2017
IBM Bluemix

Apache
OpenWhisk
Building serverless applications
with Apache OpenWhisk
@Joe_Sepi
Joe Sepi

Developer Advocate, IBM

More Related Content

What's hot

Serverless architectures built on an open source platform
Serverless architectures built on an open source platformServerless architectures built on an open source platform
Serverless architectures built on an open source platformDaniel Krook
 
How to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 MinutesHow to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 MinutesNiklas Heidloff
 
Containers vs serverless - Navigating application deployment options
Containers vs serverless - Navigating application deployment optionsContainers vs serverless - Navigating application deployment options
Containers vs serverless - Navigating application deployment optionsDaniel Krook
 
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaJakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaNiklas Heidloff
 
Visual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlowVisual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlowNiklas Heidloff
 
OpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven appsOpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven appsDaniel Krook
 
The CNCF on Serverless
The CNCF on ServerlessThe CNCF on Serverless
The CNCF on ServerlessDaniel Krook
 
OpenWhisk: Event-driven Design
OpenWhisk: Event-driven DesignOpenWhisk: Event-driven Design
OpenWhisk: Event-driven DesignAltoros
 
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhiskCreate Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhisk Niklas Heidloff
 
OpenWhisk Deep Dive: the action container model
OpenWhisk Deep Dive: the action container modelOpenWhisk Deep Dive: the action container model
OpenWhisk Deep Dive: the action container modelPhilippe Suter
 
Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...
Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...
Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...VMware Tanzu
 
Building Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIsBuilding Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIsPostman
 
Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...
Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...
Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...VMware Tanzu
 
NodeJS Serverless backends for your frontends
NodeJS Serverless backends for your frontendsNodeJS Serverless backends for your frontends
NodeJS Serverless backends for your frontendsCarlos Santana
 
A DevOps State of Mind with Microservices, Containers and Kubernetes
A DevOps State of Mind with Microservices, Containers and KubernetesA DevOps State of Mind with Microservices, Containers and Kubernetes
A DevOps State of Mind with Microservices, Containers and KubernetesAll Things Open
 
OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016Stephen Fink
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...ServerlessConf
 
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
 SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUESVMware Tanzu
 
Shipping apps to eks with code pipeline and lambda functions
Shipping apps to eks with code pipeline and lambda functionsShipping apps to eks with code pipeline and lambda functions
Shipping apps to eks with code pipeline and lambda functionsŠtěpán Vraný
 
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studiesOpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studiesAlex Ellis
 

What's hot (20)

Serverless architectures built on an open source platform
Serverless architectures built on an open source platformServerless architectures built on an open source platform
Serverless architectures built on an open source platform
 
How to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 MinutesHow to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 Minutes
 
Containers vs serverless - Navigating application deployment options
Containers vs serverless - Navigating application deployment optionsContainers vs serverless - Navigating application deployment options
Containers vs serverless - Navigating application deployment options
 
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaJakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
 
Visual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlowVisual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlow
 
OpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven appsOpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven apps
 
The CNCF on Serverless
The CNCF on ServerlessThe CNCF on Serverless
The CNCF on Serverless
 
OpenWhisk: Event-driven Design
OpenWhisk: Event-driven DesignOpenWhisk: Event-driven Design
OpenWhisk: Event-driven Design
 
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhiskCreate Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
Create Alexa Skills using IBM Watson Conversation and Apache OpenWhisk
 
OpenWhisk Deep Dive: the action container model
OpenWhisk Deep Dive: the action container modelOpenWhisk Deep Dive: the action container model
OpenWhisk Deep Dive: the action container model
 
Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...
Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...
Deploying Applications Using Pivotal Cloud Foundry - Lars Rosenquist & David ...
 
Building Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIsBuilding Cloud-agnostic Serverless APIs
Building Cloud-agnostic Serverless APIs
 
Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...
Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...
Real-time Analysis of Data Processing Pipelines with Spring Cloud Data Flow a...
 
NodeJS Serverless backends for your frontends
NodeJS Serverless backends for your frontendsNodeJS Serverless backends for your frontends
NodeJS Serverless backends for your frontends
 
A DevOps State of Mind with Microservices, Containers and Kubernetes
A DevOps State of Mind with Microservices, Containers and KubernetesA DevOps State of Mind with Microservices, Containers and Kubernetes
A DevOps State of Mind with Microservices, Containers and Kubernetes
 
OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016OpenWhisk Under the Hood -- London Oct 16 2016
OpenWhisk Under the Hood -- London Oct 16 2016
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
 
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
 SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
SPRING BOOT DANS UN CONTAINER OUTILS ET PRATIQUES
 
Shipping apps to eks with code pipeline and lambda functions
Shipping apps to eks with code pipeline and lambda functionsShipping apps to eks with code pipeline and lambda functions
Shipping apps to eks with code pipeline and lambda functions
 
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studiesOpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
 

Similar to Building Serverless Applications on the Apache OpenWhisk Platform

Building serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhiskBuilding serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhiskDaniel Krook
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: KeynoteIBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: KeynoteOpenWhisk
 
OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017Carlos Santana
 
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical StrategyIBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical StrategyOpenWhisk
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsMoby Project
 
IBM Bluemix Talk at University College Cork (UCC)
IBM Bluemix Talk at University College Cork (UCC)IBM Bluemix Talk at University College Cork (UCC)
IBM Bluemix Talk at University College Cork (UCC)Sanjay Nayak
 
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...Animesh Singh
 
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM Z
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM ZNRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM Z
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM ZNRB
 
NRB - BE MAINFRAME DAY 2017 - IBM Z
NRB - BE MAINFRAME DAY 2017 - IBM ZNRB - BE MAINFRAME DAY 2017 - IBM Z
NRB - BE MAINFRAME DAY 2017 - IBM ZNRB
 
Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectArthur De Magalhaes
 
Serverless apps with OpenWhisk
Serverless apps with OpenWhiskServerless apps with OpenWhisk
Serverless apps with OpenWhiskDaniel Krook
 
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...OpenWhisk
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture Dev_Events
 
IBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM
 
OpenWhisk Introduction
OpenWhisk IntroductionOpenWhisk Introduction
OpenWhisk IntroductionIoana Baldini
 
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Dev_Events
 
Build a cloud native app with OpenWhisk
Build a cloud native app with OpenWhiskBuild a cloud native app with OpenWhisk
Build a cloud native app with OpenWhiskDaniel Krook
 
IBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
IBM Bluemix and Docker Guest Lecture at Cork Institute of TechnologyIBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
IBM Bluemix and Docker Guest Lecture at Cork Institute of TechnologySanjay Nayak
 
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...Frederic Lavigne
 

Similar to Building Serverless Applications on the Apache OpenWhisk Platform (20)

Building serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhiskBuilding serverless applications with Apache OpenWhisk
Building serverless applications with Apache OpenWhisk
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: KeynoteIBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
 
OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017
 
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical StrategyIBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
 
OpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functionsOpenWhisk and IBM cloud functions
OpenWhisk and IBM cloud functions
 
IBM Bluemix Talk at University College Cork (UCC)
IBM Bluemix Talk at University College Cork (UCC)IBM Bluemix Talk at University College Cork (UCC)
IBM Bluemix Talk at University College Cork (UCC)
 
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
 
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM Z
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM ZNRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM Z
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM Z
 
NRB - BE MAINFRAME DAY 2017 - IBM Z
NRB - BE MAINFRAME DAY 2017 - IBM ZNRB - BE MAINFRAME DAY 2017 - IBM Z
NRB - BE MAINFRAME DAY 2017 - IBM Z
 
Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere Connect
 
Serverless apps with OpenWhisk
Serverless apps with OpenWhiskServerless apps with OpenWhisk
Serverless apps with OpenWhisk
 
Apache OpenWhisk
Apache OpenWhiskApache OpenWhisk
Apache OpenWhisk
 
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture
 
IBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep DiveIBM Bluemix™ Architecture & Deep Dive
IBM Bluemix™ Architecture & Deep Dive
 
OpenWhisk Introduction
OpenWhisk IntroductionOpenWhisk Introduction
OpenWhisk Introduction
 
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk
 
Build a cloud native app with OpenWhisk
Build a cloud native app with OpenWhiskBuild a cloud native app with OpenWhisk
Build a cloud native app with OpenWhisk
 
IBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
IBM Bluemix and Docker Guest Lecture at Cork Institute of TechnologyIBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
IBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
 
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...
 

More from Joe Sepi

Get Into Open Source
Get Into Open SourceGet Into Open Source
Get Into Open SourceJoe Sepi
 
Acme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on BluemixAcme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on BluemixJoe Sepi
 
API-first World Domination
API-first World DominationAPI-first World Domination
API-first World DominationJoe Sepi
 
Quick and Tasty APIs: just add data!
Quick and Tasty APIs: just add data!Quick and Tasty APIs: just add data!
Quick and Tasty APIs: just add data!Joe Sepi
 
Micro Gateways are a Big Deal
Micro Gateways are a Big DealMicro Gateways are a Big Deal
Micro Gateways are a Big DealJoe Sepi
 
JS Journeyman
JS JourneymanJS Journeyman
JS JourneymanJoe Sepi
 
Front End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSFront End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSJoe Sepi
 

More from Joe Sepi (7)

Get Into Open Source
Get Into Open SourceGet Into Open Source
Get Into Open Source
 
Acme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on BluemixAcme Freight: Developing Microservices and APIs on Bluemix
Acme Freight: Developing Microservices and APIs on Bluemix
 
API-first World Domination
API-first World DominationAPI-first World Domination
API-first World Domination
 
Quick and Tasty APIs: just add data!
Quick and Tasty APIs: just add data!Quick and Tasty APIs: just add data!
Quick and Tasty APIs: just add data!
 
Micro Gateways are a Big Deal
Micro Gateways are a Big DealMicro Gateways are a Big Deal
Micro Gateways are a Big Deal
 
JS Journeyman
JS JourneymanJS Journeyman
JS Journeyman
 
Front End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJSFront End Dependency Management at CascadiaJS
Front End Dependency Management at CascadiaJS
 

Recently uploaded

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 

Building Serverless Applications on the Apache OpenWhisk Platform

  • 1. © 2017 IBM Corporation l Interconnect 2017 IBM Bluemix Apache OpenWhisk Building serverless applications with Apache OpenWhisk @Joe_Sepi Joe Sepi Developer Advocate, IBM
  • 2. IBM Bluemix Apache OpenWhisk@Joe_Sepi Increasingfocusonbusinesslogic Decreasing concern (and control) over stack implementation Bare Metal VM VM VM Virtual machines Functions Containers Serverless developers focus more on code, less on infrastructure
  • 3. IBM Bluemix Apache OpenWhisk@Joe_Sepi Monolithic Application Break-down into microservices Make each microservice HA Protect against regional outage Region A Region B Microservices can be hard to manage at scale
  • 4. IBM Bluemix Apache OpenWhisk@Joe_Sepi Emerging workloads are a good fit for event-driven programming Execute logic in response to database change Perform analytics on sensor input messages Provide cognitive computing via chatbots Schedule tasks performed for a short time Invoke autoscaled APIs and mobile backends
  • 5. IBM Bluemix Apache OpenWhisk@Joe_Sepi Memory allocated (MB) Time executing (milliseconds) Instances executing simultaneously (count) Cloud resource cost better matches business value gained Not a silver bullet, but this can result in substantial savings for many workloads New cost models more accurately charge for usage
  • 6. IBM Bluemix Apache OpenWhisk@Joe_Sepi OpenWhisk is a cloud platform that executes code in response to events OpenWhisk enables these serverless, event-driven workloads Provides serverless deployment and operations model Runs code only on-demand on a per-request basis Optimized utilization, fine-grained metering at any scale Flexible, extensible, polyglot programming model Open source and open ecosystem (Apache Incubator) Ability to run in public, private, and hybrid models
  • 7. IBM Bluemix Apache OpenWhisk@Joe_Sepi Results Developers work with packages, triggers, actions, and rules Package (feed) Packages provide integration with external event sources P Trigger (event) T Data sources define events they emit as Triggers Rule (map)R Action (function) A Developers map Actions to Triggers via Rules
  • 8. IBM Bluemix Apache OpenWhisk@Joe_Sepi Apache Incubator OpenWhisk is built on solid open source foundations
  • 9. IBM Bluemix Apache OpenWhisk@Joe_Sepi Bluemix provides management, tooling, and monitoring
  • 10. IBM Bluemix Apache OpenWhisk@Joe_Sepi Bluemix provides management, tooling, and monitoring
  • 11. IBM Bluemix Apache OpenWhisk@Joe_Sepi Bluemix provides management, tooling, and monitoring
  • 12. IBM Bluemix Apache OpenWhisk@Joe_Sepi Sign up for an account at bluemix.net, then download CLI
  • 13. © 2017 IBM Corporation l Interconnect 2017 IBM Bluemix Apache OpenWhisk programming model
  • 14. IBM Bluemix Apache OpenWhisk@Joe_Sepi Developers work with triggers, actions, rules, and packages Data sources define events they emit as Triggers. Developers map Actions to Triggers via Rules. Packages provide integration with external services. T A P R
  • 15. IBM Bluemix Apache OpenWhisk@Joe_Sepi Triggers A class of events that can occurT Social events Data changes Device readings Location updates User input
  • 16. IBM Bluemix Apache OpenWhisk@Joe_Sepi Actions Code that runs in response to an event (that is, an event handler) A
  • 17. IBM Bluemix Apache OpenWhisk@Joe_Sepi Actions Can be written in a variety of languages, such as JavaScript, Python, Java, and Swift A function main(params) { return { message: 'Hello, ' + params.name + ' from ' + params.place }; };
  • 18. IBM Bluemix Apache OpenWhisk@Joe_Sepi Actions Or any other language by packaging with DockerA
  • 19. IBM Bluemix Apache OpenWhisk@Joe_Sepi Actions Can be composed to create sequences that increase flexibility and foster reuse A AA := A1 + A2 + A3 AB := A2 + A1 + A3 AC := A3 + A1 + A2
  • 20. IBM Bluemix Apache OpenWhisk@Joe_Sepi Rules An association of a trigger to an action in a many to many mapping. R R := T A
  • 21. IBM Bluemix Apache OpenWhisk@Joe_Sepi Packages A shared collection of triggers and actionsP A A read write T changes A translate A forecast A post T topic Open Source A myAction T myFeed Yours T commit Third Party
  • 22. © 2017 IBM Corporation l Interconnect 2017 IBM Bluemix Apache OpenWhisk in action
  • 23. IBM Bluemix Apache OpenWhisk@Joe_Sepi Bluemix Interface
  • 24. IBM Bluemix Apache OpenWhisk@Joe_Sepi The OpenWhisk execution model Pool of actions Swift DockerJS Trigger 1 Running action Running action Running action 3 OpenWhisk Engine 2 A T AAA
  • 25. IBM Bluemix Apache OpenWhisk@Joe_Sepi Demo 1: Your first trigger, action, and rule $ wsk action create handler handler.js github.com/IBM/openwhisk-action-trigger-rule $ wsk action invoke --blocking handler $ wsk trigger create every-20-seconds --feed /whisk.system/alarms/alarm --param cron "*/20 * * * * *" --param maxTriggers 30 $ wsk action invoke --blocking handler $ wsk rule create invoke-periodically every-20-seconds handler Trigger 1 Running action 2 T A 1. Cron syntax alarm 2. Log the current time
  • 26. IBM Bluemix Apache OpenWhisk@Joe_Sepi Demo 2: Database change triggered action github.com/IBM/openwhisk-cloudant-trigger
  • 27. IBM Bluemix Apache OpenWhisk@Joe_Sepi Demo 3: HTTP API request triggered action github.com/IBM/openwhisk-rest-api-trigger
  • 28. IBM Bluemix Apache OpenWhisk@Joe_Sepi Other sample applications github.com/openwhisk/awesome-openwhisk Project OpenFridge: Improving customer service with event driven IoT Project OpenChecks github.com/openwhisk/awesome-openwhisk github.com/apache/incubator-openwhisk-external-resources
  • 29. IBM Bluemix Apache OpenWhisk@Joe_Sepi Managed service on
 IBM Bluemix bluemix.net/openwhisk Delivered as
 Open source via Apache openwhisk.org Get started on Bluemix, or explore the open source project github.com/openwhisk slack.openwhisk.org twitter.com/openwhisk medium.com/openwhisk
  • 30. IBM Bluemix Apache OpenWhisk@Joe_Sepi See more sample apps on GitHub github.com/ibm Reach out to us team developer.ibm.com/code/work-with-us Or, work with an IBM Code developer advocate
  • 31. © 2017 IBM Corporation l Interconnect 2017 IBM Bluemix Apache OpenWhisk Building serverless applications with Apache OpenWhisk @Joe_Sepi Joe Sepi Developer Advocate, IBM