SlideShare a Scribd company logo
1 of 39
Download to read offline
OpenWhisk
Cloud native • Serverless • Event driven • Microservices
@DanielKrook • IBM Cloud
@DanielKrookOpenWhisk.org
What you will learn today
• How cloud computing has recently evolved to enable
developers to write cloud native applications better,
faster, and cheaper using serverless technology.
• How OpenWhisk provides an open source platform to
enable cloud native, serverless, event driven applications.
@DanielKrookOpenWhisk.org
What makes serverless,
event driven computing
so compelling?
@DanielKrookOpenWhisk.org
Cloud evolution means developers can write apps better, faster, and cheaper
Bare
metal
Virtual
machines
Containers
Functions
Decreasing  concern  (and  control)  over  stack  implementation
Increasing  focus  on  business  logic
@DanielKrookOpenWhisk.org
Newer workloads are a better fit for event driven programming
Execute app logic in response to database triggers
Execute app logic in response to sensor data
Execute app logic in response to cognitive trends
Execute app logic in response to scheduled tasks
Provide easy server-side backend for mobile app
@DanielKrookOpenWhisk.org
Problem: It’s expensive to scale microservices
Explosion in number of
containers / processes:
1. Increase of infrastructure
cost footprint
2. Increase of operational
management cost and
complexity
Region BRegion A
Break-­down  into  microservices
Make  each  micro  service  HA
Protect  against  regional  outages
Monolithic application
@DanielKrookOpenWhisk.org
Serverless can handle many cloud native app 12 Factors
I Codebase Handled by developer (Manage versioning of functions on their own)
II Dependencies Handled by developer, facilitated by serverless platform (Runtimes and packages)
III Config Handled by platform (Environment variables or injected event parameters)
IV Backing services Handled by platform (Connection information injected as event parameters)
V Build, release, run Handled by platform (Deployed resources are immutable and internally versioned)
VI Processes Handled by platform (Single stateless containers often used)
VII Port binding Handled by platform (Actions or functions are automatically discovered)
VIII Concurrency Handled by platform (Process model is hidden and scales in response to demand)
IX Disposability Handled by platform (Lifecycle is hidden from the user, fast startup and elastic scale is prioritized)
X Dev/prod parity Handled by developer (The developer is the deployer. Scope of what differs is narrower)
XI Logs Handled by platform (Developer writes to console.log, platform handles log streaming)
XII Admin processes Handled by developer (No distinction between one off processes and long running)
@DanielKrookOpenWhisk.org
Problem: Programming and pricing models aren’t efficient
Continuous polling needed in the absence
of an event driven programming model
Charged for resources, even when idle
Worries persist about capacity management
Swif
t
Application
Container VMCF
2
Polling
1b
Request
1a
@DanielKrookOpenWhisk.org
Cost model offers a better match between app and resources
Applications charged by compute
time (millisecond) rather than
reserved memory (GB/hour).
While many applications must still be deployed in a daemon
model, serverless provides an alternative that can mean
substantial cost savings for a variety of event driven workloads.
Greater linkage between cloud
resources used and business
operations executed.
@DanielKrookOpenWhisk.org
Technological and business factors make serverless compelling
Serverless platforms and frameworks are gaining traction
Cost models getting more granular and efficient
Growth of event driven workloads that need automated scale
Platforms evolving to facilitate cloud native design for developers
@DanielKrookOpenWhisk.org
Introducing
OpenWhisk
@DanielKrookOpenWhisk.org
OpenWhisk in a nutshell
OpenWhisk is a cloud platform
that executes code
in response to events
OpenWhisk
@DanielKrookOpenWhisk.org
OpenWhisk is different than other hosted services
Serverless deployment and operations model
Optimized utilization, fine grained pricing at any scale
Flexible programming model with powerful tooling
Open source and open ecosystem
Ability to run in public, private, and hybrid models
OpenWhisk
@DanielKrookOpenWhisk.org
OpenWhisk supports many growing workloads
OpenWhisk can help power
various mobile, web and IoT app
use cases by simplifying the
programming model of
orchestrating various services
using events without a dedicated
backend.
Digital app workloads Big Data/Analytics pipeline
Complex data pipelines for Big
Data/Analytics tasks can be scripted
using changes in data services or
streams for near real-time analytics
and feedback.
DevOps and infrastructure as code
OpenWhisk can be used to
automate DevOps pipelines
based on events triggered from
successful builds, or completed
staging, or a go-live event.
Microservices builder
OpenWhisk can be used to easily
build microservices given the
footprint and programming model
desired by microservices
@DanielKrookOpenWhisk.org
The OpenWhisk
programming model
@DanielKrookOpenWhisk.org
Triggers, actions, rules (and packages)
Data sources define the events they emit as triggers.
Developers associate actions to handle the events via rules.
T A R
@DanielKrookOpenWhisk.org
Triggers
A class of events that can occurT
Social events
Data changes
Device readings Location updates
User input
@DanielKrookOpenWhisk.org
Actions
Code that runs in response to an event
(that is, an event handler)
A
@DanielKrookOpenWhisk.org
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 };
};
@DanielKrookOpenWhisk.org
Actions
Or any other language by packaging with DockerA
@DanielKrookOpenWhisk.org
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
@DanielKrookOpenWhisk.org
Rules
An association of a trigger to an action
in a many to many mapping.
R
R := T A
@DanielKrookOpenWhisk.org
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
@DanielKrookOpenWhisk.org
OpenWhisk
in action
@DanielKrookOpenWhisk.org
The OpenWhisk execution model
Pool of actions
Swift DockerJS
Trigger
1
Running
action
Running
action
Running
action
3
OpenWhisk
Engine
2 A
T
AAA
@DanielKrookOpenWhisk.org
OpenWhisk enables event driven applications
Event
Providers
Cloudant
GitHub
Weather
…
Which triggers execution of
associated OpenWhisk action
2
Slack
JS Swift Docker …
An event occurs, for example
• Commit pushed to GitHub repository
• Data changed in Cloudant
1
OpenWhisk
@DanielKrookOpenWhisk.org
OpenWhisk can implement REST microservices
Send HTTP request
HTTP GET
app.com/customers
1
Invoke OpenWhisk
action get-customers
Browser
Mobile App
Web App
2
JS Swift Docker …
OpenWhisk
API
Proxy
@DanielKrookOpenWhisk.org
Watson IOT OpenWhisk
Customer
registry
Shipping
system
SendGrid
Service
reports
actions
IBM Cloud
LOB, SoR
systems &
databases
Need a
new filter
Email: Filter
on its way!
bit.ly/open-fridge
@DanielKrookOpenWhisk.org
analyze
reading
OpenWhisk
create
order
alert
customer
alarm
changes changes
service order appliance
feed
Watson
IoT
A A AT
T T
T
P
P
P
bit.ly/open-fridge
@DanielKrookOpenWhisk.org
OpenWhisk CLI: Create and test action
Create the Action that analyzes IoT readings, then stores in the database
wsk action create analyze-service-event analyze-service-event.js 
--param cloudant_user $CLOUDANT_USER
--param cloudant_pass $CLOUDANT_PASS
Invoke the Action manually with sample message data to test
wsk action invoke --blocking --result analyze-service-event
--param service '{"appliance_serial": "xxxxyyyyzzzz", "part_number":
"ddddeeeeffff", "reading": 13, "timestamp": 1466188262}'
A
@DanielKrookOpenWhisk.org
OpenWhisk CLI: Link trigger to action
Create the Trigger that subscribes to an MQTT topic pattern
wsk trigger create openfridge-feed-trigger 
--feed mqtt/mqtt-feed-action
--param topic 'iot-2/type/+/id/+/evt/+/fmt/json'
--param url 'ssl://example.messaging.internetofthings.ibmcloud.com:8883’
Link the Trigger to the action using a Rule
wsk rule create --enable openfridge-feed-rule 
openfridge-feed-trigger analyze-service-event
R := T A
@DanielKrookOpenWhisk.org
OpenWhisk
high level
implementation
architecture
@DanielKrookOpenWhisk.org
OpenWhisk design principles
1. Provide an open interface for event providers
2. Offer polyglot support and simple extensibility for new runtimes
3. Support higher level constructs as appropriate (e.g. action sequences)
4. Scale dynamically on a per request basis
5. Enable sharing of actions and event providers
6. Leverage best of breed open source software (Docker, Kafka, Consul, …)
7. Use the Apache 2 License
@DanielKrookOpenWhisk.org
OpenWhisk under the hood
Consul
Couch
DB
Router (NGINX)
Controller
Kafka
Invoker Invoker
Docker
Executor Executor
Docker
Java Swift
Executor Executor
NodeJS Python
1. Router receives request to API
via CLI or UI
2. Controller checks entitlement and
dispatches requests to Kafka
3. Invokers pull requests and start
execution of the action
@DanielKrookOpenWhisk.org
Summary
@DanielKrookOpenWhisk.org
What you learned today
• We’re in the early days of an evolution that is
empowering developers to write cloud native
applications better, faster, and cheaper
• OpenWhisk provides an open source platform to enable
cloud native, serverless, event driven applications
@DanielKrookOpenWhisk.org
Join us to build a cloud native platform for the future!
OpenWhisk.org
dwopen.slack.com #openwhisk
bluemix.net
@DanielKrookOpenWhisk.org
See a demo at
the IBM booth!
OpenWhisk
Cloud native • Serverless • Event driven • Microservices

More Related Content

What's hot

What's hot (19)

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
 
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: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
IBM Bluemix OpenWhisk: Interconnect 2016, Las Vegas: CCD-1088: The Future of ...
 
OpenWhisk Introduction
OpenWhisk IntroductionOpenWhisk Introduction
OpenWhisk Introduction
 
Serverless APIs with Apache OpenWhisk
Serverless APIs with Apache OpenWhiskServerless APIs with Apache OpenWhisk
Serverless APIs 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
 
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 ...
 
Serverless Architectures in Banking: OpenWhisk on IBM Bluemix at Santander
Serverless Architectures in Banking: OpenWhisk on IBM Bluemix at SantanderServerless Architectures in Banking: OpenWhisk on IBM Bluemix at Santander
Serverless Architectures in Banking: OpenWhisk on IBM Bluemix at Santander
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: The journey c...
 
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
IBM Bluemix OpenWhisk: Cloud Foundry Summit 2016, Frankfurt, Germany: The Fut...
 
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
 
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
 
OpenWhisk: Event-driven Design
OpenWhisk: Event-driven DesignOpenWhisk: Event-driven Design
OpenWhisk: Event-driven Design
 
Workshop: Develop Serverless Applications with IBM Cloud Functions
Workshop: Develop Serverless Applications with IBM Cloud FunctionsWorkshop: Develop Serverless Applications with IBM Cloud Functions
Workshop: Develop Serverless Applications with IBM Cloud Functions
 
FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0 FLUX - Crash Course in Cloud 2.0
FLUX - Crash Course in Cloud 2.0
 
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
 
ADDO 2020: "The past, present, and future of cloud native API gateways"
ADDO 2020: "The past, present, and future of cloud native API gateways"ADDO 2020: "The past, present, and future of cloud native API gateways"
ADDO 2020: "The past, present, and future of cloud native API gateways"
 
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...
 
Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)
 

Viewers also liked

Viewers also liked (16)

IBM Bluemix Openwhisk
IBM Bluemix OpenwhiskIBM Bluemix Openwhisk
IBM Bluemix Openwhisk
 
IBM Bluemix OpenWhisk: Serverless Conference 2016, Tokyo, Japan: The Future o...
IBM Bluemix OpenWhisk: Serverless Conference 2016, Tokyo, Japan: The Future o...IBM Bluemix OpenWhisk: Serverless Conference 2016, Tokyo, Japan: The Future o...
IBM Bluemix OpenWhisk: Serverless Conference 2016, Tokyo, Japan: The Future o...
 
Setting Up a Recurring Google+ Hangout
Setting Up a Recurring Google+ HangoutSetting Up a Recurring Google+ Hangout
Setting Up a Recurring Google+ Hangout
 
사물인터넷 활용기 - My home IoT - Yoonseok Hur PhD
사물인터넷 활용기 - My home IoT - Yoonseok Hur PhD사물인터넷 활용기 - My home IoT - Yoonseok Hur PhD
사물인터넷 활용기 - My home IoT - Yoonseok Hur PhD
 
How to contribute to Serverless Apache OpenWhisk OpenSource101 NCSU
How to contribute to Serverless Apache OpenWhisk OpenSource101 NCSUHow to contribute to Serverless Apache OpenWhisk OpenSource101 NCSU
How to contribute to Serverless Apache OpenWhisk OpenSource101 NCSU
 
ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...
ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...
ContainerDays NYC 2016: "OpenWhisk: A Serverless Computing Platform" (Rodric ...
 
Bluemix 로 접근하는 DevOps - Cognitive Cloud Connect
Bluemix 로 접근하는 DevOps - Cognitive Cloud ConnectBluemix 로 접근하는 DevOps - Cognitive Cloud Connect
Bluemix 로 접근하는 DevOps - Cognitive Cloud Connect
 
OpenWhisk: Where Did My Servers Go?
OpenWhisk: Where Did My Servers Go?OpenWhisk: Where Did My Servers Go?
OpenWhisk: Where Did My Servers Go?
 
About OpenWhisk
About OpenWhiskAbout OpenWhisk
About OpenWhisk
 
Finding your Product Beat
Finding your Product BeatFinding your Product Beat
Finding your Product Beat
 
Taking the Next Hot Mobile Game Live with Docker and IBM SoftLayer
Taking the Next Hot Mobile Game Live with Docker and IBM SoftLayerTaking the Next Hot Mobile Game Live with Docker and IBM SoftLayer
Taking the Next Hot Mobile Game Live with Docker and IBM SoftLayer
 
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
Raspberry Pi Gaming 4 Kids (Devoxx4Kids)
 
OpenWhisk on IBM Bluemix for the Industrial Internet
OpenWhisk on IBM Bluemix for the Industrial InternetOpenWhisk on IBM Bluemix for the Industrial Internet
OpenWhisk on IBM Bluemix for the Industrial Internet
 
Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)Confessions of a Former Agile Methodologist (JFrog Edition)
Confessions of a Former Agile Methodologist (JFrog Edition)
 
Oracle IoT Kids Workshop
Oracle IoT Kids WorkshopOracle IoT Kids Workshop
Oracle IoT Kids Workshop
 
Making Sense of DevOps Tools: Open Source to Enterprise Solutions
Making Sense of DevOps Tools: Open Source to Enterprise SolutionsMaking Sense of DevOps Tools: Open Source to Enterprise Solutions
Making Sense of DevOps Tools: Open Source to Enterprise Solutions
 

Similar to OpenWhisk - A platform for cloud native, serverless, event driven apps

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
 
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud ComputingOSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
Mark Hinkle
 

Similar to OpenWhisk - A platform for cloud native, serverless, event driven apps (20)

Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk
 
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...
 
RTP Bluemix Meetup April 20th 2016
RTP Bluemix Meetup April 20th 2016RTP Bluemix Meetup April 20th 2016
RTP Bluemix Meetup April 20th 2016
 
Internet of Things: Patterns For Building Real World Applications
Internet of Things: Patterns For Building Real World ApplicationsInternet of Things: Patterns For Building Real World Applications
Internet of Things: Patterns For Building Real World Applications
 
The Internet of Things: Patterns for building real world applications
The Internet of Things:  Patterns for building real world applicationsThe Internet of Things:  Patterns for building real world applications
The Internet of Things: Patterns for building real world applications
 
Developing Serverless Applications with Apache OpenWhisk
Developing Serverless Applications with Apache OpenWhiskDeveloping Serverless Applications with Apache OpenWhisk
Developing Serverless Applications with Apache OpenWhisk
 
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud ComputingOSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
OSCON 2013 - The Hitchiker’s Guide to Open Source Cloud Computing
 
Keynote: Trends in Modern Application Development - Gilly Dekel, IBM
Keynote: Trends in Modern Application Development - Gilly Dekel, IBMKeynote: Trends in Modern Application Development - Gilly Dekel, IBM
Keynote: Trends in Modern Application Development - Gilly Dekel, IBM
 
Microservices and Serverless Computing - OpenWhisk
Microservices and Serverless Computing - OpenWhiskMicroservices and Serverless Computing - OpenWhisk
Microservices and Serverless Computing - OpenWhisk
 
Secrets of Successful Cloud Foundry Adopters
Secrets of Successful Cloud Foundry AdoptersSecrets of Successful Cloud Foundry Adopters
Secrets of Successful Cloud Foundry Adopters
 
Google Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data editionGoogle Cloud Next '22 Recap: Serverless & Data edition
Google Cloud Next '22 Recap: Serverless & Data edition
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDB
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Design Microservice Architectures the Right Way
Design Microservice Architectures the Right WayDesign Microservice Architectures the Right Way
Design Microservice Architectures the Right Way
 
Enabling application portability with the greatest of ease!
Enabling application portability with the greatest of ease!Enabling application portability with the greatest of ease!
Enabling application portability with the greatest of ease!
 
Cloud-Native Patterns for Data-Intensive Applications
Cloud-Native Patterns for Data-Intensive ApplicationsCloud-Native Patterns for Data-Intensive Applications
Cloud-Native Patterns for Data-Intensive Applications
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 
Live Coding 12 Factor App
Live Coding 12 Factor AppLive Coding 12 Factor App
Live Coding 12 Factor App
 
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesHow To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
 

More from Daniel Krook

The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
Daniel Krook
 

More from Daniel Krook (19)

Commit to the Cause, Push for Change: Contributing to Call for Code Open Sour...
Commit to the Cause, Push for Change: Contributing to Call for Code Open Sour...Commit to the Cause, Push for Change: Contributing to Call for Code Open Sour...
Commit to the Cause, Push for Change: Contributing to Call for Code Open Sour...
 
Engaging Open Source Developers to Develop Tech for Good through Code and Res...
Engaging Open Source Developers to Develop Tech for Good through Code and Res...Engaging Open Source Developers to Develop Tech for Good through Code and Res...
Engaging Open Source Developers to Develop Tech for Good through Code and Res...
 
COVID-19 and Climate Change Action Through Open Source Technology
COVID-19 and Climate Change Action Through Open Source TechnologyCOVID-19 and Climate Change Action Through Open Source Technology
COVID-19 and Climate Change Action Through Open Source Technology
 
Event specifications, state of the serverless landscape, and other news from ...
Event specifications, state of the serverless landscape, and other news from ...Event specifications, state of the serverless landscape, and other news from ...
Event specifications, state of the serverless landscape, and other news from ...
 
The CNCF on Serverless
The CNCF on ServerlessThe CNCF on Serverless
The CNCF on Serverless
 
Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...
Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...
Open Container Technologies and OpenStack - Sorting Through Kubernetes, the O...
 
Containers, OCI, CNCF, Magnum, Kuryr, and You!
Containers, OCI, CNCF, Magnum, Kuryr, and You!Containers, OCI, CNCF, Magnum, Kuryr, and You!
Containers, OCI, CNCF, Magnum, Kuryr, and You!
 
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
 
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
 
Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...
Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...
Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...
 
Finding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User GroupFinding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User Group
 
IBM and OpenStack: Collaboration Beyond the Code
IBM and OpenStack: Collaboration Beyond the CodeIBM and OpenStack: Collaboration Beyond the Code
IBM and OpenStack: Collaboration Beyond the Code
 
Dockerizing OpenStack for High Availability
Dockerizing OpenStack for High AvailabilityDockerizing OpenStack for High Availability
Dockerizing OpenStack for High Availability
 
Power Systems Projects in Research
Power Systems Projects in ResearchPower Systems Projects in Research
Power Systems Projects in Research
 
Neutron Networking: Service Groups, Policies and Chains
Neutron Networking: Service Groups, Policies and ChainsNeutron Networking: Service Groups, Policies and Chains
Neutron Networking: Service Groups, Policies and Chains
 
Advanced Data Retrieval and Analytics with Apache Spark and Openstack Swift
Advanced Data Retrieval and Analytics with Apache Spark and Openstack SwiftAdvanced Data Retrieval and Analytics with Apache Spark and Openstack Swift
Advanced Data Retrieval and Analytics with Apache Spark and Openstack Swift
 
Docker Container Cloud
Docker Container CloudDocker Container Cloud
Docker Container Cloud
 
Building a hybrid, dynamic cloud on an open architecture
Building a hybrid, dynamic cloud on an open architectureBuilding a hybrid, dynamic cloud on an open architecture
Building a hybrid, dynamic cloud on an open architecture
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 

Recently uploaded

Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Lisi Hocke
 

Recently uploaded (20)

[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
^Clinic ^%[+27788225528*Abortion Pills For Sale In soweto
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
^Clinic ^%[+27788225528*Abortion Pills For Sale In birch acres
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14Spring into AI presented by Dan Vega 5/14
Spring into AI presented by Dan Vega 5/14
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
What is a Recruitment Management Software?
What is a Recruitment Management Software?What is a Recruitment Management Software?
What is a Recruitment Management Software?
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 

OpenWhisk - A platform for cloud native, serverless, event driven apps

  • 1. OpenWhisk Cloud native • Serverless • Event driven • Microservices @DanielKrook • IBM Cloud
  • 2. @DanielKrookOpenWhisk.org What you will learn today • How cloud computing has recently evolved to enable developers to write cloud native applications better, faster, and cheaper using serverless technology. • How OpenWhisk provides an open source platform to enable cloud native, serverless, event driven applications.
  • 4. @DanielKrookOpenWhisk.org Cloud evolution means developers can write apps better, faster, and cheaper Bare metal Virtual machines Containers Functions Decreasing  concern  (and  control)  over  stack  implementation Increasing  focus  on  business  logic
  • 5. @DanielKrookOpenWhisk.org Newer workloads are a better fit for event driven programming Execute app logic in response to database triggers Execute app logic in response to sensor data Execute app logic in response to cognitive trends Execute app logic in response to scheduled tasks Provide easy server-side backend for mobile app
  • 6. @DanielKrookOpenWhisk.org Problem: It’s expensive to scale microservices Explosion in number of containers / processes: 1. Increase of infrastructure cost footprint 2. Increase of operational management cost and complexity Region BRegion A Break-­down  into  microservices Make  each  micro  service  HA Protect  against  regional  outages Monolithic application
  • 7. @DanielKrookOpenWhisk.org Serverless can handle many cloud native app 12 Factors I Codebase Handled by developer (Manage versioning of functions on their own) II Dependencies Handled by developer, facilitated by serverless platform (Runtimes and packages) III Config Handled by platform (Environment variables or injected event parameters) IV Backing services Handled by platform (Connection information injected as event parameters) V Build, release, run Handled by platform (Deployed resources are immutable and internally versioned) VI Processes Handled by platform (Single stateless containers often used) VII Port binding Handled by platform (Actions or functions are automatically discovered) VIII Concurrency Handled by platform (Process model is hidden and scales in response to demand) IX Disposability Handled by platform (Lifecycle is hidden from the user, fast startup and elastic scale is prioritized) X Dev/prod parity Handled by developer (The developer is the deployer. Scope of what differs is narrower) XI Logs Handled by platform (Developer writes to console.log, platform handles log streaming) XII Admin processes Handled by developer (No distinction between one off processes and long running)
  • 8. @DanielKrookOpenWhisk.org Problem: Programming and pricing models aren’t efficient Continuous polling needed in the absence of an event driven programming model Charged for resources, even when idle Worries persist about capacity management Swif t Application Container VMCF 2 Polling 1b Request 1a
  • 9. @DanielKrookOpenWhisk.org Cost model offers a better match between app and resources Applications charged by compute time (millisecond) rather than reserved memory (GB/hour). While many applications must still be deployed in a daemon model, serverless provides an alternative that can mean substantial cost savings for a variety of event driven workloads. Greater linkage between cloud resources used and business operations executed.
  • 10. @DanielKrookOpenWhisk.org Technological and business factors make serverless compelling Serverless platforms and frameworks are gaining traction Cost models getting more granular and efficient Growth of event driven workloads that need automated scale Platforms evolving to facilitate cloud native design for developers
  • 12. @DanielKrookOpenWhisk.org OpenWhisk in a nutshell OpenWhisk is a cloud platform that executes code in response to events OpenWhisk
  • 13. @DanielKrookOpenWhisk.org OpenWhisk is different than other hosted services Serverless deployment and operations model Optimized utilization, fine grained pricing at any scale Flexible programming model with powerful tooling Open source and open ecosystem Ability to run in public, private, and hybrid models OpenWhisk
  • 14. @DanielKrookOpenWhisk.org OpenWhisk supports many growing workloads OpenWhisk can help power various mobile, web and IoT app use cases by simplifying the programming model of orchestrating various services using events without a dedicated backend. Digital app workloads Big Data/Analytics pipeline Complex data pipelines for Big Data/Analytics tasks can be scripted using changes in data services or streams for near real-time analytics and feedback. DevOps and infrastructure as code OpenWhisk can be used to automate DevOps pipelines based on events triggered from successful builds, or completed staging, or a go-live event. Microservices builder OpenWhisk can be used to easily build microservices given the footprint and programming model desired by microservices
  • 16. @DanielKrookOpenWhisk.org Triggers, actions, rules (and packages) Data sources define the events they emit as triggers. Developers associate actions to handle the events via rules. T A R
  • 17. @DanielKrookOpenWhisk.org Triggers A class of events that can occurT Social events Data changes Device readings Location updates User input
  • 18. @DanielKrookOpenWhisk.org Actions Code that runs in response to an event (that is, an event handler) A
  • 19. @DanielKrookOpenWhisk.org 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 }; };
  • 20. @DanielKrookOpenWhisk.org Actions Or any other language by packaging with DockerA
  • 21. @DanielKrookOpenWhisk.org 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
  • 22. @DanielKrookOpenWhisk.org Rules An association of a trigger to an action in a many to many mapping. R R := T A
  • 23. @DanielKrookOpenWhisk.org 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
  • 25. @DanielKrookOpenWhisk.org The OpenWhisk execution model Pool of actions Swift DockerJS Trigger 1 Running action Running action Running action 3 OpenWhisk Engine 2 A T AAA
  • 26. @DanielKrookOpenWhisk.org OpenWhisk enables event driven applications Event Providers Cloudant GitHub Weather … Which triggers execution of associated OpenWhisk action 2 Slack JS Swift Docker … An event occurs, for example • Commit pushed to GitHub repository • Data changed in Cloudant 1 OpenWhisk
  • 27. @DanielKrookOpenWhisk.org OpenWhisk can implement REST microservices Send HTTP request HTTP GET app.com/customers 1 Invoke OpenWhisk action get-customers Browser Mobile App Web App 2 JS Swift Docker … OpenWhisk API Proxy
  • 28. @DanielKrookOpenWhisk.org Watson IOT OpenWhisk Customer registry Shipping system SendGrid Service reports actions IBM Cloud LOB, SoR systems & databases Need a new filter Email: Filter on its way! bit.ly/open-fridge
  • 30. @DanielKrookOpenWhisk.org OpenWhisk CLI: Create and test action Create the Action that analyzes IoT readings, then stores in the database wsk action create analyze-service-event analyze-service-event.js --param cloudant_user $CLOUDANT_USER --param cloudant_pass $CLOUDANT_PASS Invoke the Action manually with sample message data to test wsk action invoke --blocking --result analyze-service-event --param service '{"appliance_serial": "xxxxyyyyzzzz", "part_number": "ddddeeeeffff", "reading": 13, "timestamp": 1466188262}' A
  • 31. @DanielKrookOpenWhisk.org OpenWhisk CLI: Link trigger to action Create the Trigger that subscribes to an MQTT topic pattern wsk trigger create openfridge-feed-trigger --feed mqtt/mqtt-feed-action --param topic 'iot-2/type/+/id/+/evt/+/fmt/json' --param url 'ssl://example.messaging.internetofthings.ibmcloud.com:8883’ Link the Trigger to the action using a Rule wsk rule create --enable openfridge-feed-rule openfridge-feed-trigger analyze-service-event R := T A
  • 33. @DanielKrookOpenWhisk.org OpenWhisk design principles 1. Provide an open interface for event providers 2. Offer polyglot support and simple extensibility for new runtimes 3. Support higher level constructs as appropriate (e.g. action sequences) 4. Scale dynamically on a per request basis 5. Enable sharing of actions and event providers 6. Leverage best of breed open source software (Docker, Kafka, Consul, …) 7. Use the Apache 2 License
  • 34. @DanielKrookOpenWhisk.org OpenWhisk under the hood Consul Couch DB Router (NGINX) Controller Kafka Invoker Invoker Docker Executor Executor Docker Java Swift Executor Executor NodeJS Python 1. Router receives request to API via CLI or UI 2. Controller checks entitlement and dispatches requests to Kafka 3. Invokers pull requests and start execution of the action
  • 36. @DanielKrookOpenWhisk.org What you learned today • We’re in the early days of an evolution that is empowering developers to write cloud native applications better, faster, and cheaper • OpenWhisk provides an open source platform to enable cloud native, serverless, event driven applications
  • 37. @DanielKrookOpenWhisk.org Join us to build a cloud native platform for the future! OpenWhisk.org dwopen.slack.com #openwhisk bluemix.net
  • 39. OpenWhisk Cloud native • Serverless • Event driven • Microservices