IBM Cloud / DOC ID / Month XX, 2018 / © 2018 IBM Corporation
FaaS meets JavaEE

Developing Cloud Native Applications at Speed

—

Chris Bailey

Chief Architect, Cloud Native Runtimes at IBM
Project Lead: Kitura, Cloud Native JS, Appsody
@Chris__Bailey
@Chris__Bailey
Appsody
Quarkus
Knative
FaaS
Serverless
Cloud Functions
Kubernetes
Docker
Lamba
OpenWhisk
JavaEE
@Chris__Bailey
Blockchain
@Chris__Bailey
Appsody
Quarkus
Knative
FaaS
Serverless
Cloud Functions
Kubernetes
Docker
Lamba
OpenWhisk
JavaEE
@Chris__Bailey
Serverless
What is
?
@Chris__Bailey6
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 7
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 8
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 9
Docker Docker
Virtual Machine
Application Stack
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Server
Application
JAR / WAR / EAR
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 10
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Application Stack
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 11
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Virtual Machine
Application Stack
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 12
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Docker Docker
Virtual Machine
Application Stack
Server
Application
JAR / WAR / EAR
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 13
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Application Stack
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 14
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Docker Docker
Virtual Machine
Application Stack
Server
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 15
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Docker Docker
Virtual Machine
Application Stack
Server
Application
JAR / WAR / EAR
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 16
Application Stack
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 17
Docker Docker
Virtual Machine
Application Stack
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Server
JAR / WAR / EAR
Lambda
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 18
Docker Docker
Virtual Machine
Application Stack
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
IaaS
CaaS
PaaS
FaaS
n instances
1..n instances
1..n instances
0..demand
instances
Server
Application
JAR / WAR / EAR
Lambda
@Chris__Bailey
Serverless == FaaS?
@Chris__Bailey
“Function as a service (FaaS)
is a category of cloud computing services that provides a platform allowing customers to 

develop, run, and manage application functionalities without the complexity of building and
maintaining the infrastructure typically associated with developing and launching an app. 



Building an application following this model is one way of achieving a "serverless" architecture,
and is typically used when building microservices applications.”
— Wikipedia
@Chris__Bailey
“Function as a service (FaaS)
is a category of cloud computing services that provides a platform allowing customers to 

develop, run, and manage application functionalities without the complexity of building and
maintaining the infrastructure typically associated with developing and launching an app. 



Building an application following this model is one way of achieving a "serverless" architecture,
and is typically used when building microservices applications.”
— Wikipedia
@Chris__Bailey
“Function as a service (FaaS)
is a category of cloud computing services that provides a platform allowing customers to 

develop, run, and manage application functionalities without the complexity of building and
maintaining the infrastructure typically associated with developing and launching an app. 



Building an application following this model is one way of achieving a "serverless" architecture,
and is typically used when building microservices applications.”
— Wikipedia
@Chris__Bailey
“Function as a service (FaaS)
is a category of cloud computing services that provides a platform allowing customers to 

develop, run, and manage application functionalities without the complexity of building and
maintaining the infrastructure typically associated with developing and launching an app. 



Building an application following this model is one way of achieving a "serverless" architecture,
and is typically used when building microservices applications.”
— Wikipedia
@Chris__Bailey
“Function as a service (FaaS)
is a category of cloud computing services that provides a platform allowing customers to 

develop, run, and manage application functionalities without the complexity of building and
maintaining the infrastructure typically associated with developing and launching an app. 



Building an application following this model is one way of achieving a "serverless" architecture,
and is typically used when building microservices applications.”
— Wikipedia
@Chris__Bailey
“Function as a service (FaaS)
is a category of cloud computing services that provides a platform allowing customers to 

develop, run, and manage application functionalities without the complexity of building and
maintaining the infrastructure typically associated with developing and launching an app. 



Building an application following this model is one way of achieving a "serverless" architecture,
and is typically used when building microservices applications.”
— Wikipedia
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 26
Increasingfocusonbusinesslogic
Decreasing concern over stack implementation
FaaS
0..demand
instances
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 27
Decreasing concern over stack implementation
FaaS
0..demand
instances
SimplifiedDevandDeploy
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 28
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 29
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
Servers
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 30
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
Servers
Functions
• Simplified Development
• Delegated framework stack
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 31
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
Servers
Functions
• Simplified Development
• Delegated framework stack
Serverless
• Scale on Demand
• Delegated infrastructure
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 32
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
Servers
Functions
• Simplified Development
• Delegated framework stack
Serverless
• Scale on Demand
• Delegated infrastructure
FaaS
• Functions development
• Serverless deployment
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 33
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
Servers
Simplified Dev
• Simplified Development
• Delegated framework stack
Serverless
• Scale on Demand
• Delegated infrastructure
FaaS
• Functions development
• Serverless deployment
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 34
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
Servers
Simplified Dev
• Simplified Development
• Delegated framework stack
Simplified Ops
• Scale on Demand
• Delegated infrastructure
FaaS
• Functions development
• Serverless deployment
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 35
FaaS
0..demand
instances
SimplifiedDevandDeploy
Simplified Infrastructure and Scaling
Servers
Simplified Dev
• Simplified Development
• Delegated framework stack
Simplified Ops
• Scale on Demand
• Delegated infrastructure
Simplified Dev and Ops
• Functions development
• Serverless deployment
@Chris__Bailey
FaaS ==
Serverless + Functions
@Chris__Bailey
Functions
Top three reported benefits:
@Chris__Bailey
Functions
• 42% reported gains in Speed of Development
Top three reported benefits:
@Chris__Bailey
Functions
• 17% reported gains in Time to Feature
• 42% reported gains in Speed of Development
Top three reported benefits:
@Chris__Bailey
Functions
• 9% reported gains in Cost of labor
• 17% reported gains in Time to Feature
• 42% reported gains in Speed of Development
Top three reported benefits:
@Chris__Bailey
Functions
• 9% reported gains in Cost of labor
• 17% reported gains in Time to Feature
• 42% reported gains in Speed of Development
Top three reported benefits:
Biggest benefit of serverless:
@Chris__Bailey
Functions
• 42% reported Easier development
• 9% reported gains in Cost of labor
• 17% reported gains in Time to Feature
• 42% reported gains in Speed of Development
Top three reported benefits:
Biggest benefit of serverless:
@Chris__Bailey
Functions
• 42% reported Easier development
• 9% reported gains in Cost of labor
• 17% reported gains in Time to Feature
• 42% reported gains in Speed of Development
Top three reported benefits:
Biggest benefit of serverless:
“We use serverless to decrease the time from our idea to getting
the end product in our customer’s hand.”

— Steven Surgnier, Co-founder and CTO, Fabric.
@Chris__Bailey
Functions
• 42% reported Easier development
• 9% reported gains in Cost of labor
• 17% reported gains in Time to Feature
• 42% reported gains in Speed of Development
Top three reported benefits:
Biggest benefit of serverless:
“We use serverless to decrease the time from our idea to getting
the end product in our customer’s hand.”

— Steven Surgnier, Co-founder and CTO, Fabric.
Average delivery speed increased 77%

Average of 4 “developer work days” saved per
month.
https://hackernoon.com/serverless-survey-77-delivery-speed-4-dev-workdays-mo-saved-26-aws-monthly-bill-d99174f70663
@Chris__Bailey
Functions
• 42% reported Easier development
• 9% reported gains in Cost of labor
• 17% reported gains in Time to Feature
• 42% reported gains in Speed of Development
Top three reported benefits:
Biggest benefit of serverless:
“We use serverless to decrease the time from our idea to getting
the end product in our customer’s hand.”

— Steven Surgnier, Co-founder and CTO, Fabric.
Average delivery speed increased 77%

Average of 4 “developer work days” saved per
month.
https://hackernoon.com/serverless-survey-77-delivery-speed-4-dev-workdays-mo-saved-26-aws-monthly-bill-d99174f70663
Simplified application models move the
standards and workflow to the platform
@Chris__Bailey
What is FaaS being using for?
@Chris__Bailey
Functions
Technical use cases for serverless:
@Chris__Bailey
Functions
• 73% for REST APIs
Technical use cases for serverless:
@Chris__Bailey
Functions
• 23% for Mobile Backends
• 73% for REST APIs
Technical use cases for serverless:
@Chris__Bailey
Apache OpenWhisk
Functions
@Chris__Bailey
Apache OpenWhisk
Functions
@Chris__Bailey
Apache OpenWhisk
AWS Lambda
Functions
@Chris__Bailey
Apache OpenWhisk
AWS Lambda
Functions
@Chris__Bailey
JAX-RS APIs
Functions
@Chris__Bailey
JAX-RS APIs
Functions
import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("properties")
public class PropertiesResource {
@GET
@Produces(MediaType.APPLICATION_JSON)
public JsonObject getProperties() {
JsonObjectBuilder builder = Json.createObjectBuilder()
System.getProperties().entrySet().stream()
.forEach(entry -> builder.add((String)entry.getKey(),
(String)entry.getValue()));
return builder.build();
}
}
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 56
: HTTP Functions
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 57
: HTTP Functions
Node.js “Connect” API
@Chris__Bailey
Java and FaaS
@Chris__Bailey
https://thenewstack.io/what-aws-lambdas-performance-stats-reveal/
Functions
Language usage on AWS Lambda
@Chris__Bailey
https://thenewstack.io/what-aws-lambdas-performance-stats-reveal/
Functions
• 67.6% using Node.js
Language usage on AWS Lambda
@Chris__Bailey
https://thenewstack.io/what-aws-lambdas-performance-stats-reveal/
Functions
• 26.4% using Python
• 67.6% using Node.js
Language usage on AWS Lambda
@Chris__Bailey
https://thenewstack.io/what-aws-lambdas-performance-stats-reveal/
Functions
• 26.4% using Python
• 67.6% using Node.js
Language usage on AWS Lambda
• 3.4% using Java
@Chris__Bailey63
OpenWhisk:
1 Action
1 Request
1 Container
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 64
OpenWhisk:
1 Action
1 Request
1 Container
Request 1
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 65
Docker
public static JsonObject main(JsonObject args)
POST /init
POST /run
OpenWhisk:
1 Action
1 Request
1 Container
Request 1
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 66
Docker
public static JsonObject main(JsonObject args)
POST /init
POST /run
OpenWhisk:
1 Action
1 Request
1 Container
Request 1
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 67
Docker
public static JsonObject main(JsonObject args)
POST /init
POST /run
OpenWhisk:
1 Action
1 Request
1 Container
Request
Request
1
1
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 68
Docker
public static JsonObject main(JsonObject args)
POST /init
POST /run
Docker
public static JsonObject main(JsonObject args)
POST /init
POST /run
OpenWhisk:
1 Action
1 Request
1 Container
Request
Request
1
1
@Chris__Bailey
13.7
8.764
1.629
0.5320.18
Framework Startup Times
@Chris__Bailey
13.7
8.764
1.629
0.5320.18
Framework Startup Times
@Chris__Bailey
13.7
8.764
1.629
0.5320.18
Framework Startup Times
@Chris__Bailey
Quarkus
http://github.com/quarkusio
http://twitter.com/QuarkusIO
https://quarkus.io
@Chris__Bailey
13.7
8.764
1.629
0.5320.18
Framework Startup Times
@Chris__Bailey
13.7
8.764
1.629
0.5320.18
Quarkus JVM
Framework Startup Times
@Chris__Bailey
13.7
8.764
1.629
0.5320.18
Quarkus JVMQuarkus Native
Framework Startup Times
@Chris__Bailey
Quarkus
http://github.com/quarkusio
http://twitter.com/QuarkusIO
https://quarkus.io
@Chris__Bailey
Quarkus Knative
http://github.com/quarkusio
http://twitter.com/QuarkusIO
https://quarkus.io
https://github.com/knative
https://twitter.com/knativeproject
https://knative.dev
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 78
Docker
public static JsonObject main(JsonObject args)
POST /init
POST /run
Docker
public static JsonObject main(JsonObject args)
POST /init
POST /run
OpenWhisk:
1 Action
1 Request
1 Container
Request
Request
1
1
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 79
Knative:
Multiple Endpoints
Multiple Requests
1 Container
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 80
Knative:
Multiple Endpoints
Multiple Requests
1 Container
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 81
Knative:
Multiple Endpoints
Multiple Requests
1 Container
Request 1..100
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 82
Knative:
Multiple Endpoints
Multiple Requests
1 Container
Request 1..100
Docker Docker
Server
Application
JAR / WAR / EAR
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 83
Knative:
Multiple Endpoints
Multiple Requests
1 Container
Request 1..100
Docker Docker
Server
Application
JAR / WAR / EAR
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 84
Knative:
Multiple Endpoints
Multiple Requests
1 Container
Request 1..100
Docker Docker
Server
Application
JAR / WAR / EAR
@Chris__BaileyIBM Cloud / © 2018 IBM Corporation 85
Knative:
Multiple Endpoints
Multiple Requests
1 Container
Request 1..100
Docker Docker
Server
Application
JAR / WAR / EAR
1..100
Request
Docker Docker
Server
Application
JAR / WAR / EAR
@Chris__Bailey
1..100
IBM Cloud / © 2018 IBM Corporation 86
Request
Request
Knative:
Multiple Endpoints
Multiple Requests
1 Container
1..100
Docker Docker
Server
Application
JAR / WAR / EAR
Docker Docker
Server
Application
JAR / WAR / EAR
@Chris__Bailey
Quarkus Knative
http://github.com/quarkusio
http://twitter.com/QuarkusIO
https://quarkus.io
https://github.com/knative
https://twitter.com/knativeproject
https://knative.dev
@Chris__Bailey
http://github.com/appsody
http://twitter.com/appsodydev
https://appsody.dev
Appsody Quarkus Knative
http://github.com/quarkusio
http://twitter.com/QuarkusIO
https://quarkus.io
https://github.com/knative
https://twitter.com/knativeproject
https://knative.dev
@Chris__Bailey
> appsody
: CLI
Continuous, Containerized:
dev | test | debug | build | deploy
100% Open Source, Built on Standard Technologies
Appsody
Build Cloud-Native Apps using any language or framework
@Chris__Bailey
: stacks
> appsody
: CLI
Continuous, Containerized:
dev | test | debug | build | deploy
Pre-built, Cloud Optimized
Shared through AppsodyHub
100% Open Source, Built on Standard Technologies
Appsody
Build Cloud-Native Apps using any language or framework
@Chris__Bailey
: deploy: stacks
> appsody
: CLI
Continuous, Containerized:
dev | test | debug | build | deploy
Pre-built, Cloud Optimized
Shared through AppsodyHub
Production deploy to Kubernetes
Server or Serverless Scaling
100% Open Source, Built on Standard Technologies
Appsody
Build Cloud-Native Apps using any language or framework
@Chris__Bailey
Docker
Application Functions
Connect
Docker
Application Functions
Connect
Appsody Stacks
Cloud Packaged
java
Docker
Application Functions
JAX-RS
python
Docker
Application Functions
Flask Handler
nodejs
@Chris__Bailey
Docker
Application Functions
Connect
Docker
Application Functions
Connect
Appsody Stacks
Cloud Packaged
java
Docker
Application Functions
JAX-RS
python
Docker
Application Functions
Flask Handler
nodejs
Cloud Native
@Chris__Bailey
Docker
Application Functions
Connect
Docker
Application Functions
Connect
Appsody Stacks
Cloud Functions
Cloud Native
Cloud Packaged
java
Docker
Application Functions
JAX-RS
python
Docker
Application Functions
Flask Handler
nodejs
@Chris__Bailey
Application Functions
Appsody Stacks
@Chris__Bailey
Application Functions
Appsody Stacks
Docker
JAX-RS
@Chris__Bailey
Appsody Stacks
Optimize for target platform
• OpenTracing
• Metrics/Monitoring
• Logging
• Security and Authentication
• etc
Application Functions
Docker
JAX-RS
@Chris__Bailey
> appsody
Developer
Appsody Hub
Cloud Configured Appsody Stacks
Developer Workflow using Appsody Stacks
@Chris__Bailey
> appsody
Developer
Appsody Hub
Discover
available
Appsody Stacks
appsody init
Developer’s App
Cloud Configured Appsody Stacks
Developer Workflow using Appsody Stacks
@Chris__Bailey
> appsody
Developer
Appsody Hub
Discover
available
Appsody Stacks
appsody init
Developer’s App
run

test
debugDevelop in IDE
Uses

Appsody Stack
Cloud Configured Appsody Stacks
Developer Workflow using Appsody Stacks
@Chris__Bailey
> appsody
Developer
Appsody Hub
Discover
available
Appsody Stacks
appsody init
Developer’s App
run

test
debugDevelop in IDE
Uses

Appsody Stack
git commit
Developer's

Git ProjectDeveloper’s App
Save Changes
Cloud Configured Appsody Stacks
Developer Workflow using Appsody Stacks
@Chris__Bailey
Appsody Stack
> appsody
Developer
Appsody Hub
Discover
available
Appsody Stacks
appsody init
Developer’s App
run

test
debugDevelop in IDE
Uses

Appsody Stack
git commit
Developer's

Git ProjectDeveloper’s App
Save Changes
Cloud Configured Appsody Stacks
Developer’s App
appsody deploy
Developer Workflow using Appsody Stacks
@Chris__Bailey
Appsody Stack
> appsody
Developer
Appsody Hub
Discover
available
Appsody Stacks
appsody init
Developer’s App
run

test
debugDevelop in IDE
Uses

Appsody Stack
git commit
Developer's

Git ProjectDeveloper’s App
Save Changes
Cloud Configured Appsody Stacks
Cloud Platform
Developer’s App
appsody deploy
Developer Workflow using Appsody Stacks
appsody deploy
@Chris__Bailey
Demo
@Chris__Bailey
http://github.com/appsody
http://twitter.com/appsodydev
https://appsody.dev
Appsody Quarkus Knative
http://github.com/quarkusio
http://twitter.com/QuarkusIO
https://quarkus.io
https://github.com/knative
https://twitter.com/knativeproject
https://knative.dev

FaaS Meets Java EE: Developing Cloud Native Applications at Speed