SlideShare a Scribd company logo
1 of 35
Download to read offline
Introduction to
Serverless Computing
Upkar Lidder
Developer Advocate, IBM
> ulidder@us.ibm.com
> @lidderupk
> blog.upkarlidder.com
What is Serverless?
2
What is Serverless?
3
Serverless computing refers to the concept of building and running applications that do not require
server management.
It describes a finer-grained deployment model where applications, bundled as one or more
functions, are uploaded to a platform and then executed, scaled, and billed in response to the
exact demand needed at the moment.
It refers to the idea that consumers of serverless computing no longer need to spend time and
resources on server provisioning, maintenance, updates, scaling, and capacity
planning. Instead, all of these tasks and capabilities are handled by a serverless platform and are completely
abstracted away from the developers
- Cloud Native Computing Foundation
https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
What is Serverless?
4
Apps
Containers
Platform
Infrastructure
Apps
FAAS
Containers
Platform
Infrastructure
What is Serverless?
5
INFRASTRUCTURE
It just works !
What is Serverless?
6
Use cases
Use Cases
7
Small, focused, asynchronous, concurrent, easy to parallelize into independent units
of work
Infrequent or has sporadic demand, with large, unpredictable variance in scaling
requirements
Stateless, ephemeral, without a major need for instantaneous cold start time
Highly dynamic in terms of changing business requirements that drive a need for
accelerated developer velocity
Why Serverless?
8
Active users curve for a new
mobile game has a predictable
shape, but an unpredictable
volume
Why Serverless?
9
Active users curve for a mobile
conference app has no demand
before and after the conference,
and huge intraweek swings in
demand
Why Serverless?
10
Mobile banking apps often have
peaks in demand on payday,
once every two weeks
Server Landscape (Cloud Native Computing Foundation)
11
Server Landscape – features
12
Amazon Lambda
• Node.js, Python, Java, C# and Go
Apache OpenWhisk
• Node.js 8, Node.js 6, Python 3.6.4, Python 3.6.1, PHP 7.1, PHP 7.2, and Swift 4, Swift 3.1.1, Ruby 2.5
• Other languages can be added via Docker container (for example Java)
• Based on open source OpenWhisk serverless platform. Can create your own serverless platform based on
OpenWhisk
Microsoft Azure
• C#, F#, Node.js (in GA)
• Java, Python, PHP, TypeScript, Bash, PowerShell (experimental mode)
Google Cloud Function
• Node.js, Python
• Many many more and constantly changings
Apache OpenWhisk
13
Apache OpenWhisk (Incubating) is an open source, distributed Serverless platform that executes functions (fx)
in response to events at any scale.
The OpenWhisk platform supports a programming model in which developers write functional logic
(called Actions), in any supported programming language, that can be dynamically scheduled and run in
response to associated events (via Triggers) from external sources ( Feeds) or from HTTP requests.
Apache OpenWhisk
14
Source
(events)
Results
Triggers
(response)
Actions
(code)
Rules
Apache OpenWhisk
15
JS/NodeJS 8
Java
Python 3
Swift 4
Docker
PHP 7
Go
Rust
Ruby
…
bash
C
Use cases
16DOC ID / September 13, 2018 / © 2018 IBM Corporation
Serverless Backends
Mobile Backend
Data Processing
Cognitive Data Processing
IoT Ready
Event Stream Processing
Conversational Scenarios Scheduled Tasks
Apache OpenWhisk
Entering the system: nginx
“an HTTP and reverse proxy server”.
Entering the system: Controller
serves as the interface for everything a user can do,
including CRUD requests for your entities in OpenWhisk and
invocation of actions
Authentication and Authorization: CouchDB
check that the user exists in OpenWhisk’s database and that it
has the privilege to invoke the action myAction
Getting the action: CouchDB… again
Load the action from the whisks database in CouchDB.
The record of the action contains mainly the code to execute
(shown above) and default parameters that you want to pass to
your action, merged with the parameters you included in the
actual invoke request. It also contains the resource restrictions
imposed on it in execution, such as the memory it is allowed to
consume.
Who’s there to invoke the action: Load Balancer
has a global view of the executors available in the system by
checking their health status continuously. Those executors are
called Invokers. The Load Balancer, knowing which Invokers are
available, chooses one of them to invoke the action requested.
Apache OpenWhisk
Please form a line: Kafka
“a high-throughput, distributed, publish-subscribe messaging
system”. Controller and Invoker solely communicate through
messages buffered and persisted by Kafka.
Actually invoking the code already: Invoker
The Invoker’s duty is to invoke an action. To execute actions in
an isolated and safe way it uses Docker.
Example: the Invoker will start a Node.js container, inject the
code from myAction, run it with no parameters, extract the result,
save the logs and destroy the Node.js container again.
Storing the results: CouchDB again
As the result is obtained by the Invoker, it is stored into
the activations database as an activation. The record contains
both the returned result and the logs written. It also contains the
start and end time of the invocation of the action.
The system itself mainly consists of
only two custom components,
the Controller and the Invoker.
Everything else is already there,
developed by so many people out
there in the open-source community.
Apache OpenWhisk
19
Apache OpenWhisk – create an action
Entry point
Parameters
Return Object
Apache OpenWhisk – create an action
gson Dependency
JAR
Apache OpenWhisk - wsk
22
DEMO
23
Apache OpenWhisk – create an action
Apache OpenWhisk – create an action
Controller Invoker
CouchDB
POST
STATUS
PUT
STATUS
wsk action create helloJava target/hello-world-java.jar
--main com.example.FunctionApp -i
Apache OpenWhisk – invoke an action
Apache OpenWhisk – invoke an action
Controller Invoker
CouchDB
POST
STATUS
INVOKE {params}
STATUS
wsk action invoke -ivr helloJava -p name "Upkar Lidder"
POST /init
POST /run
PUTRESULT
GETACTION
IBM Cloud Functions
28
Open source Hosted service
Serverless engine Apache OpenWhisk IBM Cloud Functions
API Gateway LoopBack IBM API Gateway
Databases
Apache CouchDB
MySQL
IBM Cloudant
IBM Compose
Message streams Apache Kafka IBM Message Hub
DEMO
29
Things to consider
30
• Functions are stateless. Need some sort of persistence between runs.
• Are you able to test and develop locally ? Does provider have CLI ?
• Can you easily version your functions ? Source control ?
• Can you easily monitor your functions ?
• Security and API gateway
• Avoid long-running loops / mini-monoliths ?
• Latency (cold, warm and hot loads)
• How do you track dependencies ?
System Limitations
31
Resources
32
Lists
• https://github.com/anaibol/awesome-serverless
• https://github.com/pmuens/awesome-serverless
• https://twitter.com/tmclaughbos/lists/serverless
Email newsletter
• https://serverless.email/
Code Patterns
• https://developer.ibm.com/patterns/category/serverless/
Serverless architecture
• https://martinfowler.com/articles/serverless.html
Code Patterns !
34https://developer.ibm.com/patterns/
1500 Drones Are Ready To Fly
35
IBM Developer Drone Challenge
Challenge runs from November 12 through December 16 and those 18 years of
age or older residing in the US and Canada are eligible to enter
Enter at https://developer.ibm.com/contest
Once per week during the 5 weeks of the contest a random drawing
Will be held to determine the winners (watch for the drawing on Twitch)
Winners will receive a DJI Tello programmable drone,
an IBM Developer T-shirt, and an IBM Developer laptop sticker
Winners will also receive a special code to unlock more challenges and given the
opportunity to contribute back to the challenge
#IBMDroneDrop
Thank you!
Upkar Lidder
Developer Advocate, IBM
> ulidder@us.ibm.com
> @lidderupk
> blog.upkarlidder.com

More Related Content

What's hot

Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesJava Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesAntons Kranga
 
Docker on AWS - the Right Way
Docker on AWS - the Right WayDocker on AWS - the Right Way
Docker on AWS - the Right WayAllCloud
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverBlazeMeter
 
Efficient Parallel Testing with Docker
Efficient Parallel Testing with DockerEfficient Parallel Testing with Docker
Efficient Parallel Testing with DockerLaura Frank Tacho
 
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. ...Daniel Krook
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction Robert Reiz
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianVirtual JBoss User Group
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitatChef
 
How to Combine Artifacts and Source in a Single Server
How to Combine Artifacts and Source in a Single ServerHow to Combine Artifacts and Source in a Single Server
How to Combine Artifacts and Source in a Single ServerPerforce
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Mandi Walls
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Robert Reiz
 
Run your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryAndy Piper
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesCarlos Sanchez
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefMichael Lihs
 
DCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and UpgradeDCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and UpgradeDocker, Inc.
 
Flink 0.10 - Upcoming Features
Flink 0.10 - Upcoming FeaturesFlink 0.10 - Upcoming Features
Flink 0.10 - Upcoming FeaturesAljoscha Krettek
 
Containerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaContainerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaJadson Santos
 

What's hot (20)

Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and KubernetesJava Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
 
Docker on AWS - the Right Way
Docker on AWS - the Right WayDocker on AWS - the Right Way
Docker on AWS - the Right Way
 
Learning chef
Learning chefLearning chef
Learning chef
 
Performance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & WebdriverPerformance Testing using Real Browsers with JMeter & Webdriver
Performance Testing using Real Browsers with JMeter & Webdriver
 
Efficient Parallel Testing with Docker
Efficient Parallel Testing with DockerEfficient Parallel Testing with Docker
Efficient Parallel Testing with Docker
 
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. ...
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Testing the Enterprise layers, with Arquillian
Testing the Enterprise layers, with ArquillianTesting the Enterprise layers, with Arquillian
Testing the Enterprise layers, with Arquillian
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitat
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
 
How to Combine Artifacts and Source in a Single Server
How to Combine Artifacts and Source in a Single ServerHow to Combine Artifacts and Source in a Single Server
How to Combine Artifacts and Source in a Single Server
 
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
 
Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014Continuous Updating with VersionEye at code.talks 2014
Continuous Updating with VersionEye at code.talks 2014
 
Run your Java apps on Cloud Foundry
Run your Java apps on Cloud FoundryRun your Java apps on Cloud Foundry
Run your Java apps on Cloud Foundry
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-Services
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with Chef
 
DCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and UpgradeDCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
DCEU 18: Automating Docker Enterprise: Hands-off Install and Upgrade
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
 
Flink 0.10 - Upcoming Features
Flink 0.10 - Upcoming FeaturesFlink 0.10 - Upcoming Features
Flink 0.10 - Upcoming Features
 
Containerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and JavaContainerizing a Web Application with Vue.js and Java
Containerizing a Web Application with Vue.js and Java
 

Similar to Openwhisk - Colorado Meetups

Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingUpkar Lidder
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhiskAlex Glikson
 
Serverless meetup - OpenWhisk overview and architecture
Serverless meetup - OpenWhisk overview and architectureServerless meetup - OpenWhisk overview and architecture
Serverless meetup - OpenWhisk overview and architectureSandeep Paliwal
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and dockerFabio Fumarola
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and DockerFabio Fumarola
 
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...OpenWhisk
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and dockerFabio Fumarola
 
Simplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI APISimplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI APIVictorSzoltysek
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Arun prasath
 
Serverless Pune Meetup 1
Serverless Pune Meetup 1Serverless Pune Meetup 1
Serverless Pune Meetup 1Vishal Biyani
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfLuca Mattia Ferrari
 
Server(less) Swift at SwiftCloudWorkshop 3
Server(less) Swift at SwiftCloudWorkshop 3Server(less) Swift at SwiftCloudWorkshop 3
Server(less) Swift at SwiftCloudWorkshop 3kognate
 
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...Shaun Murakami
 
Serverless Pune meetup 3
Serverless Pune meetup 3Serverless Pune meetup 3
Serverless Pune meetup 3Vishal Biyani
 
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)My own sweet home!
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarArun Kumar
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarArun Kumar
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017Patrick Chanezon
 

Similar to Openwhisk - Colorado Meetups (20)

Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless Computing
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
 
Serverless meetup - OpenWhisk overview and architecture
Serverless meetup - OpenWhisk overview and architectureServerless meetup - OpenWhisk overview and architecture
Serverless meetup - OpenWhisk overview and architecture
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
 
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 ...
 
Develop with linux containers and docker
Develop with linux containers and dockerDevelop with linux containers and docker
Develop with linux containers and docker
 
Apache OpenWhisk
Apache OpenWhiskApache OpenWhisk
Apache OpenWhisk
 
Simplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI APISimplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI API
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
Serverless Pune Meetup 1
Serverless Pune Meetup 1Serverless Pune Meetup 1
Serverless Pune Meetup 1
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
 
Server(less) Swift at SwiftCloudWorkshop 3
Server(less) Swift at SwiftCloudWorkshop 3Server(less) Swift at SwiftCloudWorkshop 3
Server(less) Swift at SwiftCloudWorkshop 3
 
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
 
Serverless Pune meetup 3
Serverless Pune meetup 3Serverless Pune meetup 3
Serverless Pune meetup 3
 
Serverless design with Fn project
Serverless design with Fn projectServerless design with Fn project
Serverless design with Fn project
 
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)開放原始碼 Ch1.2   intro - oss - apahce foundry (ver 2.0)
開放原始碼 Ch1.2 intro - oss - apahce foundry (ver 2.0)
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumar
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumar
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 

Recently uploaded

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxnelietumpap1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 

Recently uploaded (20)

Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Q4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptxQ4 English4 Week3 PPT Melcnmg-based.pptx
Q4 English4 Week3 PPT Melcnmg-based.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 

Openwhisk - Colorado Meetups

  • 1. Introduction to Serverless Computing Upkar Lidder Developer Advocate, IBM > ulidder@us.ibm.com > @lidderupk > blog.upkarlidder.com
  • 3. What is Serverless? 3 Serverless computing refers to the concept of building and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions, are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment. It refers to the idea that consumers of serverless computing no longer need to spend time and resources on server provisioning, maintenance, updates, scaling, and capacity planning. Instead, all of these tasks and capabilities are handled by a serverless platform and are completely abstracted away from the developers - Cloud Native Computing Foundation https://github.com/cncf/wg-serverless/tree/master/whitepapers/serverless-overview
  • 7. Use cases Use Cases 7 Small, focused, asynchronous, concurrent, easy to parallelize into independent units of work Infrequent or has sporadic demand, with large, unpredictable variance in scaling requirements Stateless, ephemeral, without a major need for instantaneous cold start time Highly dynamic in terms of changing business requirements that drive a need for accelerated developer velocity
  • 8. Why Serverless? 8 Active users curve for a new mobile game has a predictable shape, but an unpredictable volume
  • 9. Why Serverless? 9 Active users curve for a mobile conference app has no demand before and after the conference, and huge intraweek swings in demand
  • 10. Why Serverless? 10 Mobile banking apps often have peaks in demand on payday, once every two weeks
  • 11. Server Landscape (Cloud Native Computing Foundation) 11
  • 12. Server Landscape – features 12 Amazon Lambda • Node.js, Python, Java, C# and Go Apache OpenWhisk • Node.js 8, Node.js 6, Python 3.6.4, Python 3.6.1, PHP 7.1, PHP 7.2, and Swift 4, Swift 3.1.1, Ruby 2.5 • Other languages can be added via Docker container (for example Java) • Based on open source OpenWhisk serverless platform. Can create your own serverless platform based on OpenWhisk Microsoft Azure • C#, F#, Node.js (in GA) • Java, Python, PHP, TypeScript, Bash, PowerShell (experimental mode) Google Cloud Function • Node.js, Python • Many many more and constantly changings
  • 13. Apache OpenWhisk 13 Apache OpenWhisk (Incubating) is an open source, distributed Serverless platform that executes functions (fx) in response to events at any scale. The OpenWhisk platform supports a programming model in which developers write functional logic (called Actions), in any supported programming language, that can be dynamically scheduled and run in response to associated events (via Triggers) from external sources ( Feeds) or from HTTP requests.
  • 15. Apache OpenWhisk 15 JS/NodeJS 8 Java Python 3 Swift 4 Docker PHP 7 Go Rust Ruby … bash C
  • 16. Use cases 16DOC ID / September 13, 2018 / © 2018 IBM Corporation Serverless Backends Mobile Backend Data Processing Cognitive Data Processing IoT Ready Event Stream Processing Conversational Scenarios Scheduled Tasks
  • 17. Apache OpenWhisk Entering the system: nginx “an HTTP and reverse proxy server”. Entering the system: Controller serves as the interface for everything a user can do, including CRUD requests for your entities in OpenWhisk and invocation of actions Authentication and Authorization: CouchDB check that the user exists in OpenWhisk’s database and that it has the privilege to invoke the action myAction Getting the action: CouchDB… again Load the action from the whisks database in CouchDB. The record of the action contains mainly the code to execute (shown above) and default parameters that you want to pass to your action, merged with the parameters you included in the actual invoke request. It also contains the resource restrictions imposed on it in execution, such as the memory it is allowed to consume. Who’s there to invoke the action: Load Balancer has a global view of the executors available in the system by checking their health status continuously. Those executors are called Invokers. The Load Balancer, knowing which Invokers are available, chooses one of them to invoke the action requested.
  • 18. Apache OpenWhisk Please form a line: Kafka “a high-throughput, distributed, publish-subscribe messaging system”. Controller and Invoker solely communicate through messages buffered and persisted by Kafka. Actually invoking the code already: Invoker The Invoker’s duty is to invoke an action. To execute actions in an isolated and safe way it uses Docker. Example: the Invoker will start a Node.js container, inject the code from myAction, run it with no parameters, extract the result, save the logs and destroy the Node.js container again. Storing the results: CouchDB again As the result is obtained by the Invoker, it is stored into the activations database as an activation. The record contains both the returned result and the logs written. It also contains the start and end time of the invocation of the action. The system itself mainly consists of only two custom components, the Controller and the Invoker. Everything else is already there, developed by so many people out there in the open-source community.
  • 20. Apache OpenWhisk – create an action Entry point Parameters Return Object
  • 21. Apache OpenWhisk – create an action gson Dependency JAR
  • 24. Apache OpenWhisk – create an action
  • 25. Apache OpenWhisk – create an action Controller Invoker CouchDB POST STATUS PUT STATUS wsk action create helloJava target/hello-world-java.jar --main com.example.FunctionApp -i
  • 26. Apache OpenWhisk – invoke an action
  • 27. Apache OpenWhisk – invoke an action Controller Invoker CouchDB POST STATUS INVOKE {params} STATUS wsk action invoke -ivr helloJava -p name "Upkar Lidder" POST /init POST /run PUTRESULT GETACTION
  • 28. IBM Cloud Functions 28 Open source Hosted service Serverless engine Apache OpenWhisk IBM Cloud Functions API Gateway LoopBack IBM API Gateway Databases Apache CouchDB MySQL IBM Cloudant IBM Compose Message streams Apache Kafka IBM Message Hub
  • 30. Things to consider 30 • Functions are stateless. Need some sort of persistence between runs. • Are you able to test and develop locally ? Does provider have CLI ? • Can you easily version your functions ? Source control ? • Can you easily monitor your functions ? • Security and API gateway • Avoid long-running loops / mini-monoliths ? • Latency (cold, warm and hot loads) • How do you track dependencies ?
  • 32. Resources 32 Lists • https://github.com/anaibol/awesome-serverless • https://github.com/pmuens/awesome-serverless • https://twitter.com/tmclaughbos/lists/serverless Email newsletter • https://serverless.email/ Code Patterns • https://developer.ibm.com/patterns/category/serverless/ Serverless architecture • https://martinfowler.com/articles/serverless.html
  • 34. 1500 Drones Are Ready To Fly 35 IBM Developer Drone Challenge Challenge runs from November 12 through December 16 and those 18 years of age or older residing in the US and Canada are eligible to enter Enter at https://developer.ibm.com/contest Once per week during the 5 weeks of the contest a random drawing Will be held to determine the winners (watch for the drawing on Twitch) Winners will receive a DJI Tello programmable drone, an IBM Developer T-shirt, and an IBM Developer laptop sticker Winners will also receive a special code to unlock more challenges and given the opportunity to contribute back to the challenge #IBMDroneDrop
  • 35. Thank you! Upkar Lidder Developer Advocate, IBM > ulidder@us.ibm.com > @lidderupk > blog.upkarlidder.com