SlideShare a Scribd company logo
1 of 30
Download to read offline
© 2017 IBM Corporation l Interconnect 2017
Build serverless web and mobile APIs
that scale automatically in response to demand
@DanielKrook
Daniel Krook

Software Engineer & Developer Advocate
github.com/krook/oscon
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Increasingfocusonbusinesslogic
Decreasing concern (and control) over stack implementation
Bare Metal
VM VM
VM
Virtual machines
Functions
Containers
Serverless developers focus more on code, less on infrastructure
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Monolithic
Application
Break-down into
microservices
Make each
microservice HA
Protect against
regional outage
Region A
Region B
Microservices can be hard to manage at scale
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Emerging workloads are a good fit for event-driven programming
Execute logic in response to database change
Perform analytics on sensor input messages
Provide cognitive computing via chatbots
Schedule tasks performed for a short time
Invoke autoscaled APIs and mobile backends
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Memory
allocated
(MB)
Time executing
(milliseconds)
Instances
executing
simultaneously
(count)
Cloud resource cost
better matches
business value gained
Not a silver bullet, but this can result in
substantial savings for many workloads
New cost models more accurately charge for usage
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Why serverless? Mobile video game popularity is hard to predictNumberofactiveusers
(unpredictable)
Days since latest release (predictable)
Active users curve for a
new mobile game has a
predictable shape, but an
unpredictable volume
1 5 10
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Why serverless? Conference mobile apps have huge variations in demandNumberofactiveusers
(massivelyvariable)
Days of the week (predictable)
Active users curve for a mobile
conference app has no demand before
and after the conference, and huge
intraweek swings in demand
Monday Tuesday Wednesday Thursday
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Why serverless? Mobile banking often peaks massively on paydayNumberofactiveusers
(stablewithamassivepeak)
Days of the pay period (predictable)
Mobile banking apps often have
peaks in demand on payday,
once every two weeks
Friday
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Apache OpenWhisk
is a cloud platform
that executes code in
response to events
Apache OpenWhisk enables these serverless, event-driven workloads
Provides serverless deployment and operations model
Runs code only on-demand on a per-request basis
Optimized utilization, fine-grained metering at any scale
Flexible, extensible, polyglot programming model
Open source and open ecosystem (Apache Incubator)
Ability to run in public, private, and hybrid models
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Apache
Incubator
OpenWhisk is built on solid open source foundations
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Apache
Incubator
The OpenWhisk ecosystem is growing
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
But what about PaaS and container orchestration?Increasingfocusonbusinesslogic
Decreasing concern (and control) over stack implementation
Full control over infrastructure
and maximum portability
Focus on the application and let
the platform handle the rest
Auto-scaled, event-driven applications
that respond to a variety of triggers
Containers
Applications
Functions
© 2017 IBM Corporation l Interconnect 2017
Apache OpenWhisk
programming model
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Results
Developers work with packages, triggers, actions, and rules
Package
(feed)
Packages provide integration
with external event sources
P
Trigger
(event)
T
Data sources define events
they emit as Triggers
Rule (map)R
Action
(function)
A
Developers map Actions
to Triggers via Rules
Data sources define events
they emit as Triggers.
Developers map Actions to
Triggers via Rules.
T
A
R
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Triggers
A class of events that can occurT
Social events
Data changes
Device readings Location updates
User input
Invocations can be blocking, non-blocking, or periodic
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Actions
Code that runs in response to an event
(that is, an event handler)
A
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Actions
Can be written in a variety of languages, such as
JavaScript, Python, Java, PHP, and Swift
A
function main(params) {
return { message: 'Hello, ' + params.name + ' from ' + params.place };
};
Multi-
language
Support
JS/NodeJS 8
Java
Python 3
Swift 4
Docker
PHP 7
Community
Efforts
Go
Rust
Ruby
…
bash
C
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Actions
Can be written in a variety of languages, such as
JavaScript, Python, Java, PHP, and Swift
A
function main(params) {
return { message: 'Hello, ' + params.name + ' from ' + params.place };
};
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Actions
Or any other language by packaging with DockerA
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
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
Plus:
• Sequencing
• Conditionals
• Loops
• Error handling
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Rules
An association of a trigger to an action
in a many to many mapping.
R
R := T A
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
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
© 2017 IBM Corporation l Interconnect 2017
Apache OpenWhisk
in action
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
OpenWhisk awaits events, fetches mapped code, runs it in a container
Pool of actions
Swift DockerJS
Trigger
1
Running
action
Running
action
Running
action
3
OpenWhisk
Engine
2 A
T
AAA
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Open source software as a service on the IBM Cloud
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
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Demo 1: Your first OpenWhisk trigger, action, and rule
$ bx wsk action create handler handler.js
$ bx wsk action invoke --blocking handler
$ bx wsk trigger create every-20-seconds 
--feed /whisk.system/alarms/alarm 
--param cron "*/20 * * * * *" 
--param maxTriggers 15
$ bx wsk rule create 
invoke-periodically 
every-20-seconds 
handler
Trigger
1
Running
action
2
T
A
1. Cron syntax alarm
2. Log the current time
$ bx wsk activation poll
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Demo 2: Mapping an HTTP request to an action
These demo actions are written in JavaScript.
But you could write the equivalent in Swift to reuse the same skills on mobile device and backend services.
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Demo 3: HTTP REST APIs with full create, read, update, delete methods
Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon
Delivered as

Open source via Apache
openwhisk.org
Managed OpenWhisk with
IBM Cloud Functions
bluemix.net/openwhisk
Get started with Apache OpenWhisk
github.com/openwhisk
slack.openwhisk.org
twitter.com/openwhisk
medium.com/openwhisk
© 2017 IBM Corporation l Interconnect 2017
Build serverless web and mobile APIs
that scale automatically in response to demand
@DanielKrook
Daniel Krook

Software Engineer & Developer Advocate
github.com/krook/oscon

More Related Content

What's hot

Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...
Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...
Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...Daniel Krook
 
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: KeynoteOpenWhisk
 
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...OpenWhisk
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture Dev_Events
 
OpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven appsOpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven appsDaniel Krook
 
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 platformDaniel Krook
 
Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017Jin Gi Kong
 
Building Serverless Applications on the Apache OpenWhisk Platform
Building Serverless Applications on the Apache OpenWhisk PlatformBuilding Serverless Applications on the Apache OpenWhisk Platform
Building Serverless Applications on the Apache OpenWhisk PlatformJoe Sepi
 
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
 
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 StrategyOpenWhisk
 
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 JavaNiklas Heidloff
 
How to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 MinutesHow to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 MinutesNiklas Heidloff
 
Reactive Microservices with Quarkus
Reactive Microservices with QuarkusReactive Microservices with Quarkus
Reactive Microservices with QuarkusNiklas Heidloff
 
Serverless apps with OpenWhisk
Serverless apps with OpenWhiskServerless apps with OpenWhisk
Serverless apps with OpenWhiskDaniel Krook
 
OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017Carlos Santana
 
Api more than payload (2021 Update)
Api more than payload (2021 Update)Api more than payload (2021 Update)
Api more than payload (2021 Update)Phil Wilkins
 
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaJakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaNiklas Heidloff
 
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...Daniel Krook
 
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
 
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 modelPhilippe Suter
 

What's hot (20)

Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...
Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...
Cloud Native Architectures with an Open Source, Event Driven, Serverless Plat...
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: KeynoteIBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
 
IBM Bluemix OpenWhisk: Serverless Conference 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...
 
OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture OpenWhisk - Serverless Architecture
OpenWhisk - Serverless Architecture
 
OpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven appsOpenWhisk - A platform for cloud native, serverless, event driven apps
OpenWhisk - A platform for cloud native, serverless, event driven apps
 
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
 
Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017Apache OpenWhisk - KRnet 2017
Apache OpenWhisk - KRnet 2017
 
Building Serverless Applications on the Apache OpenWhisk Platform
Building Serverless Applications on the Apache OpenWhisk PlatformBuilding Serverless Applications on the Apache OpenWhisk Platform
Building Serverless Applications on the Apache OpenWhisk 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 ...
 
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
 
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
 
How to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 MinutesHow to develop your first cloud-native Applications with Java - 30 Minutes
How to develop your first cloud-native Applications with Java - 30 Minutes
 
Reactive Microservices with Quarkus
Reactive Microservices with QuarkusReactive Microservices with Quarkus
Reactive Microservices with Quarkus
 
Serverless apps with OpenWhisk
Serverless apps with OpenWhiskServerless apps with OpenWhisk
Serverless apps with OpenWhisk
 
OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017OpenWhisk Meetup - Austin, TX 07/2017
OpenWhisk Meetup - Austin, TX 07/2017
 
Api more than payload (2021 Update)
Api more than payload (2021 Update)Api more than payload (2021 Update)
Api more than payload (2021 Update)
 
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with JavaJakarta Tech Talk: How to develop your first cloud-native Application with Java
Jakarta Tech Talk: How to develop your first cloud-native Application with Java
 
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...
 
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 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
 

Similar to Build Serverless APIs that Scale Automatically

Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed? Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed? Dev_Events
 
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...Animesh Singh
 
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Dev_Events
 
Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingUpkar Lidder
 
Microservices and Serverless Computing - OpenWhisk
Microservices and Serverless Computing - OpenWhiskMicroservices and Serverless Computing - OpenWhisk
Microservices and Serverless Computing - OpenWhiskVidyasagar Machupalli
 
The Future of Web Application Architectures
The Future of Web Application ArchitecturesThe Future of Web Application Architectures
The Future of Web Application ArchitecturesLucas Carlson
 
Mobile, Open Source, and the Drive to the Cloud
Mobile, Open Source, and the Drive to the CloudMobile, Open Source, and the Drive to the Cloud
Mobile, Open Source, and the Drive to the CloudDev_Events
 
Mobile, Open Source, & the Drive to the Cloud
Mobile, Open Source, & the Drive to the CloudMobile, Open Source, & the Drive to the Cloud
Mobile, Open Source, & the Drive to the CloudDev_Events
 
Creating microservices architectures using node.js and Kubernetes
Creating microservices architectures using node.js and KubernetesCreating microservices architectures using node.js and Kubernetes
Creating microservices architectures using node.js and KubernetesPaul Goldbaum
 
Docker serverless v1.0
Docker serverless v1.0Docker serverless v1.0
Docker serverless v1.0Thomas Chacko
 
Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Patrick Chanezon
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Patrick Chanezon
 
Serverless forwardjs
Serverless forwardjsServerless forwardjs
Serverless forwardjsUpkar Lidder
 
Containers as a Service with Docker
Containers as a Service with DockerContainers as a Service with Docker
Containers as a Service with DockerDocker, Inc.
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Patrick Chanezon
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?Niklas Heidloff
 
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studiesOpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studiesAlex Ellis
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global dominationStfalcon Meetups
 

Similar to Build Serverless APIs that Scale Automatically (20)

Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed? Being serverless and Swift... Is that allowed?
Being serverless and Swift... Is that allowed?
 
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
 
Serverless Apps with Open Whisk
Serverless Apps with Open Whisk Serverless Apps with Open Whisk
Serverless Apps with Open Whisk
 
Apache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless ComputingApache OpenWhisk Serverless Computing
Apache OpenWhisk Serverless Computing
 
Microservices and Serverless Computing - OpenWhisk
Microservices and Serverless Computing - OpenWhiskMicroservices and Serverless Computing - OpenWhisk
Microservices and Serverless Computing - OpenWhisk
 
The Future of Web Application Architectures
The Future of Web Application ArchitecturesThe Future of Web Application Architectures
The Future of Web Application Architectures
 
Mobile, Open Source, and the Drive to the Cloud
Mobile, Open Source, and the Drive to the CloudMobile, Open Source, and the Drive to the Cloud
Mobile, Open Source, and the Drive to the Cloud
 
Mobile, Open Source, & the Drive to the Cloud
Mobile, Open Source, & the Drive to the CloudMobile, Open Source, & the Drive to the Cloud
Mobile, Open Source, & the Drive to the Cloud
 
Apache OpenWhisk
Apache OpenWhiskApache OpenWhisk
Apache OpenWhisk
 
Creating microservices architectures using node.js and Kubernetes
Creating microservices architectures using node.js and KubernetesCreating microservices architectures using node.js and Kubernetes
Creating microservices architectures using node.js and Kubernetes
 
Docker serverless v1.0
Docker serverless v1.0Docker serverless v1.0
Docker serverless v1.0
 
0507 057 01 98 * Adana Klima Tamir Servisi
0507 057 01 98 * Adana Klima Tamir Servisi0507 057 01 98 * Adana Klima Tamir Servisi
0507 057 01 98 * Adana Klima Tamir Servisi
 
Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016Docker Container As A Service - JAX 2016
Docker Container As A Service - JAX 2016
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016
 
Serverless forwardjs
Serverless forwardjsServerless forwardjs
Serverless forwardjs
 
Containers as a Service with Docker
Containers as a Service with DockerContainers as a Service with Docker
Containers as a Service with Docker
 
Docker Container As A Service - March 2016
Docker Container As A Service - March 2016Docker Container As A Service - March 2016
Docker Container As A Service - March 2016
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studiesOpenFaaS - zero serverless in 60 seconds anywhere with case-studies
OpenFaaS - zero serverless in 60 seconds anywhere with case-studies
 
Front-end. Global domination
Front-end. Global dominationFront-end. Global domination
Front-end. Global domination
 

More from Daniel Krook

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...Daniel Krook
 
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...Daniel Krook
 
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 TechnologyDaniel Krook
 
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!Daniel Krook
 
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 SoftLayerDaniel Krook
 
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
 
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
 
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...Daniel Krook
 
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 GroupDaniel Krook
 
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 CodeDaniel Krook
 
Dockerizing OpenStack for High Availability
Dockerizing OpenStack for High AvailabilityDockerizing OpenStack for High Availability
Dockerizing OpenStack for High AvailabilityDaniel Krook
 
Power Systems Projects in Research
Power Systems Projects in ResearchPower Systems Projects in Research
Power Systems Projects in ResearchDaniel Krook
 
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 ChainsDaniel Krook
 
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 SwiftDaniel Krook
 
Docker Container Cloud
Docker Container CloudDocker Container Cloud
Docker Container CloudDaniel Krook
 
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 architectureDaniel Krook
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developersDaniel Krook
 

More from Daniel Krook (17)

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
 
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!
 
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
 
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
CAPS: What's best for deploying and managing OpenStack? Chef vs. Ansible vs. ...
 
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
The Containers Ecosystem, the OpenStack Magnum Project, the Open Container In...
 
Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...
Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...
Quickly build and deploy a scalable OpenStack Swift application using IBM Blu...
 
Finding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User GroupFinding and Organizing a Great Cloud Foundry User Group
Finding and Organizing a Great Cloud Foundry User Group
 
IBM and OpenStack: Collaboration Beyond the Code
IBM and OpenStack: Collaboration Beyond the CodeIBM and OpenStack: Collaboration Beyond the Code
IBM and OpenStack: Collaboration Beyond the Code
 
Dockerizing OpenStack for High Availability
Dockerizing OpenStack for High AvailabilityDockerizing OpenStack for High Availability
Dockerizing OpenStack for High Availability
 
Power Systems Projects in Research
Power Systems Projects in ResearchPower Systems Projects in Research
Power Systems Projects in Research
 
Neutron Networking: Service Groups, Policies and Chains
Neutron Networking: Service Groups, Policies and ChainsNeutron Networking: Service Groups, Policies and Chains
Neutron Networking: Service Groups, Policies and Chains
 
Advanced Data Retrieval and Analytics with Apache Spark and Openstack Swift
Advanced Data Retrieval and Analytics with Apache Spark and Openstack SwiftAdvanced Data Retrieval and Analytics with Apache Spark and Openstack Swift
Advanced Data Retrieval and Analytics with Apache Spark and Openstack Swift
 
Docker Container Cloud
Docker Container CloudDocker Container Cloud
Docker Container Cloud
 
Building a hybrid, dynamic cloud on an open architecture
Building a hybrid, dynamic cloud on an open architectureBuilding a hybrid, dynamic cloud on an open architecture
Building a hybrid, dynamic cloud on an open architecture
 
Cloud Foundry for PHP developers
Cloud Foundry for PHP developersCloud Foundry for PHP developers
Cloud Foundry for PHP developers
 

Recently uploaded

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
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.docxComplianceQuest1
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
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...ICS
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
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 ApplicationsAlberto González Trastoy
 

Recently uploaded (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
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
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
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...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
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
 

Build Serverless APIs that Scale Automatically

  • 1. © 2017 IBM Corporation l Interconnect 2017 Build serverless web and mobile APIs that scale automatically in response to demand @DanielKrook Daniel Krook Software Engineer & Developer Advocate github.com/krook/oscon
  • 2. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Increasingfocusonbusinesslogic Decreasing concern (and control) over stack implementation Bare Metal VM VM VM Virtual machines Functions Containers Serverless developers focus more on code, less on infrastructure
  • 3. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Monolithic Application Break-down into microservices Make each microservice HA Protect against regional outage Region A Region B Microservices can be hard to manage at scale
  • 4. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Emerging workloads are a good fit for event-driven programming Execute logic in response to database change Perform analytics on sensor input messages Provide cognitive computing via chatbots Schedule tasks performed for a short time Invoke autoscaled APIs and mobile backends
  • 5. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Memory allocated (MB) Time executing (milliseconds) Instances executing simultaneously (count) Cloud resource cost better matches business value gained Not a silver bullet, but this can result in substantial savings for many workloads New cost models more accurately charge for usage
  • 6. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Why serverless? Mobile video game popularity is hard to predictNumberofactiveusers (unpredictable) Days since latest release (predictable) Active users curve for a new mobile game has a predictable shape, but an unpredictable volume 1 5 10
  • 7. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Why serverless? Conference mobile apps have huge variations in demandNumberofactiveusers (massivelyvariable) Days of the week (predictable) Active users curve for a mobile conference app has no demand before and after the conference, and huge intraweek swings in demand Monday Tuesday Wednesday Thursday
  • 8. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Why serverless? Mobile banking often peaks massively on paydayNumberofactiveusers (stablewithamassivepeak) Days of the pay period (predictable) Mobile banking apps often have peaks in demand on payday, once every two weeks Friday
  • 9. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Apache OpenWhisk is a cloud platform that executes code in response to events Apache OpenWhisk enables these serverless, event-driven workloads Provides serverless deployment and operations model Runs code only on-demand on a per-request basis Optimized utilization, fine-grained metering at any scale Flexible, extensible, polyglot programming model Open source and open ecosystem (Apache Incubator) Ability to run in public, private, and hybrid models
  • 10. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Apache Incubator OpenWhisk is built on solid open source foundations
  • 11. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Apache Incubator The OpenWhisk ecosystem is growing
  • 12. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon But what about PaaS and container orchestration?Increasingfocusonbusinesslogic Decreasing concern (and control) over stack implementation Full control over infrastructure and maximum portability Focus on the application and let the platform handle the rest Auto-scaled, event-driven applications that respond to a variety of triggers Containers Applications Functions
  • 13. © 2017 IBM Corporation l Interconnect 2017 Apache OpenWhisk programming model
  • 14. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Results Developers work with packages, triggers, actions, and rules Package (feed) Packages provide integration with external event sources P Trigger (event) T Data sources define events they emit as Triggers Rule (map)R Action (function) A Developers map Actions to Triggers via Rules Data sources define events they emit as Triggers. Developers map Actions to Triggers via Rules. T A R
  • 15. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Triggers A class of events that can occurT Social events Data changes Device readings Location updates User input Invocations can be blocking, non-blocking, or periodic
  • 16. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Actions Code that runs in response to an event (that is, an event handler) A
  • 17. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Actions Can be written in a variety of languages, such as JavaScript, Python, Java, PHP, and Swift A function main(params) { return { message: 'Hello, ' + params.name + ' from ' + params.place }; }; Multi- language Support JS/NodeJS 8 Java Python 3 Swift 4 Docker PHP 7 Community Efforts Go Rust Ruby … bash C
  • 18. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Actions Can be written in a variety of languages, such as JavaScript, Python, Java, PHP, and Swift A function main(params) { return { message: 'Hello, ' + params.name + ' from ' + params.place }; };
  • 19. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Actions Or any other language by packaging with DockerA
  • 20. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon 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 Plus: • Sequencing • Conditionals • Loops • Error handling
  • 21. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Rules An association of a trigger to an action in a many to many mapping. R R := T A
  • 22. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon 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
  • 23. © 2017 IBM Corporation l Interconnect 2017 Apache OpenWhisk in action
  • 24. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon OpenWhisk awaits events, fetches mapped code, runs it in a container Pool of actions Swift DockerJS Trigger 1 Running action Running action Running action 3 OpenWhisk Engine 2 A T AAA
  • 25. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Open source software as a service on the IBM Cloud 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
  • 26. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Demo 1: Your first OpenWhisk trigger, action, and rule $ bx wsk action create handler handler.js $ bx wsk action invoke --blocking handler $ bx wsk trigger create every-20-seconds --feed /whisk.system/alarms/alarm --param cron "*/20 * * * * *" --param maxTriggers 15 $ bx wsk rule create invoke-periodically every-20-seconds handler Trigger 1 Running action 2 T A 1. Cron syntax alarm 2. Log the current time $ bx wsk activation poll
  • 27. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Demo 2: Mapping an HTTP request to an action These demo actions are written in JavaScript. But you could write the equivalent in Swift to reuse the same skills on mobile device and backend services.
  • 28. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Demo 3: HTTP REST APIs with full create, read, update, delete methods
  • 29. Serverless Web and Mobile APIs@DanielKrook github.com/krook/oscon Delivered as
 Open source via Apache openwhisk.org Managed OpenWhisk with IBM Cloud Functions bluemix.net/openwhisk Get started with Apache OpenWhisk github.com/openwhisk slack.openwhisk.org twitter.com/openwhisk medium.com/openwhisk
  • 30. © 2017 IBM Corporation l Interconnect 2017 Build serverless web and mobile APIs that scale automatically in response to demand @DanielKrook Daniel Krook Software Engineer & Developer Advocate github.com/krook/oscon