SlideShare a Scribd company logo
© 2019 IBM Corporation
Building serverless apps with Kafka
Dale Lane
An introduction to serverless with Apache OpenWhisk
IBM Event StreamsApache Kafka
@dalelane
© 2019 IBM Corporation
Agenda
§ What is “serverless”?
§ Implementations
§ Apache OpenWhisk
§ Demos
© 2019 IBM Corporation
What is “serverless”?
© 2019 IBM Corporation
Serverless
§An architectural pattern where your code is run:
– in response to events
– only on-demand on a per-request basis
© 2019 IBM Corporation
Evolution of deployment patterns
Monolith
© 2019 IBM Corporation
Evolution of deployment patterns
Microservice
Microservice
Microservice
Monolith
© 2019 IBM Corporation
Evolution of deployment patterns
Function
Function
Function
Function
Function
Function
Function
Function
Microservice
Microservice
Microservice
Monolith
© 2019 IBM Corporation
Evolution of deployment patterns
Bare metal Virtual
machines
Containers Orchestration Serverless
© 2019 IBM Corporation
Function
FaaS
Platform
PaaS
Infrastructure
IaaS
Container
CaaS
Bare metal
Evolution of deployment patterns
© 2019 IBM Corporation
Definition
github.com/cncf/wg-serverless
© 2019 IBM Corporation
Definition
github.com/cncf/wg-serverless
© 2019 IBM Corporation
Definition
applications that do not require server management
applications bundled as one or more functions
[developers] no longer need to spend time and resources on server
provisioning, maintenance, updates, scaling and capacity planning
© 2019 IBM Corporation
How is serverless different?
Monolith Microservice
Microservice
Microservice
Function
Function
Function
Function
Function
Function
Function
Function
© 2019 IBM Corporation
How is serverless different?
© 2019 IBM Corporation
How is serverless different?
© 2019 IBM Corporation
How is serverless different?
£ $ €
kr Fr
¥
© 2019 IBM Corporation
Example use cases
§ Event processing
§ Data processing
§ Scheduled tasks
§ Scalable REST APIs
© 2019 IBM Corporation
The Twelve Factor App
© 2019 IBM Corporation
Serverless is good for:
§ Infrequent or sporadic demand
§ Focused, short duration processing
§ Highly dynamic workloads
§ Stateless workloads
§ Inconsistent demand
§ Scheduled infrequent tasks
§ Flexibility
© 2019 IBM Corporation
Implementations
© 2019 IBM Corporation
Implementations – platform
© 2019 IBM Corporation
Implementations – platform
© 2019 IBM Corporation
Implementations – platform
© 2019 IBM Corporation
Implementations – platform
© 2019 IBM Corporation
Implementations – platform
© 2019 IBM Corporation
Implementations – hosted
© 2019 IBM Corporation
Implementations – private cloud
© 2019 IBM Corporation
Implementations – installable
© 2019 IBM Corporation
Implementations
s.cncf.io
© 2019 IBM Corporation
Serverless framework
serverless.com/framework
© 2019 IBM Corporation
Apache OpenWhisk
© 2019 IBM Corporation
OpenWhisk
openwhisk.apache.org
© 2019 IBM Corporation
OpenWhisk – who
© 2019 IBM Corporation
OpenWhisk – where
© 2019 IBM Corporation
OpenWhisk concepts
© 2019 IBM Corporation
OpenWhisk concepts
event
© 2019 IBM Corporation
OpenWhisk concepts
event action
© 2019 IBM Corporation
OpenWhisk concepts
event action
function (eventobj)
{
// do something
return result;
}
© 2019 IBM Corporation
OpenWhisk languages
© 2019 IBM Corporation
OpenWhisk languages
© 2019 IBM Corporation
OpenWhisk concepts
event action
© 2019 IBM Corporation
OpenWhisk concepts
event actiontrigger
© 2019 IBM Corporation
OpenWhisk concepts
actiontrigger ruleevent
© 2019 IBM Corporation
OpenWhisk concepts
actionrule
event
actionrule
actionrule
actionrule
trigger
© 2019 IBM Corporation
OpenWhisk concepts
rule
event
rule
rule
rule
trigger
trigger
trigger
trigger
action
event
event
event
© 2019 IBM Corporation
OpenWhisk concepts
actiontrigger ruleevent
function main(params) {
return { hello : 'world' };
} hello.js
© 2019 IBM Corporation
OpenWhisk concepts
actiontrigger ruleevent
function main(params) {
return { hello : 'world' };
} hello.js
© 2019 IBM Corporation
OpenWhisk concepts
actiontrigger ruleevent
function main(params) {
return { hello : 'world' };
}
$ wsk action create helloworld hello.js
ok: created action helloworld
hello.js
© 2019 IBM Corporation
OpenWhisk concepts
actiontrigger ruleevent
function main(params) {
return { hello : 'world' };
}
$ wsk action create helloworld hello.js
ok: created action helloworld
$ wsk action invoke helloworld
ok: invoked /guest/helloworld with id 7df9c9dfbb
hello.js
© 2019 IBM Corporation
OpenWhisk actions
blocking
non-blocking
© 2019 IBM Corporation
OpenWhisk actions
blocking
non-blocking
periodic
© 2019 IBM Corporation
OpenWhisk actions
action action action
© 2019 IBM Corporation
OpenWhisk concepts
actiontrigger ruleevent
© 2019 IBM Corporation
OpenWhisk implementation
proxy
© 2019 IBM Corporation
OpenWhisk implementation
proxy controller
© 2019 IBM Corporation
OpenWhisk implementation
proxy controller
store
© 2019 IBM Corporation
OpenWhisk implementation
proxy controller
store
service registry
invoker
© 2019 IBM Corporation
OpenWhisk implementation
proxy controller
store
service registry
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
OpenWhisk implementation
controller
invoker
invoker
invoker
invoker
invoker
invoker
© 2019 IBM Corporation
Container management
start X
init X X
run X X X
medium.com/openwhisk/squeezing-the-milliseconds-how-to-make-serverless-platforms-blazing-fast-aea0e9951bd0
© 2019 IBM Corporation
Container management
start X
init X X
run X X X
medium.com/openwhisk/squeezing-the-milliseconds-how-to-make-serverless-platforms-blazing-fast-aea0e9951bd0
© 2019 IBM Corporation
Container management
start X
init X X
run X X X
medium.com/openwhisk/squeezing-the-milliseconds-how-to-make-serverless-platforms-blazing-fast-aea0e9951bd0
© 2019 IBM Corporation
Resource limits
github.com/apache/incubator-openwhisk
© 2019 IBM Corporation
Demos – installable
© 2019 IBM Corporation
Deployment options
© 2019 IBM Corporation
git clone https://github.com/apache/incubator-openwhisk-devtools.git
cd incubator-openwhisk-devtools/docker-compose
make quick-start
© 2019 IBM Corporation
OpenWhisk event providers
trigger ruleevent
© 2019 IBM Corporation
cd incubator-openwhisk-devtools/docker-compose
make create-provider-cloudant
make create-provider-kafka
© 2019 IBM Corporation
git clone https://github.com/apache/incubator-openwhisk-package-kafka.git
cd incubator-openwhisk-package-kafka
export OPENWHISK_AUTH=$OPENWHISK_HOME/ansible/files/auth.whisk.system
./installKafka.sh $OPENWHISK_AUTH $SYSTEM_IP_ADDR 
http://$SYSTEM_IP_ADDR:5984 
local_ 
$SYSTEM_IP_ADDR
© 2019 IBM Corporation
Demo
© 2019 IBM Corporation
Demo
event
Message
produced to
Kafka topic
MY.EVENTS
© 2019 IBM Corporation
kafka-topics.sh --create --topic MY.EVENTS 
--replication-factor 1 --partitions 1 
--zookeeper $SYSTEM_IP_ADDR:3181
© 2019 IBM Corporation
Demo
event
Message
produced to
Kafka topic
MY.EVENTS
myKafkaTrigger
trigger
© 2019 IBM Corporation
wsk trigger create myKafkaTrigger 
-f /whisk.system/messaging/kafkaFeed 
-p brokers '["9.174.23.208:3092"]' 
-p topic MY.EVENTS
© 2019 IBM Corporation
Demo
event
Message
produced to
Kafka topic
MY.EVENTS
myKafkaTrigger
trigger
© 2019 IBM Corporation
Demo
event
Message
produced to
Kafka topic
MY.EVENTS
myKafkaTrigger
trigger
sendToSlack
action
action
© 2019 IBM Corporation
Demo
event
Message
produced to
Kafka topic
MY.EVENTS
myKafkaTrigger
trigger
sendToSlack
action
action
© 2019 IBM Corporation
wsk action create sendToSlack slack-action.js
© 2019 IBM Corporation
Demo
event
Message
produced to
Kafka topic
MY.EVENTS
myKafkaTrigger
trigger
sendToSlack
action
action
© 2019 IBM Corporation
Demo
ruleevent
Message
produced to
Kafka topic
MY.EVENTS
myKafkaTrigger
trigger
slackOnKafkaMessages
sendToSlack
action
action
© 2019 IBM Corporation
wsk rule create slackOnKafkaMessages 
myKafkaTrigger 
sendToSlack
© 2019 IBM Corporation
Demo
ruleevent
Message
produced to
Kafka topic
MY.EVENTS
myKafkaTrigger
trigger
slackOnKafkaMessages
sendToSlack
action
action
© 2019 IBM Corporation
© 2019 IBM Corporation
Reminder
© 2019 IBM Corporation
Demos – using a hosted service
© 2019 IBM Corporation
Demo
Orders Voyages Ships Containers Alerts
VoyagesOrder
Order
Management
Microservice
Fleet/Ships
Simulator
Microservice
Voyages
Management
Microservice
Kafka Streams
Kafka
© 2019 IBM Corporation
© 2019 IBM Corporation
Demo
© 2019 IBM Corporation
Demo
ruleevent
Message
produced to
Kafka topic
“alerts”
kafkaAlert
trigger
processAlert
action
action
© 2019 IBM Corporation
© 2019 IBM Corporation
Demo
ruleevent
Message
produced to
Kafka topic
“alerts”
kafkaAlert
trigger
processAlert
action
action
© 2019 IBM Corporation
Orders Voyages Ships Containers Alerts
VoyagesOrder
Order
Management
Microservice
Fleet/Ships
Simulator
Microservice
Voyages
Management
Microservice
Kafka
Kafka Streams
© 2019 IBM Corporation
Summary
© 2019 IBM Corporation
Summary / roundup
§An architectural pattern where your code is run:
– in response to events
– only on-demand on a per-request basis
© 2019 IBM Corporation
Getting started
twitter.com/openwhisk
medium.com/openwhisk
slack.openwhisk.org
youtube.com/channel/UCbzgShnQk8F43NKsvEYA1SA
#openwhisk
developer.ibm.com/code/patterns/category/serverless
serverlessconf.io
© 2019 IBM Corporation
Thank you
Dale Lane
Software Engineer, IBM Event Streams
IBM Event Streams - ibm.com/cloud/event-streams
https://slack-invite-ibm-cloud-tech.mybluemix.net/

More Related Content

PDF
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...
confluent
 
PDF
Not so FaaS, Streaming ML with Kafka! (Praveen Hirsave, VRBO) Kafka Summit Lo...
confluent
 
PDF
The Power of Event Driven Caches (Brendan Powers, Bloomberg L.P) Kafka Summit...
confluent
 
PDF
Kubernetes Apache Kafka
confluent
 
PPTX
Kafka Summit 2019 Microservice Orchestration
larsfrancke
 
PDF
Cloud-native Event-driven Data Ecosystem Powered by Kafka and Akka (Masih Der...
confluent
 
PDF
Kafka summit apac session
Christina Lin
 
PDF
Services are the New Cloud Platform (Services-as-a-Platform)
Randy Bias
 
Fast Kafka Apps! (Edoardo Comar and Mickael Maison, IBM) Kafka Summit London ...
confluent
 
Not so FaaS, Streaming ML with Kafka! (Praveen Hirsave, VRBO) Kafka Summit Lo...
confluent
 
The Power of Event Driven Caches (Brendan Powers, Bloomberg L.P) Kafka Summit...
confluent
 
Kubernetes Apache Kafka
confluent
 
Kafka Summit 2019 Microservice Orchestration
larsfrancke
 
Cloud-native Event-driven Data Ecosystem Powered by Kafka and Akka (Masih Der...
confluent
 
Kafka summit apac session
Christina Lin
 
Services are the New Cloud Platform (Services-as-a-Platform)
Randy Bias
 

What's hot (18)

PDF
Running Kafka in Kubernetes: A Practical Guide (Katherine Stanley, IBM United...
confluent
 
PPTX
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...
Adrian Cockcroft
 
PDF
The Enterprise Service Bus is Dead! Long live the Enterprise Service Bus, Rim...
confluent
 
PDF
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Matt Stine
 
PDF
The Cloud Revolution - Philippines Cloud Summit
Randy Bias
 
PDF
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
confluent
 
PPTX
When networks meets apps (open stack atlanta)
Nati Shalom
 
PDF
Microservices Development - ICP Workshop Batch II
PT Datacomm Diangraha
 
PDF
Bridge to the Cloud: Using Apache Kafka to Migrate to AWS
confluent
 
PDF
Networking is NOT Free: Lessons in Network Design
Randy Bias
 
PPTX
Webinar - Build Cloud-native platform using Docker, Kubernetes, Prometheus, I...
zekeLabs Technologies
 
PPTX
More Datacenters, More Problems
Todd Palino
 
PDF
Creating Microservices Application with IBM Cloud Private (ICP) - Container a...
PT Datacomm Diangraha
 
PDF
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
PPTX
How I learned to stop worrying and love the cloud
Shlomo Swidler
 
PPTX
Pivotal CF on AWS
Lawrence Crowther
 
PPTX
Comparison of various streaming technologies
Sachin Aggarwal
 
PDF
Spring and Pivotal Application Service - SpringOne Tour Dallas
VMware Tanzu
 
Running Kafka in Kubernetes: A Practical Guide (Katherine Stanley, IBM United...
confluent
 
Flowcon (added to for CMG) Keynote talk on how Speed Wins and how Netflix is ...
Adrian Cockcroft
 
The Enterprise Service Bus is Dead! Long live the Enterprise Service Bus, Rim...
confluent
 
Cloud Foundry and Microservices: A Mutualistic Symbiotic Relationship
Matt Stine
 
The Cloud Revolution - Philippines Cloud Summit
Randy Bias
 
Apache Kafka vs. Integration Middleware (MQ, ETL, ESB) - Friends, Enemies or ...
confluent
 
When networks meets apps (open stack atlanta)
Nati Shalom
 
Microservices Development - ICP Workshop Batch II
PT Datacomm Diangraha
 
Bridge to the Cloud: Using Apache Kafka to Migrate to AWS
confluent
 
Networking is NOT Free: Lessons in Network Design
Randy Bias
 
Webinar - Build Cloud-native platform using Docker, Kubernetes, Prometheus, I...
zekeLabs Technologies
 
More Datacenters, More Problems
Todd Palino
 
Creating Microservices Application with IBM Cloud Private (ICP) - Container a...
PT Datacomm Diangraha
 
Kubernetes Basics - ICP Workshop Batch II
PT Datacomm Diangraha
 
How I learned to stop worrying and love the cloud
Shlomo Swidler
 
Pivotal CF on AWS
Lawrence Crowther
 
Comparison of various streaming technologies
Sachin Aggarwal
 
Spring and Pivotal Application Service - SpringOne Tour Dallas
VMware Tanzu
 
Ad

Similar to Building Serverless Apps with Kafka (Dale Lane, IBM) Kafka Summit London 2019 (20)

PPTX
AWS Accra Meetup - Developing Modern Applications in the Cloud
Cobus Bernard
 
PPTX
AWS Jozi Meetup Developing Modern Applications in the Cloud
Cobus Bernard
 
PPTX
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
Cobus Bernard
 
PDF
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...
Frederic Lavigne
 
PDF
Containers on AWS
Reham Maher El-Safarini
 
PDF
IBM Cloud Private and IBM Power Systems: Overview and Real-World Scenarios
Joe Cropper
 
PPTX
DevConZM - Modern Applications Development in the Cloud
Cobus Bernard
 
PDF
Kafka with IBM Event Streams - Technical Presentation
Winton Winton
 
PDF
Breaking the monolith (an example)
Massimo Ferre'
 
PPTX
AWS DevDay Cologne - CI/CD for modern applications
Cobus Bernard
 
PDF
IBM Think 2019 session 2116 - Best practices for operating and managing a pro...
Hendrik van Run
 
PPTX
IBM Bluemix Paris Meetup #22-20170315 Meetup @VillagebyCA - Serverless & Open...
IBM France Lab
 
PDF
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
OpenWhisk
 
PDF
Making everything better with OSGi - a happy case study in building a really ...
mfrancis
 
PPTX
Virtual Meetup Sweden - Reacting to an event driven world
Grace Jansen
 
PDF
Continuous Delivery on AWS with Zero Downtime
Casey Lee
 
PPTX
Octobus technical university def
Daniela Zuppini
 
PDF
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM Z
NRB
 
PDF
NRB - BE MAINFRAME DAY 2017 - IBM Z
NRB
 
PPTX
AWS DevDay Berlin - Automating building blocks choices you will face with con...
Cobus Bernard
 
AWS Accra Meetup - Developing Modern Applications in the Cloud
Cobus Bernard
 
AWS Jozi Meetup Developing Modern Applications in the Cloud
Cobus Bernard
 
[CPT DevOps Meetup] Developing Modern Applications in the Cloud
Cobus Bernard
 
Codemotion Berlin 2017 - Event-driven and serverless applications with IBM Cl...
Frederic Lavigne
 
Containers on AWS
Reham Maher El-Safarini
 
IBM Cloud Private and IBM Power Systems: Overview and Real-World Scenarios
Joe Cropper
 
DevConZM - Modern Applications Development in the Cloud
Cobus Bernard
 
Kafka with IBM Event Streams - Technical Presentation
Winton Winton
 
Breaking the monolith (an example)
Massimo Ferre'
 
AWS DevDay Cologne - CI/CD for modern applications
Cobus Bernard
 
IBM Think 2019 session 2116 - Best practices for operating and managing a pro...
Hendrik van Run
 
IBM Bluemix Paris Meetup #22-20170315 Meetup @VillagebyCA - Serverless & Open...
IBM France Lab
 
IBM Bluemix OpenWhisk: Serverless Conference 2017, Austin, USA: Keynote
OpenWhisk
 
Making everything better with OSGi - a happy case study in building a really ...
mfrancis
 
Virtual Meetup Sweden - Reacting to an event driven world
Grace Jansen
 
Continuous Delivery on AWS with Zero Downtime
Casey Lee
 
Octobus technical university def
Daniela Zuppini
 
NRB - LUXEMBOURG MAINFRAME DAY 2017 - IBM Z
NRB
 
NRB - BE MAINFRAME DAY 2017 - IBM Z
NRB
 
AWS DevDay Berlin - Automating building blocks choices you will face with con...
Cobus Bernard
 
Ad

More from confluent (20)

PDF
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
confluent
 
PPTX
Webinar Think Right - Shift Left - 19-03-2025.pptx
confluent
 
PDF
Migration, backup and restore made easy using Kannika
confluent
 
PDF
Five Things You Need to Know About Data Streaming in 2025
confluent
 
PDF
Data in Motion Tour Seoul 2024 - Keynote
confluent
 
PDF
Data in Motion Tour Seoul 2024 - Roadmap Demo
confluent
 
PDF
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
confluent
 
PDF
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
confluent
 
PDF
Data in Motion Tour 2024 Riyadh, Saudi Arabia
confluent
 
PDF
Build a Real-Time Decision Support Application for Financial Market Traders w...
confluent
 
PDF
Strumenti e Strategie di Stream Governance con Confluent Platform
confluent
 
PDF
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
confluent
 
PDF
Building Real-Time Gen AI Applications with SingleStore and Confluent
confluent
 
PDF
Unlocking value with event-driven architecture by Confluent
confluent
 
PDF
Il Data Streaming per un’AI real-time di nuova generazione
confluent
 
PDF
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
confluent
 
PDF
Break data silos with real-time connectivity using Confluent Cloud Connectors
confluent
 
PDF
Building API data products on top of your real-time data infrastructure
confluent
 
PDF
Speed Wins: From Kafka to APIs in Minutes
confluent
 
PDF
Evolving Data Governance for the Real-time Streaming and AI Era
confluent
 
Stream Processing Handson Workshop - Flink SQL Hands-on Workshop (Korean)
confluent
 
Webinar Think Right - Shift Left - 19-03-2025.pptx
confluent
 
Migration, backup and restore made easy using Kannika
confluent
 
Five Things You Need to Know About Data Streaming in 2025
confluent
 
Data in Motion Tour Seoul 2024 - Keynote
confluent
 
Data in Motion Tour Seoul 2024 - Roadmap Demo
confluent
 
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
confluent
 
Confluent per il settore FSI: Accelerare l'Innovazione con il Data Streaming...
confluent
 
Data in Motion Tour 2024 Riyadh, Saudi Arabia
confluent
 
Build a Real-Time Decision Support Application for Financial Market Traders w...
confluent
 
Strumenti e Strategie di Stream Governance con Confluent Platform
confluent
 
Compose Gen-AI Apps With Real-Time Data - In Minutes, Not Weeks
confluent
 
Building Real-Time Gen AI Applications with SingleStore and Confluent
confluent
 
Unlocking value with event-driven architecture by Confluent
confluent
 
Il Data Streaming per un’AI real-time di nuova generazione
confluent
 
Unleashing the Future: Building a Scalable and Up-to-Date GenAI Chatbot with ...
confluent
 
Break data silos with real-time connectivity using Confluent Cloud Connectors
confluent
 
Building API data products on top of your real-time data infrastructure
confluent
 
Speed Wins: From Kafka to APIs in Minutes
confluent
 
Evolving Data Governance for the Real-time Streaming and AI Era
confluent
 

Recently uploaded (20)

PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 

Building Serverless Apps with Kafka (Dale Lane, IBM) Kafka Summit London 2019

  • 1. © 2019 IBM Corporation Building serverless apps with Kafka Dale Lane An introduction to serverless with Apache OpenWhisk IBM Event StreamsApache Kafka @dalelane
  • 2. © 2019 IBM Corporation Agenda § What is “serverless”? § Implementations § Apache OpenWhisk § Demos
  • 3. © 2019 IBM Corporation What is “serverless”?
  • 4. © 2019 IBM Corporation Serverless §An architectural pattern where your code is run: – in response to events – only on-demand on a per-request basis
  • 5. © 2019 IBM Corporation Evolution of deployment patterns Monolith
  • 6. © 2019 IBM Corporation Evolution of deployment patterns Microservice Microservice Microservice Monolith
  • 7. © 2019 IBM Corporation Evolution of deployment patterns Function Function Function Function Function Function Function Function Microservice Microservice Microservice Monolith
  • 8. © 2019 IBM Corporation Evolution of deployment patterns Bare metal Virtual machines Containers Orchestration Serverless
  • 9. © 2019 IBM Corporation Function FaaS Platform PaaS Infrastructure IaaS Container CaaS Bare metal Evolution of deployment patterns
  • 10. © 2019 IBM Corporation Definition github.com/cncf/wg-serverless
  • 11. © 2019 IBM Corporation Definition github.com/cncf/wg-serverless
  • 12. © 2019 IBM Corporation Definition applications that do not require server management applications bundled as one or more functions [developers] no longer need to spend time and resources on server provisioning, maintenance, updates, scaling and capacity planning
  • 13. © 2019 IBM Corporation How is serverless different? Monolith Microservice Microservice Microservice Function Function Function Function Function Function Function Function
  • 14. © 2019 IBM Corporation How is serverless different?
  • 15. © 2019 IBM Corporation How is serverless different?
  • 16. © 2019 IBM Corporation How is serverless different? £ $ € kr Fr ¥
  • 17. © 2019 IBM Corporation Example use cases § Event processing § Data processing § Scheduled tasks § Scalable REST APIs
  • 18. © 2019 IBM Corporation The Twelve Factor App
  • 19. © 2019 IBM Corporation Serverless is good for: § Infrequent or sporadic demand § Focused, short duration processing § Highly dynamic workloads § Stateless workloads § Inconsistent demand § Scheduled infrequent tasks § Flexibility
  • 20. © 2019 IBM Corporation Implementations
  • 21. © 2019 IBM Corporation Implementations – platform
  • 22. © 2019 IBM Corporation Implementations – platform
  • 23. © 2019 IBM Corporation Implementations – platform
  • 24. © 2019 IBM Corporation Implementations – platform
  • 25. © 2019 IBM Corporation Implementations – platform
  • 26. © 2019 IBM Corporation Implementations – hosted
  • 27. © 2019 IBM Corporation Implementations – private cloud
  • 28. © 2019 IBM Corporation Implementations – installable
  • 29. © 2019 IBM Corporation Implementations s.cncf.io
  • 30. © 2019 IBM Corporation Serverless framework serverless.com/framework
  • 31. © 2019 IBM Corporation Apache OpenWhisk
  • 32. © 2019 IBM Corporation OpenWhisk openwhisk.apache.org
  • 33. © 2019 IBM Corporation OpenWhisk – who
  • 34. © 2019 IBM Corporation OpenWhisk – where
  • 35. © 2019 IBM Corporation OpenWhisk concepts
  • 36. © 2019 IBM Corporation OpenWhisk concepts event
  • 37. © 2019 IBM Corporation OpenWhisk concepts event action
  • 38. © 2019 IBM Corporation OpenWhisk concepts event action function (eventobj) { // do something return result; }
  • 39. © 2019 IBM Corporation OpenWhisk languages
  • 40. © 2019 IBM Corporation OpenWhisk languages
  • 41. © 2019 IBM Corporation OpenWhisk concepts event action
  • 42. © 2019 IBM Corporation OpenWhisk concepts event actiontrigger
  • 43. © 2019 IBM Corporation OpenWhisk concepts actiontrigger ruleevent
  • 44. © 2019 IBM Corporation OpenWhisk concepts actionrule event actionrule actionrule actionrule trigger
  • 45. © 2019 IBM Corporation OpenWhisk concepts rule event rule rule rule trigger trigger trigger trigger action event event event
  • 46. © 2019 IBM Corporation OpenWhisk concepts actiontrigger ruleevent function main(params) { return { hello : 'world' }; } hello.js
  • 47. © 2019 IBM Corporation OpenWhisk concepts actiontrigger ruleevent function main(params) { return { hello : 'world' }; } hello.js
  • 48. © 2019 IBM Corporation OpenWhisk concepts actiontrigger ruleevent function main(params) { return { hello : 'world' }; } $ wsk action create helloworld hello.js ok: created action helloworld hello.js
  • 49. © 2019 IBM Corporation OpenWhisk concepts actiontrigger ruleevent function main(params) { return { hello : 'world' }; } $ wsk action create helloworld hello.js ok: created action helloworld $ wsk action invoke helloworld ok: invoked /guest/helloworld with id 7df9c9dfbb hello.js
  • 50. © 2019 IBM Corporation OpenWhisk actions blocking non-blocking
  • 51. © 2019 IBM Corporation OpenWhisk actions blocking non-blocking periodic
  • 52. © 2019 IBM Corporation OpenWhisk actions action action action
  • 53. © 2019 IBM Corporation OpenWhisk concepts actiontrigger ruleevent
  • 54. © 2019 IBM Corporation OpenWhisk implementation proxy
  • 55. © 2019 IBM Corporation OpenWhisk implementation proxy controller
  • 56. © 2019 IBM Corporation OpenWhisk implementation proxy controller store
  • 57. © 2019 IBM Corporation OpenWhisk implementation proxy controller store service registry invoker
  • 58. © 2019 IBM Corporation OpenWhisk implementation proxy controller store service registry invoker invoker invoker invoker invoker invoker
  • 59. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 60. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 61. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 62. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 63. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 64. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 65. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 66. © 2019 IBM Corporation OpenWhisk implementation controller invoker invoker invoker invoker invoker invoker
  • 67. © 2019 IBM Corporation Container management start X init X X run X X X medium.com/openwhisk/squeezing-the-milliseconds-how-to-make-serverless-platforms-blazing-fast-aea0e9951bd0
  • 68. © 2019 IBM Corporation Container management start X init X X run X X X medium.com/openwhisk/squeezing-the-milliseconds-how-to-make-serverless-platforms-blazing-fast-aea0e9951bd0
  • 69. © 2019 IBM Corporation Container management start X init X X run X X X medium.com/openwhisk/squeezing-the-milliseconds-how-to-make-serverless-platforms-blazing-fast-aea0e9951bd0
  • 70. © 2019 IBM Corporation Resource limits github.com/apache/incubator-openwhisk
  • 71. © 2019 IBM Corporation Demos – installable
  • 72. © 2019 IBM Corporation Deployment options
  • 73. © 2019 IBM Corporation git clone https://github.com/apache/incubator-openwhisk-devtools.git cd incubator-openwhisk-devtools/docker-compose make quick-start
  • 74. © 2019 IBM Corporation OpenWhisk event providers trigger ruleevent
  • 75. © 2019 IBM Corporation cd incubator-openwhisk-devtools/docker-compose make create-provider-cloudant make create-provider-kafka
  • 76. © 2019 IBM Corporation git clone https://github.com/apache/incubator-openwhisk-package-kafka.git cd incubator-openwhisk-package-kafka export OPENWHISK_AUTH=$OPENWHISK_HOME/ansible/files/auth.whisk.system ./installKafka.sh $OPENWHISK_AUTH $SYSTEM_IP_ADDR http://$SYSTEM_IP_ADDR:5984 local_ $SYSTEM_IP_ADDR
  • 77. © 2019 IBM Corporation Demo
  • 78. © 2019 IBM Corporation Demo event Message produced to Kafka topic MY.EVENTS
  • 79. © 2019 IBM Corporation kafka-topics.sh --create --topic MY.EVENTS --replication-factor 1 --partitions 1 --zookeeper $SYSTEM_IP_ADDR:3181
  • 80. © 2019 IBM Corporation Demo event Message produced to Kafka topic MY.EVENTS myKafkaTrigger trigger
  • 81. © 2019 IBM Corporation wsk trigger create myKafkaTrigger -f /whisk.system/messaging/kafkaFeed -p brokers '["9.174.23.208:3092"]' -p topic MY.EVENTS
  • 82. © 2019 IBM Corporation Demo event Message produced to Kafka topic MY.EVENTS myKafkaTrigger trigger
  • 83. © 2019 IBM Corporation Demo event Message produced to Kafka topic MY.EVENTS myKafkaTrigger trigger sendToSlack action action
  • 84. © 2019 IBM Corporation Demo event Message produced to Kafka topic MY.EVENTS myKafkaTrigger trigger sendToSlack action action
  • 85. © 2019 IBM Corporation wsk action create sendToSlack slack-action.js
  • 86. © 2019 IBM Corporation Demo event Message produced to Kafka topic MY.EVENTS myKafkaTrigger trigger sendToSlack action action
  • 87. © 2019 IBM Corporation Demo ruleevent Message produced to Kafka topic MY.EVENTS myKafkaTrigger trigger slackOnKafkaMessages sendToSlack action action
  • 88. © 2019 IBM Corporation wsk rule create slackOnKafkaMessages myKafkaTrigger sendToSlack
  • 89. © 2019 IBM Corporation Demo ruleevent Message produced to Kafka topic MY.EVENTS myKafkaTrigger trigger slackOnKafkaMessages sendToSlack action action
  • 90. © 2019 IBM Corporation
  • 91. © 2019 IBM Corporation Reminder
  • 92. © 2019 IBM Corporation Demos – using a hosted service
  • 93. © 2019 IBM Corporation Demo Orders Voyages Ships Containers Alerts VoyagesOrder Order Management Microservice Fleet/Ships Simulator Microservice Voyages Management Microservice Kafka Streams Kafka
  • 94. © 2019 IBM Corporation
  • 95. © 2019 IBM Corporation Demo
  • 96. © 2019 IBM Corporation Demo ruleevent Message produced to Kafka topic “alerts” kafkaAlert trigger processAlert action action
  • 97. © 2019 IBM Corporation
  • 98. © 2019 IBM Corporation Demo ruleevent Message produced to Kafka topic “alerts” kafkaAlert trigger processAlert action action
  • 99. © 2019 IBM Corporation Orders Voyages Ships Containers Alerts VoyagesOrder Order Management Microservice Fleet/Ships Simulator Microservice Voyages Management Microservice Kafka Kafka Streams
  • 100. © 2019 IBM Corporation Summary
  • 101. © 2019 IBM Corporation Summary / roundup §An architectural pattern where your code is run: – in response to events – only on-demand on a per-request basis
  • 102. © 2019 IBM Corporation Getting started twitter.com/openwhisk medium.com/openwhisk slack.openwhisk.org youtube.com/channel/UCbzgShnQk8F43NKsvEYA1SA #openwhisk developer.ibm.com/code/patterns/category/serverless serverlessconf.io
  • 103. © 2019 IBM Corporation Thank you Dale Lane Software Engineer, IBM Event Streams IBM Event Streams - ibm.com/cloud/event-streams https://slack-invite-ibm-cloud-tech.mybluemix.net/