SlideShare a Scribd company logo
The ‘Serverless‘ Paradigm, OpenWhisk and
FIWARE
Alex Glikson
Cloud Platforms, IBM Research
Architect, FIWARE Cloud Hosting
glikson@il.ibm.com
FIWARE Summit, Malaga, Spain
December 13-15, 2016
https://www.fiware.org/summit/
Outline
1. Overview of Serverless
2. OpenWhisk – open source ‘Serverless’ platform
3. Challenges of Serverless
4. Serverless and FIWARE
1
Serverless in a Nutshell
 ‘Next-gen’ PaaS (developers just write the business logic)
 for services decomposable into events/requests & handlers
 scaled, metered [and charged] by individual handler invocation
* The motivation behind the ‘serverless’ term is that the application provider
doesn’t need to care about managing the underlying servers (introduced by
Amazon, who didn’t have fully managed PaaS offering before Lambda)
2
analyze
reading
OpenWhisk
create
order
alert
customer
alarm
changes changes
service order appliance
events
IBM
Watson
IoT
Example: bit.ly/open-fridge
@ Daniel Krook
The Essence of Serverless
 What is Serverless?
• ‘Serverless’ is a cloud-native design pattern, accompanied
with a programming model and a runtime architecture
• Aimed at radically simplified, faster and more efficient
development and operation of (certain) applications
 The Pattern
• Application is architected a set of ‘business logic’ functions,
local or remote, triggered by discrete events or requests
• The underlying runtime is (infinitely) elastic, with scaling (and
chargeback) granularity of single function invocation (100ms)
• Each local function is invoked in a sandbox, which is short-
lived and ephemeral (interacting with stateful services)
4
Serverless Market
 Amazon Lambda
• Pioneer of serverless, launched in Nov 2014
• Rapid growth, dedicated mini-con at Re:Invent 2016
 Similar offerings by other commercial cloud providers
• Google Functions, Azure Functions, IBM OpenWhisk
 Multiple niche players
• iron.io, pubnub.com, etc
 OpenWhisk – the open source serverless platform
• Developed by IBM, now under incubation in Apache (w/Adobe)
• Also offered on IBM Bluemix as a fully managed service
5
What is serverless good for?
6
Example: Serverless at Thomson Reuters
7
https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=8674
Example: Serverless at Bustle
8
https://aws.amazon.com/solutions/case-studies/bustle/
Example: Serverless at Expedia
9
https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=8671
Example: Serverless at Expedia
10
https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=8671
Serverless: Why Now? The Perfect Storm
11
Serverless
PaaS Evolution
Developers enjoy the ‘low touch’
experience, but scaling is a challenge
Event-Driven Use-Cases
More application can be architected
as a collection of events and handlers
Containers Maturity
Technologies for fine-grained
sandboxing become mainstream
API Economy
Proliferation of RESTful, composable
(micro)services, often charged by API call
Image: http://bobkaylor.typepad.com/bob_kaylor/2012/01/the-meaning-of-jesus-part-2-the-perfect-storm.html
OpenWhisk:
Open Source Serverless Platform
Trigger
Package
Feed
Package
Feed
Package
Feed
Package
Feed
REST
CLI iOS SDK
CRUD triggers, actions, and rules
Invoke actions
UI
Action
NodeJS
Action
Swift
Action
Docker
Rule
Rule
Rule
Action
NodeJS
Action
Docker
Service ecosytem
Bluemix services
3rd party services
Self-enabled services
Chain Chain Invoke
Docker (and potentially other abstractions going forward)
API Gateway*
* work in progress
OpenWhisk Tenets:
• Fully open (source, dev, community, ecosystem)
• Extensible (feeds, actions, packages)
• Polyglot (JS, Python, Swift, Java, *any*/docker)
• Composable (e.g., sequences)
• Per-event/request scaling, metering
https://github.com/openwhisk
OpenWhisk Internal Architecture
13
Controller
…Invoker InvokerInvoker
OpenWhisk Catalog
 Cron
 Utils (e.g., jq)
 CouchDB/Cloudant
 Object Storage
 MQTT
 Kafka
 Node-RED
* Some of the above are work in progress
14
 Github
 Slack
 IBM Watson
 Weather
 WebHooks
 Mobile Push
 etc
OpenWhisk CLI: Create and test action
Create the Action that analyzes IoT readings, then stores in the database
wsk action create analyze-service-event analyze-service-event.js 
--param cloudant_user $CLOUDANT_USER
--param cloudant_pass $CLOUDANT_PASS
Invoke the Action manually with sample message data to test
wsk action invoke --blocking --result analyze-service-event
--param service '{"appliance_serial": "xxxxyyyyzzzz", "part_number":
"ddddeeeeffff", "reading": 13, "timestamp": 1466188262}'
OpenWhisk CLI: Link trigger to action
Create the Trigger that subscribes to an MQTT topic pattern
wsk trigger create openfridge-feed-trigger 
--feed mqtt/mqtt-feed-action
--param topic 'iot-2/type/+/id/+/evt/+/fmt/json'
--param url 'ssl://example.messaging.internetofthings.ibmcloud.com:8883’
Link the Trigger to the Action using a Rule
wsk rule create --enable openfridge-feed-rule 
openfridge-feed-trigger analyze-service-event
OpenWhisk and API Gateway Coming
soon...
• OpenWhisk CLI is extended to to allow user to define routes for
actions
$ wsk action create hello hello.js
$ wsk api create GET /v1/hello hello
Route URL:
https://api-gw.mybluemix.net/api/ /nsuuid/v1/hello
$ curl –XGET https://api-gw.mybluemix.net/api/ /nsuuid/v1/hello
{ message: ”Hello World” }
1
Browser
Mobile App
Web App
APIGateway
2
OpenWhisk
3 Invoke associated
OpenWhisk action
„getCustomers“
Swift DockerJS Python Java
Incoming HTTP request, e.g. HTTP GET
api-gw.mybluemix.net/…/getCustomers
- API Gateway takes care of…
- security (authenticate, authorize, threat protect, validate)
- control (rate limiting, response caching)
- mediation
- parameter mapping
- schema validation
- etc
OpenWhisk Debugger
(https://github.com/openwhisk/openwhisk-debugger )
 Allows to…
• debug actions locally
• inspect parameter values
• edit code & push changes
 Supports debugging…
• NodeJS, Python and Swift actions
OpenWhisk on OpenStack
https://developer.ibm.com/openwhisk/2016/08/08/multicloud-openwhisk-build-a-distributed-openwhisk-deployment-on-openstack/
19
Challenges of Serverless
 Opinionated programming model
• Aligned with 12-factor approach to cloud-native applications
 Per-invocation latency & overhead
 High-performance persistent state
 Life cycle of composite serverless applications
 Monitoring, error handling, testing, debugging
20
Proposal: Serverless/OpenWhisk in FIWARE
 FIWARE is an open source platform, community and ecosystem for
context-aware cloud-based applications enabled by Big Data and IoT
• OpenWhisk shares similar open principles and philosophy
 Serverless capabilities (based on OpenWhisk) can simplify development
and hosting of FIWARE applications, e.g.,
• Simple interface to develop and run actions (in various programming
languages), integrated into FIWARE user experience
□ FIWARE WireCloud integration/frontend?
• OpenWhisk packages surfacing APIs of individual FIWARE Generic
Enablers (GEs) as OpenWhisk triggers and actions
• FIWARE Orion/NGSI package encapsulating generic context operations
(queries, updates), subscription feed
□ Feed provider via Cygnus  OpenWhisk bridge
• GE developers could take advantage of OpenWhisk too
21
https://www.fiware.org/
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
Alex Glikson
Cloud Platforms, IBM Research
Architect, FIWARE Cloud Hosting
glikson@il.ibm.com
OpenWhisk on IBM Bluemix
23
Getting started with OpenWhisk in Bluemix
Click here and run your first action in 30 secs:
https://console.ng.bluemix.net/openwhisk/
Associate an action
with event triggers:
Serverless check processing with OpenWhisk
https://github.com/krook/openchecks
Serverless can handle many cloud native app 12 Factors
I Codebase Handled by developer (Manage versioning of functions on their own)
II Dependencies Handled by developer, facilitated by serverless platform (Runtimes and packages)
III Config Handled by platform (Environment variables or injected event parameters)
IV Backing services Handled by platform (Connection information injected as event parameters)
V Build, release, run Handled by platform (Deployed resources are immutable and internally versioned)
VI Processes Handled by platform (Single stateless containers often used)
VII Port binding Handled by platform (Actions or functions are automatically discovered)
VIII Concurrency Handled by platform (Process model is hidden and scales in response to demand)
IX Disposability Handled by platform (Lifecycle is hidden from the user, fast startup and elastic scale is prioritized)
X Dev/prod parity Handled by developer (The developer is the deployer. Scope of what differs is narrower)
XI Logs Handled by platform (Developer writes to console.log, platform handles log streaming)
XII Admin processes Handled by developer (No distinction between one off processes and long running)

More Related Content

PDF
How to Install & Configure Your Own Identity Manager GE
PPTX
FIWARE Primer - Learn FIWARE in 60 Minutes
PDF
how to use openstack api
PDF
FIWARE Developers Week_Bootcamp_presentation
PDF
CI / CD / CS - Continuous Security in Kubernetes
PDF
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
PDF
Terraform 101: What's infrastructure as code?
KEY
OpenStack APIs: Present and Future (Beta Talk)
How to Install & Configure Your Own Identity Manager GE
FIWARE Primer - Learn FIWARE in 60 Minutes
how to use openstack api
FIWARE Developers Week_Bootcamp_presentation
CI / CD / CS - Continuous Security in Kubernetes
MongoDB.local DC 2018: MongoDB Ops Manager + Kubernetes
Terraform 101: What's infrastructure as code?
OpenStack APIs: Present and Future (Beta Talk)

What's hot (20)

PDF
London HUG 19/5 - Kubernetes and vault
PDF
Kubernetes for Beginners
PDF
Vulnerability Exploitation in Docker Container Environments
PDF
Zombies in Kubernetes
PDF
Reactive applications Linux Day 2013
PDF
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
PPTX
Application Modernization with PKS / Kubernetes
PDF
Open Canary - novahackers
PDF
Cisco Cloud Networking Workshop
PDF
Learn OpenStack from trystack.cn
PPT
OaaS:Open as a Strategy
PPTX
The Challenges of Becoming Cloud Native
PDF
Metaswitch Project Calico
PDF
JEE on DC/OS
PDF
Docker openstack-2014
PDF
Kubernetes - security you need to know about it
PDF
OpenStack: Security Beyond Firewalls
PDF
Clocker, Calico and Docker
PDF
SpringBoot and Spring Cloud Service for MSA
PDF
WWCode Dallas - Kubernetes: Learning from Zero to Production
London HUG 19/5 - Kubernetes and vault
Kubernetes for Beginners
Vulnerability Exploitation in Docker Container Environments
Zombies in Kubernetes
Reactive applications Linux Day 2013
O'Reilly Software Architecture Conference London 2017: Building Resilient Mic...
Application Modernization with PKS / Kubernetes
Open Canary - novahackers
Cisco Cloud Networking Workshop
Learn OpenStack from trystack.cn
OaaS:Open as a Strategy
The Challenges of Becoming Cloud Native
Metaswitch Project Calico
JEE on DC/OS
Docker openstack-2014
Kubernetes - security you need to know about it
OpenStack: Security Beyond Firewalls
Clocker, Calico and Docker
SpringBoot and Spring Cloud Service for MSA
WWCode Dallas - Kubernetes: Learning from Zero to Production
Ad

Viewers also liked (20)

PPTX
FIWARE: the best is yet to come
PPTX
The FIWARE Marketplace
PPTX
Welcome to the 1st FIWARE Summit
PPTX
Spanish AgriFood Cooperatives
PPTX
FIWARE for Smart Cities: City of Ancona - Parking Advisor
PPTX
FIWARE Zone
PPTX
FIWARE Accelerate
PDF
FIWARE IoT Ready Programme
PPTX
FIWARE iHubs: the road ahead
PPTX
FIWARE Accelerate Next Steps
PPTX
FIWARE Summit - conclusions
PPTX
FIWARE Mundus Ecosystem Support Committee: The Road Ahead
PPTX
FIWARE for Smart Industry
PPTX
NGSIv2 Overview for Developers that Already Know NGSIv1
PDF
IMPACT Growth
PPTX
Frontier Cities 2 - FIWARE Goes to the Market
PDF
FUNDING OPPORTUNITIES FOR FIWARE
PDF
Campus Party Brazil Agenda
PDF
FIWARE Accelerator Programme
PDF
FIWARE Accelerator Programme Results - May 2015
FIWARE: the best is yet to come
The FIWARE Marketplace
Welcome to the 1st FIWARE Summit
Spanish AgriFood Cooperatives
FIWARE for Smart Cities: City of Ancona - Parking Advisor
FIWARE Zone
FIWARE Accelerate
FIWARE IoT Ready Programme
FIWARE iHubs: the road ahead
FIWARE Accelerate Next Steps
FIWARE Summit - conclusions
FIWARE Mundus Ecosystem Support Committee: The Road Ahead
FIWARE for Smart Industry
NGSIv2 Overview for Developers that Already Know NGSIv1
IMPACT Growth
Frontier Cities 2 - FIWARE Goes to the Market
FUNDING OPPORTUNITIES FOR FIWARE
Campus Party Brazil Agenda
FIWARE Accelerator Programme
FIWARE Accelerator Programme Results - May 2015
Ad

Similar to The 'Serverless' Paradigm, OpenWhisk and FIWARE (20)

PDF
Going Serverless with OpenWhisk
PPT
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
PDF
Open stack ocata summit enabling aws lambda-like functionality with openstac...
PPTX
The twelve factor app
PDF
Serverless apps with OpenWhisk
PDF
The Future of Cloud Innovation, featuring Adrian Cockcroft
PDF
Halifax DevOps - Meet-up - July.19 2017
PPTX
Serverless Pune Meetup 1
PDF
Build a cloud native app with OpenWhisk
PDF
Apache OpenWhisk Serverless Computing
PPTX
OpenWhisk JavaOne
PDF
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
PDF
Cloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
PPTX
Serverless Pune meetup 3
PDF
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
PPTX
Serverless Apps with Open Whisk
PDF
OpenWhisk - Serverless Architecture
PDF
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
PPT
IBM Bluemix Talk at University College Cork (UCC)
PDF
High-Performance FAAS with Nuclio
Going Serverless with OpenWhisk
IBM Bluemix OpenWhisk: Serverless Conference 2016, London, UK: The Future of ...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
The twelve factor app
Serverless apps with OpenWhisk
The Future of Cloud Innovation, featuring Adrian Cockcroft
Halifax DevOps - Meet-up - July.19 2017
Serverless Pune Meetup 1
Build a cloud native app with OpenWhisk
Apache OpenWhisk Serverless Computing
OpenWhisk JavaOne
Linux Foundation Collaboration Summit: Hitchhiker's Guide to the Cloud
Cloud Expo East 2013: Essential Open Source Software for Building the Open Cloud
Serverless Pune meetup 3
How to build a Distributed Serverless Polyglot Microservices IoT Platform us...
Serverless Apps with Open Whisk
OpenWhisk - Serverless Architecture
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
IBM Bluemix Talk at University College Cork (UCC)
High-Performance FAAS with Nuclio

More from FIWARE (20)

PPTX
Behm_Herne_NeMo_akt.pptx
PDF
Katharina Hogrebe Herne Digital Days.pdf
PPTX
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
PPTX
Behm_Herne_NeMo.pptx
PPTX
Evangelists + iHubs Promo Slides.pptx
PPTX
Lukas Künzel Smart City Operating System.pptx
PPTX
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
PPTX
Dennis Wendland_The i4Trust Collaboration Programme.pptx
PPTX
Ulrich Ahle_FIWARE.pptx
PPTX
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
PDF
Water Quality - Lukas Kuenzel.pdf
PPTX
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
PPTX
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
PPTX
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
PPTX
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
PDF
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
PDF
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
PPTX
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
PPTX
WE_LoRaWAN _ IoT.pptx
PPTX
EU Opp_Clara Pezuela - German chapter.pptx
Behm_Herne_NeMo_akt.pptx
Katharina Hogrebe Herne Digital Days.pdf
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Behm_Herne_NeMo.pptx
Evangelists + iHubs Promo Slides.pptx
Lukas Künzel Smart City Operating System.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Ulrich Ahle_FIWARE.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Water Quality - Lukas Kuenzel.pdf
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
WE_LoRaWAN _ IoT.pptx
EU Opp_Clara Pezuela - German chapter.pptx

Recently uploaded (20)

PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
PptxGenJS_Demo_Chart_20250317130215833.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
E -tech empowerment technologies PowerPoint
PDF
The Internet -By the Numbers, Sri Lanka Edition
PPTX
Introuction about ICD -10 and ICD-11 PPT.pptx
PPTX
Job_Card_System_Styled_lorem_ipsum_.pptx
PPTX
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
PDF
The New Creative Director: How AI Tools for Social Media Content Creation Are...
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PPTX
artificial intelligence overview of it and more
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Cloud-Scale Log Monitoring _ Datadog.pdf
PPTX
INTERNET------BASICS-------UPDATED PPT PRESENTATION
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PptxGenJS_Demo_Chart_20250317130215833.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Paper PDF World Game (s) Great Redesign.pdf
E -tech empowerment technologies PowerPoint
The Internet -By the Numbers, Sri Lanka Edition
Introuction about ICD -10 and ICD-11 PPT.pptx
Job_Card_System_Styled_lorem_ipsum_.pptx
CHE NAA, , b,mn,mblblblbljb jb jlb ,j , ,C PPT.pptx
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Module 1 - Cyber Law and Ethics 101.pptx
FINAL CALL-6th International Conference on Networks & IOT (NeTIOT 2025)
The New Creative Director: How AI Tools for Social Media Content Creation Are...
RPKI Status Update, presented by Makito Lay at IDNOG 10
artificial intelligence overview of it and more
Introuction about WHO-FIC in ICD-10.pptx
international classification of diseases ICD-10 review PPT.pptx
Cloud-Scale Log Monitoring _ Datadog.pdf
INTERNET------BASICS-------UPDATED PPT PRESENTATION
An introduction to the IFRS (ISSB) Stndards.pdf

The 'Serverless' Paradigm, OpenWhisk and FIWARE

  • 1. The ‘Serverless‘ Paradigm, OpenWhisk and FIWARE Alex Glikson Cloud Platforms, IBM Research Architect, FIWARE Cloud Hosting glikson@il.ibm.com FIWARE Summit, Malaga, Spain December 13-15, 2016 https://www.fiware.org/summit/
  • 2. Outline 1. Overview of Serverless 2. OpenWhisk – open source ‘Serverless’ platform 3. Challenges of Serverless 4. Serverless and FIWARE 1
  • 3. Serverless in a Nutshell  ‘Next-gen’ PaaS (developers just write the business logic)  for services decomposable into events/requests & handlers  scaled, metered [and charged] by individual handler invocation * The motivation behind the ‘serverless’ term is that the application provider doesn’t need to care about managing the underlying servers (introduced by Amazon, who didn’t have fully managed PaaS offering before Lambda) 2
  • 4. analyze reading OpenWhisk create order alert customer alarm changes changes service order appliance events IBM Watson IoT Example: bit.ly/open-fridge @ Daniel Krook
  • 5. The Essence of Serverless  What is Serverless? • ‘Serverless’ is a cloud-native design pattern, accompanied with a programming model and a runtime architecture • Aimed at radically simplified, faster and more efficient development and operation of (certain) applications  The Pattern • Application is architected a set of ‘business logic’ functions, local or remote, triggered by discrete events or requests • The underlying runtime is (infinitely) elastic, with scaling (and chargeback) granularity of single function invocation (100ms) • Each local function is invoked in a sandbox, which is short- lived and ephemeral (interacting with stateful services) 4
  • 6. Serverless Market  Amazon Lambda • Pioneer of serverless, launched in Nov 2014 • Rapid growth, dedicated mini-con at Re:Invent 2016  Similar offerings by other commercial cloud providers • Google Functions, Azure Functions, IBM OpenWhisk  Multiple niche players • iron.io, pubnub.com, etc  OpenWhisk – the open source serverless platform • Developed by IBM, now under incubation in Apache (w/Adobe) • Also offered on IBM Bluemix as a fully managed service 5
  • 7. What is serverless good for? 6
  • 8. Example: Serverless at Thomson Reuters 7 https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=8674
  • 9. Example: Serverless at Bustle 8 https://aws.amazon.com/solutions/case-studies/bustle/
  • 10. Example: Serverless at Expedia 9 https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=8671
  • 11. Example: Serverless at Expedia 10 https://www.portal.reinvent.awsevents.com/connect/sessionDetail.ww?SESSION_ID=8671
  • 12. Serverless: Why Now? The Perfect Storm 11 Serverless PaaS Evolution Developers enjoy the ‘low touch’ experience, but scaling is a challenge Event-Driven Use-Cases More application can be architected as a collection of events and handlers Containers Maturity Technologies for fine-grained sandboxing become mainstream API Economy Proliferation of RESTful, composable (micro)services, often charged by API call Image: http://bobkaylor.typepad.com/bob_kaylor/2012/01/the-meaning-of-jesus-part-2-the-perfect-storm.html
  • 13. OpenWhisk: Open Source Serverless Platform Trigger Package Feed Package Feed Package Feed Package Feed REST CLI iOS SDK CRUD triggers, actions, and rules Invoke actions UI Action NodeJS Action Swift Action Docker Rule Rule Rule Action NodeJS Action Docker Service ecosytem Bluemix services 3rd party services Self-enabled services Chain Chain Invoke Docker (and potentially other abstractions going forward) API Gateway* * work in progress OpenWhisk Tenets: • Fully open (source, dev, community, ecosystem) • Extensible (feeds, actions, packages) • Polyglot (JS, Python, Swift, Java, *any*/docker) • Composable (e.g., sequences) • Per-event/request scaling, metering https://github.com/openwhisk
  • 15. OpenWhisk Catalog  Cron  Utils (e.g., jq)  CouchDB/Cloudant  Object Storage  MQTT  Kafka  Node-RED * Some of the above are work in progress 14  Github  Slack  IBM Watson  Weather  WebHooks  Mobile Push  etc
  • 16. OpenWhisk CLI: Create and test action Create the Action that analyzes IoT readings, then stores in the database wsk action create analyze-service-event analyze-service-event.js --param cloudant_user $CLOUDANT_USER --param cloudant_pass $CLOUDANT_PASS Invoke the Action manually with sample message data to test wsk action invoke --blocking --result analyze-service-event --param service '{"appliance_serial": "xxxxyyyyzzzz", "part_number": "ddddeeeeffff", "reading": 13, "timestamp": 1466188262}'
  • 17. OpenWhisk CLI: Link trigger to action Create the Trigger that subscribes to an MQTT topic pattern wsk trigger create openfridge-feed-trigger --feed mqtt/mqtt-feed-action --param topic 'iot-2/type/+/id/+/evt/+/fmt/json' --param url 'ssl://example.messaging.internetofthings.ibmcloud.com:8883’ Link the Trigger to the Action using a Rule wsk rule create --enable openfridge-feed-rule openfridge-feed-trigger analyze-service-event
  • 18. OpenWhisk and API Gateway Coming soon... • OpenWhisk CLI is extended to to allow user to define routes for actions $ wsk action create hello hello.js $ wsk api create GET /v1/hello hello Route URL: https://api-gw.mybluemix.net/api/ /nsuuid/v1/hello $ curl –XGET https://api-gw.mybluemix.net/api/ /nsuuid/v1/hello { message: ”Hello World” } 1 Browser Mobile App Web App APIGateway 2 OpenWhisk 3 Invoke associated OpenWhisk action „getCustomers“ Swift DockerJS Python Java Incoming HTTP request, e.g. HTTP GET api-gw.mybluemix.net/…/getCustomers - API Gateway takes care of… - security (authenticate, authorize, threat protect, validate) - control (rate limiting, response caching) - mediation - parameter mapping - schema validation - etc
  • 19. OpenWhisk Debugger (https://github.com/openwhisk/openwhisk-debugger )  Allows to… • debug actions locally • inspect parameter values • edit code & push changes  Supports debugging… • NodeJS, Python and Swift actions
  • 21. Challenges of Serverless  Opinionated programming model • Aligned with 12-factor approach to cloud-native applications  Per-invocation latency & overhead  High-performance persistent state  Life cycle of composite serverless applications  Monitoring, error handling, testing, debugging 20
  • 22. Proposal: Serverless/OpenWhisk in FIWARE  FIWARE is an open source platform, community and ecosystem for context-aware cloud-based applications enabled by Big Data and IoT • OpenWhisk shares similar open principles and philosophy  Serverless capabilities (based on OpenWhisk) can simplify development and hosting of FIWARE applications, e.g., • Simple interface to develop and run actions (in various programming languages), integrated into FIWARE user experience □ FIWARE WireCloud integration/frontend? • OpenWhisk packages surfacing APIs of individual FIWARE Generic Enablers (GEs) as OpenWhisk triggers and actions • FIWARE Orion/NGSI package encapsulating generic context operations (queries, updates), subscription feed □ Feed provider via Cygnus  OpenWhisk bridge • GE developers could take advantage of OpenWhisk too 21 https://www.fiware.org/
  • 23. Thank you! http://fiware.org Follow @FIWARE on Twitter Alex Glikson Cloud Platforms, IBM Research Architect, FIWARE Cloud Hosting glikson@il.ibm.com
  • 24. OpenWhisk on IBM Bluemix 23
  • 25. Getting started with OpenWhisk in Bluemix Click here and run your first action in 30 secs: https://console.ng.bluemix.net/openwhisk/ Associate an action with event triggers:
  • 26. Serverless check processing with OpenWhisk https://github.com/krook/openchecks
  • 27. Serverless can handle many cloud native app 12 Factors I Codebase Handled by developer (Manage versioning of functions on their own) II Dependencies Handled by developer, facilitated by serverless platform (Runtimes and packages) III Config Handled by platform (Environment variables or injected event parameters) IV Backing services Handled by platform (Connection information injected as event parameters) V Build, release, run Handled by platform (Deployed resources are immutable and internally versioned) VI Processes Handled by platform (Single stateless containers often used) VII Port binding Handled by platform (Actions or functions are automatically discovered) VIII Concurrency Handled by platform (Process model is hidden and scales in response to demand) IX Disposability Handled by platform (Lifecycle is hidden from the user, fast startup and elastic scale is prioritized) X Dev/prod parity Handled by developer (The developer is the deployer. Scope of what differs is narrower) XI Logs Handled by platform (Developer writes to console.log, platform handles log streaming) XII Admin processes Handled by developer (No distinction between one off processes and long running)