Thomas Vitale
DevTalks
June 8th, 2022
Serverless Java
With Spring Boot
@vitalethomas
Slide 2
Slide 2 text
Systematic
• Software Architect at
Systematic, Denmark.
• Author of “Cloud Native Spring
in Action” (Manning).
• Spring Security and Spring
Cloud contributor.
Thomas Vitale
thomasvitale.com @vitalethomas
Slide 3
Slide 3 text
Serverless
thomasvitale.com @vitalethomas
Slide 4
Slide 4 text
Serverless Architectures
Developers focus on code
Focus on business logic
Developer
Platform
Infrastructure
Provisioning
Workload
Management
Autoscaling
Scaling to zero
thomasvitale.com @vitalethomas
Packaging Spring Boot
JAR and native
thomasvitale.com @vitalethomas
JAR
Native
Gradle
bootJar
Maven
spring-boot:repackage
Gradle
nativeCompile
Maven
-Pnative package
Slide 8
Slide 8 text
Packaging Spring Boot
Container images with Cloud Native Buildpacks
thomasvitale.com @vitalethomas
Container Image
Gradle
bootBuildImage
Maven
spring-boot:build-image
Slide 9
Slide 9 text
Knative
thomasvitale.com @vitalethomas
Slide 10
Slide 10 text
Knative Serving
Serverless Containers on Kubernetes
Developer-friendly
abstractions
From code to URL
Autoscaling
Scaling to zero
Progressive
Rollouts
Request-driven
Event-driven
Cloud agnostic
thomasvitale.com @vitalethomas
Slide 11
Slide 11 text
Serverless experience on Kubernetes
From containers to deployment with Knative
Image
pack
kpack
bootBuildImage
kn
URL
Kubernetes Cluster
Container
Container
Container
Knative
Serving
thomasvitale.com @vitalethomas
Spring Cloud Function
thomasvitale.com @vitalethomas
Slide 15
Slide 15 text
Spring Cloud Function
Business logic as functions
thomasvitale.com @vitalethomas
Transparent
Type
Conversion
Function
Arity
Function
Composition
Reactive
Support
JAR
Functions
Slide 16
Slide 16 text
Spring Cloud Function
Deployment and integrations
thomasvitale.com @vitalethomas
Knative CloudEvents RSocket
Azure
Functions
Google Cloud
Functions
AWS
Lambda
Slide 17
Slide 17 text
CloudEvents
Interoperability and standardization
Metadata
Data
Id
Source
Type
Payload
JSON
AMQP
Kafka
MQTT
thomasvitale.com @vitalethomas
Slide 18
Slide 18 text
Spring Cloud Stream
thomasvitale.com @vitalethomas
Slide 19
Slide 19 text
Spring Cloud Stream
Event-driven microservices
thomasvitale.com @vitalethomas
Integration with
event brokers
Bindings
with functions
Publish
Subscribe
Consumer Groups Partitions
Discount codes
Manning
• 35% discount code, valid for
all products in all format
• ctwdevtalksro22
• manning.com
Slide 22
Slide 22 text
https://github.com/ThomasVitale/awesome-spring
Slide 23
Slide 23 text
Resources
Source code and more
• Sample project:
• https://github.com/ThomasVitale/devtalks-2022-serverless-java
• Knative and Spring - Bringing back the func:
• https://youtu.be/EKDYE_dStTI
thomasvitale.com @vitalethomas
Slide 24
Slide 24 text
Thomas Vitale
DevTalks
June 8th, 2022
Serverless Java
With Spring Boot
@vitalethomas