SlideShare ist ein Scribd-Unternehmen logo
1 von 31
Downloaden Sie, um offline zu lesen
© 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

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Ähnlich wie Building Serverless Applications on the Apache OpenWhisk Platform

Ähnlich wie 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...
 

Mehr von Joe Sepi

Mehr von 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
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

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