SlideShare uma empresa Scribd logo
1 de 29
Baixar para ler offline
Build a cloud native
app with OpenWhisk
@DanielKrook • Senior Software Engineer • IBM Cloud
OpenWhisk.org
@DanielKrookOpenWhisk.org
What you will learn today
• How serverless technology enables developers to write cloud
native applications better, faster, and cheaper.
• How OpenWhisk provides an open source platform to enable
these cloud native, event driven applications.
• How to get started developing with OpenWhisk on Bluemix
based on two hands on coding demos
Serverless architectures are drawing
interest due to a combination of
compelling technical and business factors
@DanielKrookOpenWhisk.org
With serverless developers focus more on code, less on infrastructure
Bare
metal
Virtual
machines
Containers
Functions
Decreasing concern (and control) over stack implementation
Increasingfocusonbusinesslogic
@DanielKrookOpenWhisk.org
Serverless platforms can address 12 Factors for developers
I Codebase Handled by developer (Manage versioning of functions themeselves)
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 immutable and internally versioned)
VI Processes Handled by platform (Single stateless containers used)
VII Port binding Handled by platform (Actions or functions automatically discovered)
VIII Concurrency Handled by platform (Process model hidden and scales in response to demand)
IX Disposability Handled by platform (Lifecycle hidden from user, fast startup and elastic scale prioritized)
X Dev/prod parity Handled by developer (Developer is deployer. Scope of what differs narrower)
XI Logs Handled by platform (Developer writes to console.log, platform streams logs)
XII Admin processes Handled by developer (No distinction between one off processes and long running)
@DanielKrookOpenWhisk.org
Emerging workloads are a good fit for event driven programming
Execute app logic in response to database change
Perform edge analytics in response to sensor input
Provide cognitive computing via a conversational bot
Schedule tasks according to a specific timetable
Invoke autoscaled mobile backend services
@DanielKrookOpenWhisk.org
New cost models can more accurately charge for compute time
Applications billed by compute
time (millisecond) rather than
reserved memory (GB/hour).
While many applications must still be deployed in an always on
model, serverless architectures provide an alternative that can result
in substantial cost savings for a variety of event driven workloads.
Means a greater linkage between
cloud resources used and
business operations executed.
@DanielKrookOpenWhisk.org
Technological and business factors make serverless compelling
Serverless architectures 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
OpenWhisk enables these serverless, event-driven workloads
Serverless deployment and operations model
Optimized utilization, fine grained metering at any scale
Flexible, extensible, polyglot programming model
Open source and open ecosystem (Apache proposal)
Ability to run in public, private, and hybrid models
OpenWhisk
a cloud platform
that executes code
in response to events
The OpenWhisk
programming model
@DanielKrookOpenWhisk.org
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
@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
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
Demo 1: Timer triggered action
Trigger
1
Running
action
2
T
A
1. Cron syntax alarm
2. Log the current time
$ wsk action create handler handler.js
$ wsk action invoke --blocking handler
$ wsk trigger create every-20-seconds 
--feed /whisk.system/alarms/alarm 
--param cron “*/20 * * * * *”
$ wsk rule create 
invoke-periodically 
every-20-seconds 
handler
$ wsk activation poll
github.com/krook/dw-openwhisk-demo-1
@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
Demo 2: Polyglot applications with data triggers
github.com/krook/dw-openwhisk-demo-2
Trigger
2
JavaScript
action
3
T
A
1. Image uploaded to Cloudant
3. JavaScript action parses image
metadata and transforms image
Docker
action
4 A
incoming
checks
processed
checks
5
1
2. Trigger fired in OpenWhisk
4. Docker action parses image with OCR
5. Extracted info stored back to Cloudant
OpenWhisk
@DanielKrookOpenWhisk.org
More examples: Smart home IoT, mobile banking
github.com/openwhisk/awesome-openwhisk
Project OpenFridge:
Improving customer service
with event driven IoT
Project OpenChecks
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
• Bluemix provides a hosted instance of OpenWhisk that you can use
to get started (and offers integration with a catalog of services)
@DanielKrookOpenWhisk.org
Try OpenWhisk in hosted on IBM Bluemix
bluemix.net
@DanielKrookOpenWhisk.org
Join us to build a cloud native platform for the future!
OpenWhisk.org

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Serverless apps with OpenWhisk
Serverless apps with OpenWhiskServerless apps with OpenWhisk
Serverless apps with OpenWhisk
 
The CNCF on Serverless
The CNCF on ServerlessThe CNCF on Serverless
The CNCF on Serverless
 
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
 
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
 
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...
 
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...
 
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
 
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
 
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 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
 
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 Serverless Paradigm, OpenWhisk and FIWARE
The Serverless Paradigm, OpenWhisk and FIWAREThe Serverless Paradigm, OpenWhisk and FIWARE
The Serverless Paradigm, OpenWhisk and FIWARE
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
 
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 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
 
How to develop your first cloud-native Applications with Java
How to develop your first cloud-native Applications with JavaHow to develop your first cloud-native Applications with Java
How to develop your first cloud-native Applications with Java
 
Lugano Tech Talks - Why Docker
Lugano Tech Talks - Why DockerLugano Tech Talks - Why Docker
Lugano Tech Talks - Why Docker
 
2015 DockeCon monitoring presentation
2015 DockeCon monitoring presentation2015 DockeCon monitoring presentation
2015 DockeCon monitoring presentation
 
Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017
 
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 ...
 

Destaque

Microsoft Azure 概觀 (2014-4-2 雲端達人班)
Microsoft Azure 概觀 (2014-4-2 雲端達人班)Microsoft Azure 概觀 (2014-4-2 雲端達人班)
Microsoft Azure 概觀 (2014-4-2 雲端達人班)
Jeff Chu
 

Destaque (20)

RightScale: Cloud Pricing Trends
RightScale: Cloud Pricing TrendsRightScale: Cloud Pricing Trends
RightScale: Cloud Pricing Trends
 
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
 
Cloud computing power point presentation
Cloud computing power point presentationCloud computing power point presentation
Cloud computing power point presentation
 
Saas and Martech Impact to Modern Pricing - Haas MBA Spring 2016
Saas and Martech Impact to Modern Pricing - Haas MBA Spring 2016Saas and Martech Impact to Modern Pricing - Haas MBA Spring 2016
Saas and Martech Impact to Modern Pricing - Haas MBA Spring 2016
 
About OpenWhisk
About OpenWhiskAbout OpenWhisk
About OpenWhisk
 
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
 
Microsoft Azure 概觀 (2014-4-2 雲端達人班)
Microsoft Azure 概觀 (2014-4-2 雲端達人班)Microsoft Azure 概觀 (2014-4-2 雲端達人班)
Microsoft Azure 概觀 (2014-4-2 雲端達人班)
 
Dockerizing OpenStack for High Availability
Dockerizing OpenStack for High AvailabilityDockerizing OpenStack for High Availability
Dockerizing OpenStack for High Availability
 
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!
 
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaSAWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
AWS vs. Azure vs. Google vs. SoftLayer: Network, Storage and DBaaS
 
Docker Container Cloud
Docker Container CloudDocker Container Cloud
Docker Container Cloud
 
Power Systems Projects in Research
Power Systems Projects in ResearchPower Systems Projects in Research
Power Systems Projects in Research
 
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...
 
Open whisk slackinvite - public
Open whisk slackinvite - publicOpen whisk slackinvite - public
Open whisk slackinvite - public
 
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
 
2017 0306 Apache OpenWhisk starting
2017 0306 Apache OpenWhisk starting2017 0306 Apache OpenWhisk starting
2017 0306 Apache OpenWhisk starting
 
デモから見るOpenWhisk - Docker Action -
デモから見るOpenWhisk - Docker Action - デモから見るOpenWhisk - Docker Action -
デモから見るOpenWhisk - Docker Action -
 
Serverless meetup02 openwhisk
Serverless meetup02 openwhiskServerless meetup02 openwhisk
Serverless meetup02 openwhisk
 
Tracxn research - PaaS Landscape, December 2016
Tracxn research -  PaaS Landscape, December 2016Tracxn research -  PaaS Landscape, December 2016
Tracxn research - PaaS Landscape, December 2016
 

Semelhante a Build a cloud native app with OpenWhisk

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
 
Cloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
Cloud Expo East 2013: Essential Open Source Software for Building the Open CloudCloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
Cloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
Mark Hinkle
 
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
 

Semelhante a Build a cloud native app with OpenWhisk (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
 
Cloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
Cloud Expo East 2013: Essential Open Source Software for Building the Open CloudCloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
Cloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
 
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...
 
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
 
The 'Serverless' Paradigm, OpenWhisk and FIWARE
The 'Serverless' Paradigm, OpenWhisk and FIWAREThe 'Serverless' Paradigm, OpenWhisk and FIWARE
The 'Serverless' Paradigm, OpenWhisk and FIWARE
 
Developing Hybrid Cloud Applications
Developing Hybrid Cloud ApplicationsDeveloping Hybrid Cloud Applications
Developing Hybrid Cloud Applications
 
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
A Hitchhiker’s Guide to the Cloud Native Stack. #CDS17
 
A hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stackA hitchhiker‘s guide to the cloud native stack
A hitchhiker‘s guide to the cloud native stack
 
Swift at IBM: Mobile, open source and the drive to the cloud
Swift at IBM: Mobile, open source and the drive to the cloudSwift at IBM: Mobile, open source and the drive to the cloud
Swift at IBM: Mobile, open source and the drive to the cloud
 
Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015Docker Platform and Ecosystem Nov 2015
Docker Platform and Ecosystem Nov 2015
 
Docker Enterprise Edition Overview by Steven Thwaites, Technical Solutions En...
Docker Enterprise Edition Overview by Steven Thwaites, Technical Solutions En...Docker Enterprise Edition Overview by Steven Thwaites, Technical Solutions En...
Docker Enterprise Edition Overview by Steven Thwaites, Technical Solutions En...
 
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the CloudLinux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
 
Introducing the Open Container Project
Introducing the Open Container ProjectIntroducing the Open Container Project
Introducing the Open Container Project
 
High Performance Computing (HPC) and Engineering Simulations in the Cloud
High Performance Computing (HPC) and Engineering Simulations in the CloudHigh Performance Computing (HPC) and Engineering Simulations in the Cloud
High Performance Computing (HPC) and Engineering Simulations in the Cloud
 
High Performance Computing (HPC) and Engineering Simulations in the Cloud
High Performance Computing (HPC) and Engineering Simulations in the CloudHigh Performance Computing (HPC) and Engineering Simulations in the Cloud
High Performance Computing (HPC) and Engineering Simulations in the Cloud
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
Getting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick StinematesGetting Started with Docker - Nick Stinemates
Getting Started with Docker - Nick Stinemates
 
.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles.NET Cloud-Native Bootcamp- Los Angeles
.NET Cloud-Native Bootcamp- Los Angeles
 

Mais de 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
 

Mais de Daniel Krook (8)

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
 
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...
 
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
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 

Último

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 

Build a cloud native app with OpenWhisk

  • 1. Build a cloud native app with OpenWhisk @DanielKrook • Senior Software Engineer • IBM Cloud OpenWhisk.org
  • 2. @DanielKrookOpenWhisk.org What you will learn today • How serverless technology enables developers to write cloud native applications better, faster, and cheaper. • How OpenWhisk provides an open source platform to enable these cloud native, event driven applications. • How to get started developing with OpenWhisk on Bluemix based on two hands on coding demos
  • 3. Serverless architectures are drawing interest due to a combination of compelling technical and business factors
  • 4. @DanielKrookOpenWhisk.org With serverless developers focus more on code, less on infrastructure Bare metal Virtual machines Containers Functions Decreasing concern (and control) over stack implementation Increasingfocusonbusinesslogic
  • 5. @DanielKrookOpenWhisk.org Serverless platforms can address 12 Factors for developers I Codebase Handled by developer (Manage versioning of functions themeselves) 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 immutable and internally versioned) VI Processes Handled by platform (Single stateless containers used) VII Port binding Handled by platform (Actions or functions automatically discovered) VIII Concurrency Handled by platform (Process model hidden and scales in response to demand) IX Disposability Handled by platform (Lifecycle hidden from user, fast startup and elastic scale prioritized) X Dev/prod parity Handled by developer (Developer is deployer. Scope of what differs narrower) XI Logs Handled by platform (Developer writes to console.log, platform streams logs) XII Admin processes Handled by developer (No distinction between one off processes and long running)
  • 6. @DanielKrookOpenWhisk.org Emerging workloads are a good fit for event driven programming Execute app logic in response to database change Perform edge analytics in response to sensor input Provide cognitive computing via a conversational bot Schedule tasks according to a specific timetable Invoke autoscaled mobile backend services
  • 7. @DanielKrookOpenWhisk.org New cost models can more accurately charge for compute time Applications billed by compute time (millisecond) rather than reserved memory (GB/hour). While many applications must still be deployed in an always on model, serverless architectures provide an alternative that can result in substantial cost savings for a variety of event driven workloads. Means a greater linkage between cloud resources used and business operations executed.
  • 8. @DanielKrookOpenWhisk.org Technological and business factors make serverless compelling Serverless architectures 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
  • 9. @DanielKrookOpenWhisk.org OpenWhisk enables these serverless, event-driven workloads Serverless deployment and operations model Optimized utilization, fine grained metering at any scale Flexible, extensible, polyglot programming model Open source and open ecosystem (Apache proposal) Ability to run in public, private, and hybrid models OpenWhisk a cloud platform that executes code in response to events
  • 11. @DanielKrookOpenWhisk.org 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
  • 12. @DanielKrookOpenWhisk.org Triggers A class of events that can occurT Social events Data changes Device readings Location updates User input
  • 13. @DanielKrookOpenWhisk.org Actions Code that runs in response to an event (that is, an event handler) A
  • 14. @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 }; };
  • 15. @DanielKrookOpenWhisk.org Actions Or any other language by packaging with DockerA
  • 16. @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
  • 17. @DanielKrookOpenWhisk.org Rules An association of a trigger to an action in a many to many mapping. R R := T A
  • 18. @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
  • 20. @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
  • 21. @DanielKrookOpenWhisk.org Demo 1: Timer triggered action Trigger 1 Running action 2 T A 1. Cron syntax alarm 2. Log the current time $ wsk action create handler handler.js $ wsk action invoke --blocking handler $ wsk trigger create every-20-seconds --feed /whisk.system/alarms/alarm --param cron “*/20 * * * * *” $ wsk rule create invoke-periodically every-20-seconds handler $ wsk activation poll github.com/krook/dw-openwhisk-demo-1
  • 22. @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
  • 23. @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
  • 24. @DanielKrookOpenWhisk.org Demo 2: Polyglot applications with data triggers github.com/krook/dw-openwhisk-demo-2 Trigger 2 JavaScript action 3 T A 1. Image uploaded to Cloudant 3. JavaScript action parses image metadata and transforms image Docker action 4 A incoming checks processed checks 5 1 2. Trigger fired in OpenWhisk 4. Docker action parses image with OCR 5. Extracted info stored back to Cloudant OpenWhisk
  • 25. @DanielKrookOpenWhisk.org More examples: Smart home IoT, mobile banking github.com/openwhisk/awesome-openwhisk Project OpenFridge: Improving customer service with event driven IoT Project OpenChecks
  • 27. @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 • Bluemix provides a hosted instance of OpenWhisk that you can use to get started (and offers integration with a catalog of services)
  • 28. @DanielKrookOpenWhisk.org Try OpenWhisk in hosted on IBM Bluemix bluemix.net
  • 29. @DanielKrookOpenWhisk.org Join us to build a cloud native platform for the future! OpenWhisk.org