SlideShare a Scribd company logo
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 Kubernetes
Antons Kranga
 
Docker on AWS - the Right Way
Docker on AWS - the Right WayDocker on AWS - the Right Way
Docker on AWS - the Right Way
AllCloud
 
Learning chef
Learning chefLearning chef
Learning chef
Jonathan Carrillo
 
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
BlazeMeter
 
Efficient Parallel Testing with Docker
Efficient Parallel Testing with DockerEfficient Parallel Testing with Docker
Efficient Parallel Testing with Docker
Laura 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 Arquillian
Virtual JBoss User Group
 
Nike pop up habitat
Nike pop up   habitatNike pop up   habitat
Nike pop up habitat
Chef
 
Implementing your own Google App Engine
Implementing your own Google App Engine Implementing your own Google App Engine
Implementing your own Google App Engine
Virtual JBoss User Group
 
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
Perforce
 
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
Mandi 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 2014
Robert 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 Foundry
Andy 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-Services
Carlos Sanchez
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with Chef
Michael 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 Upgrade
Docker, Inc.
 
Hacking on WildFly 9
Hacking on WildFly 9Hacking on WildFly 9
Hacking on WildFly 9
Virtual JBoss User Group
 
Flink 0.10 - Upcoming Features
Flink 0.10 - Upcoming FeaturesFlink 0.10 - Upcoming Features
Flink 0.10 - Upcoming Features
Aljoscha 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 Java
Jadson 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 Computing
Upkar Lidder
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
Alex Glikson
 
Serverless meetup - OpenWhisk overview and architecture
Serverless meetup - OpenWhisk overview and architectureServerless meetup - OpenWhisk overview and architecture
Serverless meetup - OpenWhisk overview and architecture
Sandeep Paliwal
 
Linux containers and docker
Linux containers and dockerLinux containers and docker
Linux containers and docker
Fabio Fumarola
 
2 Linux Container and Docker
2 Linux Container and Docker2 Linux Container and Docker
2 Linux Container and Docker
Fabio 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 docker
Fabio Fumarola
 
Apache OpenWhisk
Apache OpenWhiskApache OpenWhisk
Apache OpenWhisk
Simon Sasaki
 
Simplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI APISimplified DevOps Bliss -with OpenAI API
Simplified DevOps Bliss -with OpenAI API
VictorSzoltysek
 
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 1
Vishal Biyani
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
Red Hat
 
Server(less) Swift at SwiftCloudWorkshop 3
Server(less) Swift at SwiftCloudWorkshop 3Server(less) Swift at SwiftCloudWorkshop 3
Server(less) Swift at SwiftCloudWorkshop 3
kognate
 
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 3
Vishal Biyani
 
Serverless design with Fn project
Serverless design with Fn projectServerless design with Fn project
Serverless design with Fn project
Siva Rama Krishna Chunduru
 
開放原始碼 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 kumar
Arun Kumar
 
Cloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumarCloudexpowest opensourcecloudcomputing-1by arun kumar
Cloudexpowest opensourcecloudcomputing-1by arun kumar
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
Patrick 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

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 

Recently uploaded (20)

TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 

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