The document provides an overview of IBM Cloud Functions (formerly known as IBM Bluemix OpenWhisk) and serverless computing. It discusses what serverless computing is, how IBM Cloud Functions works, the benefits over traditional infrastructure, supported languages and triggers, use cases, and demos of serverless applications that have been built on IBM Cloud Functions.
6. IBM Cloud FunctionsWhat is serverless aka Functions as a Service?
Runs code only
on-demand on a
per-request basis
7. IBM Cloud Functions
Runs code only on-demand on
a per-request basis
Serverless
deployment &
operations model
VM
No servers Just code
What is serverless aka Functions as a Service?
8. IBM Cloud Functions
Runs code only on-demand on
a per-request basis
“Serverless is for
compute what
object storage is
for storage”
VM
No servers Just code
What is serverless aka Functions as a Service?
9. IBM Cloud Functions
Runs code only on-demand on
a per-request basis
Optimal
utilization &
granular pricing
z
zz
time
charged
What is serverless aka Functions as a Service?
10. IBM Cloud Functions
Runs code only on-demand on
a per-request basis
Scales on
a per-request
basis
What is serverless aka Functions as a Service?
12. IBM Cloud FunctionsWhy is serverless better than a traditional approach?
CF Container VM
2
Application
1a
Requests
1b
Polling
Worry about scaling
•
•
When to scale? (mem-, cpu-, response time-, etc. driven?)
How fast can you scale?
Worry about resiliency & cost
•
•
•
At least 2 processes for HA
Keep them running & healthy
Deployment in multiple regions
Charged even when idling / not 100% utilized
Continuous polling due to missing event programming model
Traditional model
Process
and Idle
13. IBM Cloud Functions
Trigger
1
2
OpenWhis
k Engine
Pool ofActions
Js Swift
Java Docker Python
Runnin
g
Action
Runnin
g
Action
Runnin
g
Action
3
Scales inherently
• One process per request
No cost overhead for resiliency
• No long running process to be made HA / multi-region
Introduces event programming model
Charges only for what is used
• Only worry about code
higher dev velocity, lower operational costs
Serverless model
Deploy actions
within millisecs,
run it, free up
resources
Why is serverless better than a traditional approach?
16. IBM Cloud Functions
FaaS platform to execute code
in response to events
Delivered as
Open source via Apache
openwhisk.incubator.apache.org
What is IBM Cloud Functions?
17. IBM Cloud Functions
FaaS platform to execute code
in response to events
Managed service on
IBM Cloud
ibm.biz/functions
What is IBM Cloud Functions?
25. IBM Cloud Functions
Allows to package all puzzle pieces of
a server less application into a single
project and deploy it in a vendor-
agnostic way.
Improved Serverless
Framework support
What is IBM Cloud Functions?
27. IBM Cloud Functions
IBM Cloud
Functions allows
you to build up an
entirely serverless
application
architecture
Openwhisk
IOT
Mobile
Cognitive
APIs
Data
What is serverless good for?
Functions
28. IBM Cloud Functions
Volatile workload that can
be split in smaller short-
running pieces.
Suited for sporadic as well
as heavy load scenarios.
What is serverless good for?
29. IBM Cloud Functions
API Gateway
support
Allows to map API endpoints
to Cloud Functions actions
Serverless microservice APIs/backend
Available for free, without limits
Define API Endpoints (URLs) and map to Actions Define Actions:
getCustomer
createCustomer
deleteCustomer
1
Get: mydomain.com/…/customers
Post: mydomain.com/…/customers
Delete: mydomain.com/…/customers
2
What is serverless good for?
30. IBM Cloud FunctionsgetCostumer
createCostumer
deleteCostumer
3
Easy to add and edit:
Security (API key, API secret, OAuth validation, CORS)
Rate-Limiting
Map actions to API endpoints (OpenAPI Doc creation)
Easy socialization (sharing, API key creation)
Analytics (API calls, errors, response time)
Test your API (API Explorer)
Upload Swagger/OpenAPI Doc
2 1
What is serverless good for?
31. IBM Cloud Functions
Use cases
• Web and Mobile backend
• Data Processing
• Cognitive
• IoT
• Scheduled Tasks
• Chatbots
What is serverless good for?
39. IBM Cloud Functions
Basically, OpenWhisk is based on
Docker… but we added some
smartness to meet our performance
goals…
Behind the scenes:
It’s about containers
How does Cloud Functions work behind the scenes?
40. IBM Cloud Functions
A
wsk action invoke docker run
=≈
How does Cloud Functions work behind the scenes?
41. IBM Cloud Functions
Start container
docker run
Initialize
/init
Run
/run
cold container
How does Cloud Functions work behind the scenes?
44. IBM Cloud Functions
cold container pre-warmed container warm container
faster
Performance is king…
How does Cloud Functions work behind the scenes?