SlideShare a Scribd company logo
IBM Bluemix OpenWhisk
New York City Bluemix Meetup
Ioana Baldini
Research Staff Member, IBM Research
Please Note:
2
• IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole
discretion.
• Information regarding potential future products is intended to outline our general product direction and it should not be relied on in
making a purchasing decision.
• The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any
material, code or functionality. Information about potential future products may not be incorporated into any contract.
• The development, release, and timing of any future features or functionality described for our products remains at our sole
discretion.
• Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual
throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the
amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed.
Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
Agenda
• OpenWhisk in a nutshell
• What OpenWhisk is and how it works
• Usage scenarios
• OpenWhisk programming model
• OpenWhisk architecture
• Live demo
• Summary & Questions
3
OpenWhisk in a nutshell
Cloud platform to execute code in response to events
Whisk in a nutshell
Serverless deployment & operations model
We hide infrastructural and operational complexity allowing you to focus on coding:
You provide code – we execute it! – FaaS = Function as a Service
Optimal utilization, fair pricing at any scale
We provide you exactly the resources you need – neither less nor more - and charge
you only for code really being executed
Flexible programming model & powerful tooling
We support multiple languages (incl. Swift) and custom logic via docker containers, plus
tools to declaratively chain your code snippets
Open & open ecosysten
Open to run anywhere to avoid any kind of vendor lock-in and to accelerate the
development of a powerful ecosystem
Execute app logic in response to data triggers
Execute app logic in response to sensed data (IoT)
Execute app logic in response to cognitive trends
Execute app logic in response to scheduled tasks
Provide easy server-side backend for mobile app
Typical Scenarios
OpenWhisk: Another way to build apps…
BYOC: Bring Your Own Code
Ease of getting started Full stack Control
OpenWhisk
Event-driven apps
deployed in a
serverless
environment
Instant
Runtimes
App-centric
runtimes
based on
Cloud Foundry
IBM Containers
Portable delivery
of your app
without having to
manage an OS
Virtual Machines
Most flexibility
and control
with VMs
Meet Dave & his team
Dave is lead architect of an online photo community and marketplace
– Operate a platform to
– share and photos
– edit and categorize photos via manual tagging
8
Meet Dave & his team
To be competitive, Dave‘s team need to continously add innovative features
– Idea: Provide a mobile app that allows to automatically sharpen, noise-
reduce and semantically tag photos being uploaded
9
Design requirements
Dave & his team want to focus on developing value-adding code
instead of low-level infrastructural & operational details
OpenWhisk solution
 Flexible programming environment
 Open ecosystem of building blocks
 Outsource computing tasks to the cloud
 No servers to manage or maintain
 Automatic scaling with load
 Built-in fault tolerance
 Pay as you go
Some usage Scenarios
OpenWhisk can help power
various mobile, web and IoT app
usecases by simplifying the
programming model of
orchestrating various services
using events without a dedicated
backend.
Digital app workloads Big Data/Analytics pipeline
Complex data pipeline for Big
Data/Analytics tasks can be scripted
using changes in data services or
streams for near real-time analytics
and feedback.
DevOps & infrastructure as code
OpenWhisk can be used to
automate DevOps pipeline based
on events triggered from
successful builds or completed
staging or a go-live event.
Micro-Services builder
Whisk can be used to easily build
micro-services given the footprint
and programming model desired by
micro services
OpenWhisk: How does it work?
Incoming HTTP request, e.g.
HTTP GET
coolapp.com/customers
11
Invoke OpenWhisk
action getCustomers
Browser
Mobile App
Web App
Variety of
languages
Variety of
languages
22
JS Swift Docker …
OpenWhisk
OpenWhisk: How does it work?
Event
Providers
Cloudant
Git
Weather
…
Trigger execution of associated
OpenWhisk action
22
…
JS Swift Docker …
Data event occurs, e.g. commit on a Git
repository, CRUD operation on Cloudant
11
OpenWhisk
Programming model
Services define the events they emit as triggers, and developers
associate the actions to handle the events via rules
TT AA RR
Programming model
Trigger: A class of events that can happenTT
Programming model
Actions: Code that runs in response to an event (event-handler)AA
Programming model
Actions: Multi-runtime support, e.g. JavaScript, Python, Java, SwiftAA
function main(msg) {
return { message: 'Hello, ' + msg.name + ' from ' + msg.place };
};
Programming model
Actions: Multi-runtime support, e.g. Docker containersAA
Programming model
Actions: Can be chained to create sequences to increase flexibility and
foster reuse
AA
AA
AA := A1
A1 + A2
A2 + A3
A3
AB
AB := A2
A2 + A1
A1 + A3
A3
AC
AC := A3
A3 + A1
A1 + A2
A2
Programming model
Rules: An association of a trigger and an actionRR
RR := TT AA
Programming model
Packages: A shared collection of triggers and actionsPP
AA
AA read
write
TT changes AA translate AA forecast
AA post
TT topic
Open
Source AA myAction
TT myFeed
Yours
TT commit
Third
Party
OpenWhisk Core – System Architecture
23
Edge
Proxy
Log
Forwarder
UI
Consul
Registrator
Log Forwarder
EntitlementController
E
Registrator
Log Forwarder
Invoker
Master
Live demo
Slack Slash Command: /wsk
/wsk [action-name [parameter-name parameter-value]*]
/wsk hello_world message Ioana
Architecture
async
blocking
wsk slash command api proxy action dispatch
action
slack response
Slack Slash Command
APIGee API Proxy
OpenWhisk Action Dispatch
Summary
• OpenWhisk…
– allows you to focus on developing value-adding code
– provides you with a flexible programming model for small agile teams
– provides you with access to an open ecosystem of building blocks
– allows you to compose powerful solutions using modern abstraction
and chaining
– allows you to share and reuse what you have build
– allows you to outsource load & calculation intensive tasks
– only charges you for what you really use
– is available as open solution in which you can participate
Summary
• What else have we seen & learnt?
– Actions are executed, blocking or non-blocking, in response to events
– Actions can be in Node, Swift, or even Docker containers to execute
custom logic… and there is more to come
– Actions can even be chained to compose powerful solutions
– Out of the box support for event sources such as Cloudant and Github
as well as scheduled actions
– Tooling comprised of CLI, REST API, and iOS SDK
• What have we not seen? Complexity!
Questions?
Notices and Disclaimers
33
Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission
from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of
initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS
DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE
USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM
products and services are warranted according to the terms and conditions of the agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those
customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries
in which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials
and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant
or their specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and
interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such
laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law
Notices and Disclaimers Con’t.
34
Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not
tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products.
Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the
ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The provision of the information contained h erein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other
intellectual property right.
IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®,
FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG,
Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®,
PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®,
StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business
Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM
trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
Thank You
Your Feedback is Important!
http://openwhisk.org
ioana@us.ibm.com
Backup
OpenWhisk: Comparison to traditional
models
• OpenWhisk
– Introduces event programming model
– Charges only for what is used
– Auto-scales Pool of actions
Swift DockerJS
Trigger
11
Running
action
Running
action
Running
action
33
Deploy action within millisecs,
run it,
free up resources
OpenWhisk
Engine
22
Marchitecture
Trigger
Package
Feed
Package
Feed
Package
Feed
Package
Feed
REST
CLI iOS SDK
CRUD triggers, actions, and rules
Invoke actions
UI
Action
NodeJS
Action
Swift
Action
Docker
Rule
Rule
Rule
Action
NodeJS
Action
Docker
Service ecosytem
Bluemix services
3rd party services
Self-enabled services
Chain Chain Invoke
39
Edge
Proxy
Log
Forwarder
UI
Consul
Registrator
Log Forwarder
EntitlementController
E
Registrator
Log Forwarder
Invoker
Master

More Related Content

What's hot (19)

PPT
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
OpenWhisk
 
PPTX
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
OpenWhisk
 
PDF
Serverless apps with OpenWhisk
Daniel Krook
 
PPTX
OpenWhisk: Event-driven Design
Altoros
 
PPTX
2015 03-11_todd-fritz_devnexus_2015
Todd Fritz
 
PDF
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
OpenWhisk
 
PDF
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
Animesh Singh
 
PDF
Build a cloud native app with OpenWhisk
Daniel Krook
 
PDF
Bluemix 로 접근하는 DevOps - Cognitive Cloud Connect
Jin Gi Kong
 
PDF
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
OpenWhisk
 
PDF
Serverless architectures built on an open source platform
Daniel Krook
 
PDF
Making Friendly Microservices by Michele Titlol
Docker, Inc.
 
PDF
Serverless in production (O'Reilly Software Architecture)
Yan Cui
 
PDF
Building serverless applications with Apache OpenWhisk and IBM Cloud Functions
Daniel Krook
 
PPTX
FLUX - Crash Course in Cloud 2.0
Mark Hinkle
 
PPTX
OpenWhisk on IBM Bluemix for the Industrial Internet
Altoros
 
PDF
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
OpenWhisk
 
PDF
Serverless APIs with Apache OpenWhisk
Daniel Krook
 
PDF
ADDO 2020: "The past, present, and future of cloud native API gateways"
Daniel Bryant
 
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
OpenWhisk
 
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
OpenWhisk
 
Serverless apps with OpenWhisk
Daniel Krook
 
OpenWhisk: Event-driven Design
Altoros
 
2015 03-11_todd-fritz_devnexus_2015
Todd Fritz
 
IBM Bluemix OpenWhisk: IBM InterConnect 2017, Las Vegas, USA: Technical Strategy
OpenWhisk
 
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
Animesh Singh
 
Build a cloud native app with OpenWhisk
Daniel Krook
 
Bluemix 로 접근하는 DevOps - Cognitive Cloud Connect
Jin Gi Kong
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
OpenWhisk
 
Serverless architectures built on an open source platform
Daniel Krook
 
Making Friendly Microservices by Michele Titlol
Docker, Inc.
 
Serverless in production (O'Reilly Software Architecture)
Yan Cui
 
Building serverless applications with Apache OpenWhisk and IBM Cloud Functions
Daniel Krook
 
FLUX - Crash Course in Cloud 2.0
Mark Hinkle
 
OpenWhisk on IBM Bluemix for the Industrial Internet
Altoros
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
OpenWhisk
 
Serverless APIs with Apache OpenWhisk
Daniel Krook
 
ADDO 2020: "The past, present, and future of cloud native API gateways"
Daniel Bryant
 

Viewers also liked (12)

PPT
IBM Bluemix Openwhisk
Sonia Baratas Alves
 
PDF
ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...
DynamicInfraDays
 
PPTX
OpenWhisk: Where Did My Servers Go?
Carlos Santana
 
PDF
Serverless Framework Intro
Nikolaus Graf
 
PDF
서버리스(Serverless) 프레임웍 비교 - ClaudiaJS와 Chalice를 중심으로 (윤석찬)
AWSKRUG - AWS한국사용자모임
 
PDF
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
PPTX
Domain driven design
Mustafa Dağdelen
 
PDF
AWS Lambda and Serverless framework: lessons learned while building a serverl...
Luciano Mammino
 
PPTX
Node.js'e Hızlı Bir Bakış
Mustafa Dağdelen
 
PPTX
Introduction Node.js
Erik van Appeldoorn
 
PDF
NodeJS for Beginner
Apaichon Punopas
 
PPTX
Introduction to Node.js
Vikash Singh
 
IBM Bluemix Openwhisk
Sonia Baratas Alves
 
ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...
DynamicInfraDays
 
OpenWhisk: Where Did My Servers Go?
Carlos Santana
 
Serverless Framework Intro
Nikolaus Graf
 
서버리스(Serverless) 프레임웍 비교 - ClaudiaJS와 Chalice를 중심으로 (윤석찬)
AWSKRUG - AWS한국사용자모임
 
Node.js and How JavaScript is Changing Server Programming
Tom Croucher
 
Domain driven design
Mustafa Dağdelen
 
AWS Lambda and Serverless framework: lessons learned while building a serverl...
Luciano Mammino
 
Node.js'e Hızlı Bir Bakış
Mustafa Dağdelen
 
Introduction Node.js
Erik van Appeldoorn
 
NodeJS for Beginner
Apaichon Punopas
 
Introduction to Node.js
Vikash Singh
 
Ad

Similar to OpenWhisk Introduction (20)

PPTX
RTP Bluemix Meetup April 20th 2016
Tom Boucher
 
PDF
Containerize, PaaS, or Go Serverless!?
Phil Estes
 
PDF
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Animesh Singh
 
PDF
Serverless Architectures in Banking: OpenWhisk on IBM Bluemix at Santander
Daniel Krook
 
PPTX
Serverless Apps with Open Whisk
Dev_Events
 
PDF
Openwhisk - Colorado Meetups
Upkar Lidder
 
PPTX
IBM Bluemix Paris Meetup #22-20170315 Meetup @VillagebyCA - Serverless & Open...
IBM France Lab
 
PPT
The Bluemix Quadruple Threat
Ram Vennam
 
PPTX
OpenWhisk
Juan Pablo Genovese
 
PPTX
OpenWhisk Part 1 Research Data at Interconnect 2017
Perry Cheng
 
PDF
Keynote: Trends in Modern Application Development - Gilly Dekel, IBM
Codemotion Tel Aviv
 
PDF
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
ServerlessConf
 
PDF
NodeJS Serverless backends for your frontends
Carlos Santana
 
PPTX
Your PaaS to DevOps
Roberto Pozzi
 
PPTX
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...
Vidyasagar Machupalli
 
PPTX
Jef Verelst - Smals Open to a shift - Infosecurity.be
Smals
 
PPTX
Cloud Roundtable | Your PaaS to DevOps
Codemotion
 
PDF
Learning Apache OpenWhisk Developing Open Serverless Solutions 1st Edition Mi...
goistcrilern
 
PDF
The 'Serverless' Paradigm, OpenWhisk and FIWARE
FIWARE
 
PDF
The App Evolution
Dev_Events
 
RTP Bluemix Meetup April 20th 2016
Tom Boucher
 
Containerize, PaaS, or Go Serverless!?
Phil Estes
 
Introducing Cloud Native, Event Driven, Serverless, Micrsoservices Framework ...
Animesh Singh
 
Serverless Architectures in Banking: OpenWhisk on IBM Bluemix at Santander
Daniel Krook
 
Serverless Apps with Open Whisk
Dev_Events
 
Openwhisk - Colorado Meetups
Upkar Lidder
 
IBM Bluemix Paris Meetup #22-20170315 Meetup @VillagebyCA - Serverless & Open...
IBM France Lab
 
The Bluemix Quadruple Threat
Ram Vennam
 
OpenWhisk Part 1 Research Data at Interconnect 2017
Perry Cheng
 
Keynote: Trends in Modern Application Development - Gilly Dekel, IBM
Codemotion Tel Aviv
 
Andreas Nauerz and Michael Behrendt - Event Driven and Serverless Programming...
ServerlessConf
 
NodeJS Serverless backends for your frontends
Carlos Santana
 
Your PaaS to DevOps
Roberto Pozzi
 
Create Event-Driven iOS Apps Using IBM Mobile Foundation, OpenWhisk Runtime a...
Vidyasagar Machupalli
 
Jef Verelst - Smals Open to a shift - Infosecurity.be
Smals
 
Cloud Roundtable | Your PaaS to DevOps
Codemotion
 
Learning Apache OpenWhisk Developing Open Serverless Solutions 1st Edition Mi...
goistcrilern
 
The 'Serverless' Paradigm, OpenWhisk and FIWARE
FIWARE
 
The App Evolution
Dev_Events
 
Ad

Recently uploaded (20)

PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
PDF
July Patch Tuesday
Ivanti
 
PDF
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
July Patch Tuesday
Ivanti
 
SFWelly Summer 25 Release Highlights July 2025
Anna Loughnan Colquhoun
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 

OpenWhisk Introduction

  • 1. IBM Bluemix OpenWhisk New York City Bluemix Meetup Ioana Baldini Research Staff Member, IBM Research
  • 2. Please Note: 2 • IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. • Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. • The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. • The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. • Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
  • 3. Agenda • OpenWhisk in a nutshell • What OpenWhisk is and how it works • Usage scenarios • OpenWhisk programming model • OpenWhisk architecture • Live demo • Summary & Questions 3
  • 4. OpenWhisk in a nutshell Cloud platform to execute code in response to events
  • 5. Whisk in a nutshell Serverless deployment & operations model We hide infrastructural and operational complexity allowing you to focus on coding: You provide code – we execute it! – FaaS = Function as a Service Optimal utilization, fair pricing at any scale We provide you exactly the resources you need – neither less nor more - and charge you only for code really being executed Flexible programming model & powerful tooling We support multiple languages (incl. Swift) and custom logic via docker containers, plus tools to declaratively chain your code snippets Open & open ecosysten Open to run anywhere to avoid any kind of vendor lock-in and to accelerate the development of a powerful ecosystem
  • 6. Execute app logic in response to data triggers Execute app logic in response to sensed data (IoT) Execute app logic in response to cognitive trends Execute app logic in response to scheduled tasks Provide easy server-side backend for mobile app Typical Scenarios
  • 7. OpenWhisk: Another way to build apps… BYOC: Bring Your Own Code Ease of getting started Full stack Control OpenWhisk Event-driven apps deployed in a serverless environment Instant Runtimes App-centric runtimes based on Cloud Foundry IBM Containers Portable delivery of your app without having to manage an OS Virtual Machines Most flexibility and control with VMs
  • 8. Meet Dave & his team Dave is lead architect of an online photo community and marketplace – Operate a platform to – share and photos – edit and categorize photos via manual tagging 8
  • 9. Meet Dave & his team To be competitive, Dave‘s team need to continously add innovative features – Idea: Provide a mobile app that allows to automatically sharpen, noise- reduce and semantically tag photos being uploaded 9
  • 10. Design requirements Dave & his team want to focus on developing value-adding code instead of low-level infrastructural & operational details
  • 11. OpenWhisk solution  Flexible programming environment  Open ecosystem of building blocks  Outsource computing tasks to the cloud  No servers to manage or maintain  Automatic scaling with load  Built-in fault tolerance  Pay as you go
  • 12. Some usage Scenarios OpenWhisk can help power various mobile, web and IoT app usecases by simplifying the programming model of orchestrating various services using events without a dedicated backend. Digital app workloads Big Data/Analytics pipeline Complex data pipeline for Big Data/Analytics tasks can be scripted using changes in data services or streams for near real-time analytics and feedback. DevOps & infrastructure as code OpenWhisk can be used to automate DevOps pipeline based on events triggered from successful builds or completed staging or a go-live event. Micro-Services builder Whisk can be used to easily build micro-services given the footprint and programming model desired by micro services
  • 13. OpenWhisk: How does it work? Incoming HTTP request, e.g. HTTP GET coolapp.com/customers 11 Invoke OpenWhisk action getCustomers Browser Mobile App Web App Variety of languages Variety of languages 22 JS Swift Docker … OpenWhisk
  • 14. OpenWhisk: How does it work? Event Providers Cloudant Git Weather … Trigger execution of associated OpenWhisk action 22 … JS Swift Docker … Data event occurs, e.g. commit on a Git repository, CRUD operation on Cloudant 11 OpenWhisk
  • 15. Programming model Services define the events they emit as triggers, and developers associate the actions to handle the events via rules TT AA RR
  • 16. Programming model Trigger: A class of events that can happenTT
  • 17. Programming model Actions: Code that runs in response to an event (event-handler)AA
  • 18. Programming model Actions: Multi-runtime support, e.g. JavaScript, Python, Java, SwiftAA function main(msg) { return { message: 'Hello, ' + msg.name + ' from ' + msg.place }; };
  • 19. Programming model Actions: Multi-runtime support, e.g. Docker containersAA
  • 20. Programming model Actions: Can be chained to create sequences to increase flexibility and foster reuse AA AA AA := A1 A1 + A2 A2 + A3 A3 AB AB := A2 A2 + A1 A1 + A3 A3 AC AC := A3 A3 + A1 A1 + A2 A2
  • 21. Programming model Rules: An association of a trigger and an actionRR RR := TT AA
  • 22. Programming model Packages: A shared collection of triggers and actionsPP AA AA read write TT changes AA translate AA forecast AA post TT topic Open Source AA myAction TT myFeed Yours TT commit Third Party
  • 23. OpenWhisk Core – System Architecture 23 Edge Proxy Log Forwarder UI Consul Registrator Log Forwarder EntitlementController E Registrator Log Forwarder Invoker Master
  • 25. Slack Slash Command: /wsk /wsk [action-name [parameter-name parameter-value]*] /wsk hello_world message Ioana
  • 26. Architecture async blocking wsk slash command api proxy action dispatch action slack response
  • 30. Summary • OpenWhisk… – allows you to focus on developing value-adding code – provides you with a flexible programming model for small agile teams – provides you with access to an open ecosystem of building blocks – allows you to compose powerful solutions using modern abstraction and chaining – allows you to share and reuse what you have build – allows you to outsource load & calculation intensive tasks – only charges you for what you really use – is available as open solution in which you can participate
  • 31. Summary • What else have we seen & learnt? – Actions are executed, blocking or non-blocking, in response to events – Actions can be in Node, Swift, or even Docker containers to execute custom logic… and there is more to come – Actions can even be chained to compose powerful solutions – Out of the box support for event sources such as Cloudant and Github as well as scheduled actions – Tooling comprised of CLI, REST API, and iOS SDK • What have we not seen? Complexity!
  • 33. Notices and Disclaimers 33 Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM. U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM. Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided. Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice. Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary. References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business. Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation. It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law
  • 34. Notices and Disclaimers Con’t. 34 Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The provision of the information contained h erein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right. IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®, FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
  • 35. Thank You Your Feedback is Important! http://openwhisk.org [email protected]
  • 37. OpenWhisk: Comparison to traditional models • OpenWhisk – Introduces event programming model – Charges only for what is used – Auto-scales Pool of actions Swift DockerJS Trigger 11 Running action Running action Running action 33 Deploy action within millisecs, run it, free up resources OpenWhisk Engine 22
  • 38. Marchitecture Trigger Package Feed Package Feed Package Feed Package Feed REST CLI iOS SDK CRUD triggers, actions, and rules Invoke actions UI Action NodeJS Action Swift Action Docker Rule Rule Rule Action NodeJS Action Docker Service ecosytem Bluemix services 3rd party services Self-enabled services Chain Chain Invoke

Editor's Notes

  • #4: Today I’m going to present an overview of OpenWhisk, discuss what it is, how can you use it, present the programming model it introduces and if the demo gods approve, I’ll conclude with a live demo of an integration of Slack and OpenWhisk.
  • #5: How many of you have heard of serverless computing? How many of you think they run a function in a serverless platform? OpenWhisk is a cloud platform that allows users to execute code in response to events. It really is an event-based distributed system.
  • #6: From the user’s point of view, the deployment of the code is serverless. That doesn’t mean that there are no servers, it means that the user doesn’t have to worry about that. All the user has to do is to provide a function and specify the event that should trigger the execution of the function. From that point of view, I find severless confusing, so I much prefer the “FaaS” name So today we’ll try to understand what’s the fuss about FaaS One of the most important characteristics of such a model of computation is that autoscaling comes for free. The system is responsible with allocating resources on behalf of the user to run the code in response to the demand load. In addition, the pricing follows a “pay-as-you-go” model, which means that the user pays for the amount of time the code executed. This is unlike traditional cloud computation where you have to pay for as long as the server is up and running, irrespective of whether there is load or not, so you pay even when your server is sitting idle. Such FaaS platforms offer a flexible programming model as they support multiple languages and ways to compose the code in sophisticated patterns. In addition, something that is unique to OpenWhisk is that the project is open-source. This is great as it avoids vendor-lockin and it also leverages the power of the community.
  • #7: FaaS platforms ca be used in many scenarios. As I mentioned, these systems are event-based systems, so one of the most important aspect is the source of events. You can imagine writing applications that react to events from database events, IoT devices, financial trends or any other analytics-based trends. You can even schedule periodic tasks. Last but not least, OpenWhisk can be used to move the backend logic of mobile apps out of the mobile device. As we support Swift, mobile developers can do this migration gradually, and working in the same ecosystem.
  • #8: How does OpenWhisk fit in the Bluemix line of services? OpenWhisk is one of the Compute options offered by Bluemix. At one end of the spectrum, you can use VMs which offers full control over the computational stack. You can also use containers as the unit of deployment. There is also the option of deploying instant runtimes. OpenWhisk is really the easiest and lowest entry-point, where the unit of deployment is really a function.
  • #9: Let’s think from the perspective of a small startup. Meet Dave and his team. They’re all working on a photo community and marketplace and they operate a platform to show off your photos and edit and tag photos.
  • #10: To stay competitive, Dave and his team need to come up with features that make their products appealing and easy to use. In this context, they come up with the idea of providing a mobile app that allows users to quickly apply some standard filters, upload the photos and automatically tag them given their content.
  • #11: Dave would really like to focus on the core app logic instead of thinking of launching servers, maintaining and managing them. So Dave is looking into serverless platforms, specially OpenWhisk.
  • #12: Let’s stop and think what an OpenWhisk solution really means. Each component of the app can be written in a different language, the best language for the task at hand. Some of the building blocks can be used directly as off-the-shelf functions either offered in the OpenWhisk catalog or in the opensource community. The computational tasks are outsourced to the cloud, which makes the mobile app more energy-efficient and it won’t drain your battery when using it. Plus, there are no servers to worry about, the scaling of the app is done automatically depending to the current demand. And fault-tolerance comes for free, while you’re paying only for resources you’re using. Sounds like a great solution!
  • #13: As you can probably guess at this point, there are various scenarios that fit the OW model of programming. OW can power your IoT application or any mobile application. You can use OW to coordinate tasks in a big data/analytics pipeline. You can even automate certain DevOps tasks using events and actions. In general, any application that is deployed following a microservices-based architecture, in which microservices can be individually developed and deployed can be moved to a FaaS platform by moving the microservices to a function-based model of execution.
  • #14: So, how does OW work? Each function that is submitted to the system gets associated with a rest endpoint, so you can invoke a function directly by performing an http request. Such a request can be emitted by a mobile device, a browser, a web app.
  • #15: Alternatively, the system allows to configure events to trigger the invocation of an OW action. For example, an update to a Cloudant database can trigger the invocation of an action/function. Or every time someone commits something to a Git repository, an action gets executed.
  • #16: Let’s talk in a bit more detail about the programming model. There are three main entities in OW: triggers, actions and rules.
  • #17: A trigger is associated with a class of events that can happen. We’ve seen some examples before: updates to databases, twets, messages, IoT signals, etc.
  • #18: Functions in OW are called Actions and they represent the code that runs in response to events. You can think of functions as event handlers.
  • #19: A very simple hello world example is on this slide, written in JS. We support several languages in OW, such as JS, Python, Java and Swift.
  • #20: In addition, you can package any application written in your favorite language in a docker image, and as long as it follows a certain api, our system can run that too. So you’re only limited by your imagination 
  • #21: Actions can be chained and executed in a sequence, such that you can reuse pieces of code and combine them according to the needs of your application.
  • #22: Rules are associations between triggers and actions. Given the right set of rules you can have same trigger triggering multiple actions or the same action being triggered by multiple events.
  • #23: Finally, actions and triggers can be bundled up in packages that can be shared using the OW catalog. You can decide access control features at the package level. Also packages have parameters that can be bound to default values and sent to each action in the package.
  • #24: I’d like to briefly show a simplified version of how the OpenWhisk guts look like. We have an edge machine that received incoming requests either to a proxy from the cli or from the UI. These requests are forwarded to the master mind in OW, which is the controller. The controller is responsible with ensuring the user is a valid OW user and has the right to perform the requested operation. This is done using a separate service, called the entitlement service. In addition, the controller is responsible with dispatching the actions to be executed to the execution engines. There are several such slaves. Each of them contains a component called the invoker which is responsible with managing resources for in-flight actions. There are several optimizations that the invoker applies to make sure the activation time (the time between an event triggering and the start of the execution of the user code) is as low as possible. But this is an entirely different talk in its own right.
  • #25: Are there any questions now? If not, I’d like to show a simple demo. This demo integrates a slack slash command with whisk.