SlideShare a Scribd company logo
GOING SERVERLESS WITH
OPENWHISK
RAYMOND CAMDEN
WHY AM I HERE?
• Developer Advocate for IBM
• LoopBack, OpenWhisk, Node.js,
Cordova, web stuff, and cats
• Blogging at
raymondcamden.com
• Tweeting at @raymondcamden
CONGRATULATIONS!
• New job!
• CTO of the Galactic Empire
• Full discretion!
• Build the Future of the Empire!
CURRENT SYSTEM
• J2EE servers
• Oracle
• Monolithic, slow to update
• One change requires 10 people to sign off, 10 unit tests, a Star
Destroyer, and a full day of Jenkins deployment
NEW SYSTEM
• Node/JavaScript
• Microservices
• Serverless
LETS TALK ABOUT THAT NAME…
“Serverless”
WHAT IS SERVERLESS?
“Serverless computing refers to a model where the
existence of servers is simply hidden from developers.
I.e. that even though servers still exist developers are
relieved from the need to care about their operation.
They are relieved from the need to worry about low-
level infrastructural and operational details such as
scalability, high-availability, infrastructure-security, and
so forth.”
Credit: A dead link at IBM
“FUNCTION AS A SERVICE”
• I write a function and it does one thing
• The actual hosting of the function, the making it available, is
handled by the service
• I call my function
• “Details”
APACHE OPENWHISK (OPENWHISK.ORG)
INSTALLATION
• Focused on the IBM Cloud (Bluemix) path
• https://console.ng.bluemix.net/openwhisk/
TASK ONE
Stormtroopers
get armor
1
Armor needs
paint
2
What color
should it be?
3
ACTIONS!
ACTIONS ARE…
• Small, atomic, stateless functions that do stuff (normally one
thing)
• Written in JavaScript, Swift, Python, Java, Go, PHP or Docker
• JavaScript!
• Can take arguments (as well as having default arguments too)
EXAMPLE
function main() {
return { output: ‘Pew pew!’ };
}
GETTING IT TO IBMCLOUD/OPENWHISK
• CLI to create
• CLI to update
• (Yes, this can be repetitive)
• bx wsk action create NAME file
• bx wsk action update NAME file
DEMO
RUNNING YOUR ACTION
• bx wsk action invoke NAME
• This is asynchronous!
• But you can get around that. ;)
DEMO
ACTIONS WITH ARGUMENTS
• One main argument object sent to function
• CLI call:
• --param name value
• --param-file foo.json
• You can define defaults in code or at the Action level
• bx wsk action update nameOfAction --param paramName
paramValue
TASK TWO
Add an argument
for type
1
Use the type to
figure out the
color
2
Default to white
3
DEMO
MORE ON ACTIVATIONS
• Useful for debugging errors
• You can watch your activations live (wsk activation poll)
LET’S SCREW UP!
ASYNC ACTIONS
• Wait – wasn’t it already async?
• An Async action being called by an Async CLI
EXAMPLE
function main(args) {
//stuff here, fancy stuff
return new Promise(function(resolve, reject) {
//stuff
});
}
TASK THREE
Hit the Death Star
API
1
Retrieve targeting
info from XML
Java-based service
2
Rewrite XML to
JSON
3
DEMO
HOW DO WE ACTUALLY USE
THIS?
ACTUALLY USING THE DARN THING
• Everything has a secure REST API (and npm package)
• Web Actions
• API Gateway
• "api-experimental“ (Old school, don’t use, deprecated, etc)
WEB ACTIONS
• Enabled via an action annotation (think metadata)
• bx wsk action update foo --web true
• Your action is now anonymously-accessible via a URL
• https://{APIHOST}/api/v1/web/{QUALIFIED ACTION NAME}.{EXT}
• bx wsk action get NAME --url
WEB ACTIONS (2)
• Support for HTTP, JSON, HTML, images
• URL can ask for different content response types
• URL can ask for a portion of the response
• Automatically map query and form values to params
• Access to request headers/body
• Code *will* change
TASK FOUR
Help
Stormtrooper
Recruitment
1
Build a static form
2
Process the form
result
3
DEMO
API GATEWAY
• The “Enterprise” Level API (kidding – mostly)
• Enables specific HTTP methods
• Enables monitoring
• Enables rate limiting
• Enables key/auth management
• UI + CLI support
SEQUENCES
• Simply a way to link actions
• Output automatically “flows” from one to the other
• Made in CLI: bx wsk action create NAME --sequence
A,B,C
• End result is an action
• Input/Output must ‘connect’
TASK FIVE
Create a new
“Verify Type”
action
1
Build Sequence
between Verify
and Paint
2
Return the paint
color
3
DEMO
PACKAGES
• Just an organization thing
• Literally – a subdirectory
• Actions are in a “default” package (by – wait for it – default)
• CLI to create/get details on packages
• Default params can be set package level
• You can share packages
• OpenWhisk has some (mostly around Watson stuff)
EXAMPLE
• bx wsk package create NAME
• bx wsk package list
• bx wsk package get NAME (optionally with --summary)
• bx wsk action create PACKAGE/ACTION foo.js
TRIGGERS AND RULES
• A trigger is an event source
• New email
• New Git commit
• Time based (think cron)
• Triggers have data (like an event in JS)
• A rule is the pairing between one trigger and one action
EXAMPLES
• 911 Example
• Blog Nag Example
IBM COMPOSER & CLOUD SHELL
• New way to build apps
• New graphical shell
• https://github.com/ibm-functions/composer
PRICING
• https://console.ng.bluemix.net/openwhisk/learn/pricing
• “you only pay for the exact duration your code is executing, rounded
up to the nearest 100ms”
• $0.000017 per second of execution, per GB of memory allocated
• 5M activations using 128MB per action and averaging 500ms: Free
• 10M activations using 512MB averaging 1 second: $78.20
• Free like kittens! (Ok, so not…)
WRAP UP
• Slack: openwhisk-team.slack.com (signup at
slack.openwhisk.org)
• My stuff: https://www.raymondcamden.com/tags/openwhisk
• Includes an example of testing
• Developer Journey:
https://developer.ibm.com/code/journey/unlock-enterprise-
data-using-apis/
• Visual Studio Code extension
• https://github.com/openwhisk/openwhisk-vscode
http://www.oreilly.com/programming/free/developing-serverless-
applications.csp
“YOU KNOW SERVERLESS
STILL HAS SERVERS,
RIGHT?”
Going Serverless with OpenWhisk

More Related Content

What's hot

Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
Shaun Murakami
 
Subversion Saves The Day
Subversion Saves The DaySubversion Saves The Day
Subversion Saves The Day
Lisantra Technologies, LLC
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
Claus Ibsen
 
308 the dark side of containers new
308 the dark side of containers new308 the dark side of containers new
308 the dark side of containers new
Alexandru Hapliuc
 
Automate Amazon S3 Storage with Alexandria
Automate Amazon S3 Storage with AlexandriaAutomate Amazon S3 Storage with Alexandria
Automate Amazon S3 Storage with Alexandria
Jeffrey Kemp
 
Build reactive systems on lambda
Build reactive systems on lambdaBuild reactive systems on lambda
Build reactive systems on lambda
Yan Cui
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
Yan Cui
 
Java to scala
Java to scalaJava to scala
Java to scala
Graham Tackley
 
Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015
Jhalak Modi
 
(CMP302) Amazon ECS: Distributed Applications at Scale
(CMP302) Amazon ECS: Distributed Applications at Scale(CMP302) Amazon ECS: Distributed Applications at Scale
(CMP302) Amazon ECS: Distributed Applications at Scale
Amazon Web Services
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
George Wilson
 
Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015
Jhalak Modi
 
DevOps for Scala
DevOps for ScalaDevOps for Scala
DevOps for Scala
Michele Sciabarrà
 
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up LoftTurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
Amazon Web Services
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECSContinuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS
Amazon Web Services
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenches
Yan Cui
 
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
Jhalak Modi
 
Gone in 60 Seconds
Gone in 60 SecondsGone in 60 Seconds
Gone in 60 Seconds
Richard Boyd, II
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
Jelastic Multi-Cloud PaaS
 
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
 MJ Berends talk - Women & Non-Binary Focused Intro to AWS MJ Berends talk - Women & Non-Binary Focused Intro to AWS
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
AWS Chicago
 

What's hot (20)

Open stack ocata summit enabling aws lambda-like functionality with openstac...
Open stack ocata summit  enabling aws lambda-like functionality with openstac...Open stack ocata summit  enabling aws lambda-like functionality with openstac...
Open stack ocata summit enabling aws lambda-like functionality with openstac...
 
Subversion Saves The Day
Subversion Saves The DaySubversion Saves The Day
Subversion Saves The Day
 
Developing Microservices with Apache Camel
Developing Microservices with Apache CamelDeveloping Microservices with Apache Camel
Developing Microservices with Apache Camel
 
308 the dark side of containers new
308 the dark side of containers new308 the dark side of containers new
308 the dark side of containers new
 
Automate Amazon S3 Storage with Alexandria
Automate Amazon S3 Storage with AlexandriaAutomate Amazon S3 Storage with Alexandria
Automate Amazon S3 Storage with Alexandria
 
Build reactive systems on lambda
Build reactive systems on lambdaBuild reactive systems on lambda
Build reactive systems on lambda
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
 
Java to scala
Java to scalaJava to scala
Java to scala
 
Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015Meeyup aws-loadbalancing-28032015
Meeyup aws-loadbalancing-28032015
 
(CMP302) Amazon ECS: Distributed Applications at Scale
(CMP302) Amazon ECS: Distributed Applications at Scale(CMP302) Amazon ECS: Distributed Applications at Scale
(CMP302) Amazon ECS: Distributed Applications at Scale
 
Modern websites in 2020 and Joomla
Modern websites in 2020 and JoomlaModern websites in 2020 and Joomla
Modern websites in 2020 and Joomla
 
Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015Building A Dynamic Website - 31st Jan 2015
Building A Dynamic Website - 31st Jan 2015
 
DevOps for Scala
DevOps for ScalaDevOps for Scala
DevOps for Scala
 
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up LoftTurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
TurboCharge Your Continuous Delivery Pipeline with Containers - Pop-up Loft
 
Continuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECSContinuous Delivery to Amazon ECS
Continuous Delivery to Amazon ECS
 
AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenches
 
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...Scaling your web app  horizontally and vertically (ahmedabad amazon aws cloud...
Scaling your web app horizontally and vertically (ahmedabad amazon aws cloud...
 
Gone in 60 Seconds
Gone in 60 SecondsGone in 60 Seconds
Gone in 60 Seconds
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
 
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
 MJ Berends talk - Women & Non-Binary Focused Intro to AWS MJ Berends talk - Women & Non-Binary Focused Intro to AWS
MJ Berends talk - Women & Non-Binary Focused Intro to AWS
 

Similar to Going Serverless with OpenWhisk

[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
Amazon Web Services Korea
 
System insight without Interference
System insight without InterferenceSystem insight without Interference
System insight without Interference
Tony Tam
 
AWS Lambda at JUST EAT
AWS Lambda at JUST EATAWS Lambda at JUST EAT
AWS Lambda at JUST EAT
Andrew Brown
 
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
Amazon Web Services Korea
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
Ortus Solutions, Corp
 
Embulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダEmbulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダ
Sadayuki Furuhashi
 
OpenWhisk Go Runtime
OpenWhisk Go RuntimeOpenWhisk Go Runtime
OpenWhisk Go Runtime
Michele Sciabarrà
 
Exploring KSQL Patterns
Exploring KSQL PatternsExploring KSQL Patterns
Exploring KSQL Patterns
confluent
 
Fighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with EmbulkFighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with Embulk
Sadayuki Furuhashi
 
OpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - LondonOpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - London
Alex Ellis
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Josh Padnick
 
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhereOpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
Alex Ellis
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
CodeFest
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?
hawkowl
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
Amazon Web Services
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
Amazon Web Services
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
Ortus Solutions, Corp
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
Ryan Cuprak
 
Innovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCInnovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXC
kscaldef
 
Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015
Evan Chan
 

Similar to Going Serverless with OpenWhisk (20)

[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵 [AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
[AWS Dev Day] 실습워크샵 | Amazon EKS 핸즈온 워크샵
 
System insight without Interference
System insight without InterferenceSystem insight without Interference
System insight without Interference
 
AWS Lambda at JUST EAT
AWS Lambda at JUST EATAWS Lambda at JUST EAT
AWS Lambda at JUST EAT
 
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
컴퓨팅 서비스 업데이트 - EC2, ECS, Lambda (김상필) :: re:Invent re:Cap Webinar 2015
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
 
Embulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダEmbulk - 進化するバルクデータローダ
Embulk - 進化するバルクデータローダ
 
OpenWhisk Go Runtime
OpenWhisk Go RuntimeOpenWhisk Go Runtime
OpenWhisk Go Runtime
 
Exploring KSQL Patterns
Exploring KSQL PatternsExploring KSQL Patterns
Exploring KSQL Patterns
 
Fighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with EmbulkFighting Against Chaotically Separated Values with Embulk
Fighting Against Chaotically Separated Values with Embulk
 
OpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - LondonOpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - London
 
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container ServicePlay Framework + Docker + CircleCI + AWS + EC2 Container Service
Play Framework + Docker + CircleCI + AWS + EC2 Container Service
 
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhereOpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
OpenFaaS KubeCon Zero to Serverless in 60 seconds anywhere
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
WTF is Twisted?
WTF is Twisted?WTF is Twisted?
WTF is Twisted?
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
(DVO305) Turbocharge YContinuous Deployment Pipeline with Containers
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
 
Developing in the Cloud
Developing in the CloudDeveloping in the Cloud
Developing in the Cloud
 
Innovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXCInnovating faster with SBT, Continuous Delivery, and LXC
Innovating faster with SBT, Continuous Delivery, and LXC
 
Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015Akka in Production - ScalaDays 2015
Akka in Production - ScalaDays 2015
 

More from Raymond Camden

Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
Raymond Camden
 
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!
Raymond Camden
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoop
Raymond Camden
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
Raymond Camden
 
Hybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirstHybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirst
Raymond Camden
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to Cordova
Raymond Camden
 
Static Sites - Bringing Web 1.0 Back
Static Sites - Bringing Web 1.0 BackStatic Sites - Bringing Web 1.0 Back
Static Sites - Bringing Web 1.0 Back
Raymond Camden
 
Leveling Up at JavaScript
Leveling Up at JavaScriptLeveling Up at JavaScript
Leveling Up at JavaScript
Raymond Camden
 
The Other Dev Tools
The Other Dev ToolsThe Other Dev Tools
The Other Dev Tools
Raymond Camden
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
Raymond Camden
 
ColdFusion 10
ColdFusion 10ColdFusion 10
ColdFusion 10
Raymond Camden
 

More from Raymond Camden (11)

Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
 
Don't Over-React - just use Vue!
Don't Over-React - just use Vue!Don't Over-React - just use Vue!
Don't Over-React - just use Vue!
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoop
 
Cordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirstCordova + Ionic + MobileFirst
Cordova + Ionic + MobileFirst
 
Hybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirstHybrid Mobile Development and MobileFirst
Hybrid Mobile Development and MobileFirst
 
Introduction to Cordova
Introduction to CordovaIntroduction to Cordova
Introduction to Cordova
 
Static Sites - Bringing Web 1.0 Back
Static Sites - Bringing Web 1.0 BackStatic Sites - Bringing Web 1.0 Back
Static Sites - Bringing Web 1.0 Back
 
Leveling Up at JavaScript
Leveling Up at JavaScriptLeveling Up at JavaScript
Leveling Up at JavaScript
 
The Other Dev Tools
The Other Dev ToolsThe Other Dev Tools
The Other Dev Tools
 
Introduction to PhoneGap
Introduction to PhoneGapIntroduction to PhoneGap
Introduction to PhoneGap
 
ColdFusion 10
ColdFusion 10ColdFusion 10
ColdFusion 10
 

Recently uploaded

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
Jen Stirrup
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 

Recently uploaded (20)

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...The Metaverse and AI: how can decision-makers harness the Metaverse for their...
The Metaverse and AI: how can decision-makers harness the Metaverse for their...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 

Going Serverless with OpenWhisk

  • 2. WHY AM I HERE? • Developer Advocate for IBM • LoopBack, OpenWhisk, Node.js, Cordova, web stuff, and cats • Blogging at raymondcamden.com • Tweeting at @raymondcamden
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. CONGRATULATIONS! • New job! • CTO of the Galactic Empire • Full discretion! • Build the Future of the Empire!
  • 8.
  • 9. CURRENT SYSTEM • J2EE servers • Oracle • Monolithic, slow to update • One change requires 10 people to sign off, 10 unit tests, a Star Destroyer, and a full day of Jenkins deployment
  • 10. NEW SYSTEM • Node/JavaScript • Microservices • Serverless
  • 11. LETS TALK ABOUT THAT NAME… “Serverless”
  • 12. WHAT IS SERVERLESS? “Serverless computing refers to a model where the existence of servers is simply hidden from developers. I.e. that even though servers still exist developers are relieved from the need to care about their operation. They are relieved from the need to worry about low- level infrastructural and operational details such as scalability, high-availability, infrastructure-security, and so forth.” Credit: A dead link at IBM
  • 13.
  • 14. “FUNCTION AS A SERVICE” • I write a function and it does one thing • The actual hosting of the function, the making it available, is handled by the service • I call my function • “Details”
  • 15.
  • 16.
  • 17.
  • 19.
  • 20. INSTALLATION • Focused on the IBM Cloud (Bluemix) path • https://console.ng.bluemix.net/openwhisk/
  • 21.
  • 22.
  • 23.
  • 24. TASK ONE Stormtroopers get armor 1 Armor needs paint 2 What color should it be? 3
  • 26. ACTIONS ARE… • Small, atomic, stateless functions that do stuff (normally one thing) • Written in JavaScript, Swift, Python, Java, Go, PHP or Docker • JavaScript! • Can take arguments (as well as having default arguments too)
  • 27. EXAMPLE function main() { return { output: ‘Pew pew!’ }; }
  • 28. GETTING IT TO IBMCLOUD/OPENWHISK • CLI to create • CLI to update • (Yes, this can be repetitive) • bx wsk action create NAME file • bx wsk action update NAME file
  • 29. DEMO
  • 30. RUNNING YOUR ACTION • bx wsk action invoke NAME • This is asynchronous! • But you can get around that. ;)
  • 31. DEMO
  • 32. ACTIONS WITH ARGUMENTS • One main argument object sent to function • CLI call: • --param name value • --param-file foo.json • You can define defaults in code or at the Action level • bx wsk action update nameOfAction --param paramName paramValue
  • 33. TASK TWO Add an argument for type 1 Use the type to figure out the color 2 Default to white 3
  • 34. DEMO
  • 35. MORE ON ACTIVATIONS • Useful for debugging errors • You can watch your activations live (wsk activation poll)
  • 37. ASYNC ACTIONS • Wait – wasn’t it already async? • An Async action being called by an Async CLI
  • 38. EXAMPLE function main(args) { //stuff here, fancy stuff return new Promise(function(resolve, reject) { //stuff }); }
  • 39. TASK THREE Hit the Death Star API 1 Retrieve targeting info from XML Java-based service 2 Rewrite XML to JSON 3
  • 40. DEMO
  • 41. HOW DO WE ACTUALLY USE THIS?
  • 42. ACTUALLY USING THE DARN THING • Everything has a secure REST API (and npm package) • Web Actions • API Gateway • "api-experimental“ (Old school, don’t use, deprecated, etc)
  • 43. WEB ACTIONS • Enabled via an action annotation (think metadata) • bx wsk action update foo --web true • Your action is now anonymously-accessible via a URL • https://{APIHOST}/api/v1/web/{QUALIFIED ACTION NAME}.{EXT} • bx wsk action get NAME --url
  • 44. WEB ACTIONS (2) • Support for HTTP, JSON, HTML, images • URL can ask for different content response types • URL can ask for a portion of the response • Automatically map query and form values to params • Access to request headers/body • Code *will* change
  • 45. TASK FOUR Help Stormtrooper Recruitment 1 Build a static form 2 Process the form result 3
  • 46. DEMO
  • 47. API GATEWAY • The “Enterprise” Level API (kidding – mostly) • Enables specific HTTP methods • Enables monitoring • Enables rate limiting • Enables key/auth management • UI + CLI support
  • 48. SEQUENCES • Simply a way to link actions • Output automatically “flows” from one to the other • Made in CLI: bx wsk action create NAME --sequence A,B,C • End result is an action • Input/Output must ‘connect’
  • 49. TASK FIVE Create a new “Verify Type” action 1 Build Sequence between Verify and Paint 2 Return the paint color 3
  • 50. DEMO
  • 51. PACKAGES • Just an organization thing • Literally – a subdirectory • Actions are in a “default” package (by – wait for it – default) • CLI to create/get details on packages • Default params can be set package level • You can share packages • OpenWhisk has some (mostly around Watson stuff)
  • 52. EXAMPLE • bx wsk package create NAME • bx wsk package list • bx wsk package get NAME (optionally with --summary) • bx wsk action create PACKAGE/ACTION foo.js
  • 53. TRIGGERS AND RULES • A trigger is an event source • New email • New Git commit • Time based (think cron) • Triggers have data (like an event in JS) • A rule is the pairing between one trigger and one action
  • 54. EXAMPLES • 911 Example • Blog Nag Example
  • 55. IBM COMPOSER & CLOUD SHELL • New way to build apps • New graphical shell • https://github.com/ibm-functions/composer
  • 56.
  • 57.
  • 58.
  • 59. PRICING • https://console.ng.bluemix.net/openwhisk/learn/pricing • “you only pay for the exact duration your code is executing, rounded up to the nearest 100ms” • $0.000017 per second of execution, per GB of memory allocated • 5M activations using 128MB per action and averaging 500ms: Free • 10M activations using 512MB averaging 1 second: $78.20 • Free like kittens! (Ok, so not…)
  • 60. WRAP UP • Slack: openwhisk-team.slack.com (signup at slack.openwhisk.org) • My stuff: https://www.raymondcamden.com/tags/openwhisk • Includes an example of testing • Developer Journey: https://developer.ibm.com/code/journey/unlock-enterprise- data-using-apis/ • Visual Studio Code extension • https://github.com/openwhisk/openwhisk-vscode
  • 62. “YOU KNOW SERVERLESS STILL HAS SERVERS, RIGHT?”

Editor's Notes

  1. I want to start off talking about “serverless”
  2. Create the action, make the name dynamic Update List
  3. Wsk action invoke name Wsk activation get X Wsk action invoke name –b Wsk action invoke name –b –r
  4. README! Be sure to run wsk bluemix login --user X --password Pick an action, let's say hello2 First, make it a web action! wsk action update hello2 --web true Now make a managed API: wsk api create /apis /hello2 get hello2 Note the output - it's the URL. Mention you can wsk api list if you forget copy the url, paste into browser, done, maybe add ?name=ray