SlideShare a Scribd company logo
Mauricio Salatino & Thomas Vitale
Spring I/O
May 27th, 2022
Knative and Spring
Bringing back the func
@salaboy @vitalethomas
Mauricio Salatino
VMware - Knative OSS
* a.k.a @Salaboy

* Sta
ff
Engineer - Knative Eventing
tech lead for VMware 

* Knative OSS core contributor

* Passionate about Functions,
Platforms, Open Source and
Kubernetes

salaboy.com
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
Quiz Game
thomasvitale.com @vitalethomas
@salaboy @vitalethomas
Building applications using functions
Serverless
@salaboy @vitalethomas
Serverless Architectures
Developers focus on code
Focus on business logic
@salaboy @vitalethomas
Developer
Platform
Infrastructure

Provisioning
Workload

Management
Dynamic

Scaling
Knative Serving
Serverless Containers on Kubernetes
Developer-friendly

abstractions
From code to URL
Autoscaling

Scaling to zero
Progressive

Rollouts
Request-driven

Event-driven
@salaboy @vitalethomas
Cloud agnostic
buildpacks.io
Demo
thomasvitale.com @vitalethomas
@salaboy @vitalethomas
Knative Serving and Buildpacks - From code to URL
Platform v1 - Serverless experience
From containers to deployment with autoscaling
@salaboy @vitalethomas
Image
pack kn
URL
Kubernetes Cluster
Container
Container
Container
Knative
Serving
Functions
@salaboy @vitalethomas
Demo
thomasvitale.com @vitalethomas
@salaboy @vitalethomas
Knative Functions - From code to URL
Functions
Functional programming model
Triggered by
requests or events
Stateless Smaller scope
Cold start Cost optimization
@salaboy @vitalethomas
Functions Patterns
Topologies for functional programming
@salaboy @vitalethomas
Asynchronous
processing
Event-based
Data stream

via chained
functions
Synchronous
Asynchronous
Fire and Forget
Request/
Response
Request/
Response (State)
More on Knative Functions
In active development, join the community!
External templates

repository
Run locally with

func run
On-cluster build,

no Docker required
Roadmap to 1.0 GA
@salaboy @vitalethomas
Works with multiple
languages and
frameworks
Platform v2 - Polyglot Functions
From idea to deployment with autoscaling
@salaboy @vitalethomas
URL
func create
Image
func deploy
Kubernetes Cluster
Container
Container
Container
Knative
Serving
Functions with Spring
@salaboy @vitalethomas
Spring Native
Native executables with GraalVM
Slower

Heavier

Build
Instant

Startup
Reduced

Memory

Consumption
Instant

Peak

Performance
Fewer

Runtime

Optimizations
@salaboy @vitalethomas
Functional Programming Paradigm
Java 8 Functional Interfaces
Supplier<O> Function<I,O> Consumer<I>
@salaboy @vitalethomas
Spring Cloud Function
Business logic as functions
Transparent

Type

Conversion
Function

Arity
Function

Composition
Reactive

Support
JAR

Functions
@salaboy @vitalethomas
Demo
thomasvitale.com @vitalethomas
@salaboy @vitalethomas
Knative Functions - From code to URL
Function Composition
Data processing via functions
uppercase() sentence()
Data processing
“I play the PIANO”
“piano” “PIANO”
Spring Cloud Function
Deployment and integrations
Knative CloudEvents RSocket
Azure

Functions
Google Cloud
Functions
AWS

Lambda
@salaboy @vitalethomas
Events
@salaboy @vitalethomas
CloudEvents
Interoperability and standardization
Metadata
Data
Id

Source

Type
Payload
JSON

AMQP

Kafka

MQTT
@salaboy @vitalethomas
Spring Cloud Functions Routing
Routing Events to functions
A()
CloudEvent
B()
C()
Router


[Ce-Type]
Knative Eventing
Event routing and triggers
Developer-friendly

abstractions
Event-driven
architectures
Event routing
Polyglot support
with CloudEvents
Pluggable
@salaboy @vitalethomas
Cloud agnostic
Platform v3 - Knative Eventing
Event-driven and reactive functions
@salaboy @vitalethomas
URL
func create
+ trigger
Image
func deploy
Kubernetes Cluster
Container Container
Knative
Serving &
Eventing
Knative Broker
Knative Event Sources
Trigger A Trigger B
Game - Architecture
@salaboy @vitalethomas
Kubernetes Cluster
Game - Functions
Synchronous functions with Knative
<Client Side>


React Application
<Orchestrator>


Game FrontEnd
<Function>


Start Game
<Function>


Level X


…
<Function>


Get LeaderB
Redis


(State)
HTTP
SYNC
<Function>


Level 1


…
Game - Eventing
Knative Eventing, CloudEvents & RSocket
Kubernetes Cluster
<Client Side>


React Application
<Orchestrator>


Game FrontEnd
<Function>


Level X


…
Redis
HTTP SYNC
Broker
Trigger
Score 

CloudEvent
RSocket
GameScore 

CloudEvent
Trigger
Another
Function
thomasvitale.com @vitalethomas
@salaboy @vitalethomas
tinyurl.com/springio-func
Discount codes
Manning
• 45% discount code, valid for
all products in all format

• ctwspringio22


• manning.com
Resources
Source code
• Learn more about the game: 

• https://github.com/salaboy/from-monolith-to-k8s/tree/main/game

• Deploy the game on Kubernetes:

• https://github.com/ThomasVitale/eventing-game

• Spring Cloud Function samples:

• https://github.com/ThomasVitale/springio-2022-knative-spring-func

More Related Content

PPTX
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
PDF
Infinispan for Dummies
PPT
My Sql Data Migration
PDF
Intro to Pinot (2016-01-04)
PPTX
AlwaysON Basics
PDF
Event Driven-Architecture from a Scalability perspective
PPTX
Secure your app with keycloak
PPTX
Introduction to Google Cloud Platform
Microservices Platform with Spring Boot, Spring Cloud Config, Spring Cloud Ne...
Infinispan for Dummies
My Sql Data Migration
Intro to Pinot (2016-01-04)
AlwaysON Basics
Event Driven-Architecture from a Scalability perspective
Secure your app with keycloak
Introduction to Google Cloud Platform

What's hot (20)

PDF
Secure your Application with Google cloud armor
PDF
Microservice With Spring Boot and Spring Cloud
PDF
Building an analytics workflow using Apache Airflow
PPTX
AWS Elastic Compute Cloud (EC2)
PDF
Bridging the Security Testing Gap in Your CI/CD Pipeline
PPTX
Amazon SQS overview
PDF
Disaster Recovery Plans for Apache Kafka
PDF
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
PDF
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
PDF
Pinterest - Big Data Machine Learning Platform at Pinterest
PDF
Api observability
PDF
Apache flink
PDF
Enterprise Integration Patterns with Apache Camel
PPTX
CI/CD Pipeline with Kubernetes
PDF
Oracle Enterprise Manager
PDF
Observability, Distributed Tracing, and Open Source: The Missing Primer
DOCX
Business requirement checklist
PDF
Monitoring modern applications using Elastic
PPTX
Azure WAF
PDF
GraalVM Native and Spring Boot 3.0
Secure your Application with Google cloud armor
Microservice With Spring Boot and Spring Cloud
Building an analytics workflow using Apache Airflow
AWS Elastic Compute Cloud (EC2)
Bridging the Security Testing Gap in Your CI/CD Pipeline
Amazon SQS overview
Disaster Recovery Plans for Apache Kafka
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Pinterest - Big Data Machine Learning Platform at Pinterest
Api observability
Apache flink
Enterprise Integration Patterns with Apache Camel
CI/CD Pipeline with Kubernetes
Oracle Enterprise Manager
Observability, Distributed Tracing, and Open Source: The Missing Primer
Business requirement checklist
Monitoring modern applications using Elastic
Azure WAF
GraalVM Native and Spring Boot 3.0
Ad

Similar to Spring I/O 2022: Knative and Spring - Bringing back the `func` (20)

PDF
Knative and Spring - Bringing back the func.pdf
PDF
A Polyglot Developer Experience on Kubernetes - KubeCon EU Valencia
PPTX
Public v1 real world example of azure functions serverless conf london 2016
PDF
SpringBoot and Spring Cloud Service for MSA
PPTX
Microservices with kubernetes @190316
PPTX
Spring on PAS - Fabio Marinelli
PPTX
System Integration using Reactive Programming | Integration Monday
PDF
apidays Australia 2023 - APIs Aren't Enough: Why SaaS Leaders Are Investing I...
PDF
Building serverless integration solutions with Microsoft Azure
PDF
Spring Boot & Spring Cloud on Pivotal Application Service
PPTX
Serverless Single Page Apps with React and Redux at ItCamp 2017
PDF
Spring Cloud Function & Project riff #jsug
PPTX
Go Serverless with Cosmos DB, Azure Functions and Blazor
PPTX
What's new for Serverless Computing in Azure
PPTX
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...
PPTX
Build with Serverless Applications with azure functions By usama wahab Khan
PPT
Build & Deploy Scalable Cloud Applications in Record Time
PDF
e-KTP Information Extraction with Google Cloud Function & Google Cloud Vision
PDF
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
PPTX
agile microservices @scaibo
Knative and Spring - Bringing back the func.pdf
A Polyglot Developer Experience on Kubernetes - KubeCon EU Valencia
Public v1 real world example of azure functions serverless conf london 2016
SpringBoot and Spring Cloud Service for MSA
Microservices with kubernetes @190316
Spring on PAS - Fabio Marinelli
System Integration using Reactive Programming | Integration Monday
apidays Australia 2023 - APIs Aren't Enough: Why SaaS Leaders Are Investing I...
Building serverless integration solutions with Microsoft Azure
Spring Boot & Spring Cloud on Pivotal Application Service
Serverless Single Page Apps with React and Redux at ItCamp 2017
Spring Cloud Function & Project riff #jsug
Go Serverless with Cosmos DB, Azure Functions and Blazor
What's new for Serverless Computing in Azure
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...
Build with Serverless Applications with azure functions By usama wahab Khan
Build & Deploy Scalable Cloud Applications in Record Time
e-KTP Information Extraction with Google Cloud Function & Google Cloud Vision
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
agile microservices @scaibo
Ad

More from Mauricio (Salaboy) Salatino (20)

PDF
Devoxx UK - Platforms on top of K8s
PDF
WTF_is_SRE_DeveloperEnabledPlatforms.pdf
PDF
Lessons Learnt from creating platforms on Kubernetes @ Rejekts
PDF
Building Developer Experiences for the Cloud .pdf
PDF
KUBEDAY - JAPAN 2022 - Building FaaS Platforms.pdf
PDF
The Challenges of building Cloud Native Platforms
PDF
Functions Working Group Update - August 2022.pdf
PDF
JBCNConf 2022: Go vs Java (Kubernetes)
PDF
Expanding Interoperability in the CD ecosystem - CDCon - Austin, TX - 2022
PDF
KnativeCon 2022 - Knative Functions
PDF
Knative Maintainers KubeConEU 22 Knative Overview and Update
PDF
CDEventsCon Expanding Interoperability in the CD ecosystem
PDF
Pave the Golden Path On Your Internal Platform
PDF
KCD Guatemala - Abstracciones sobre Abstracciones
PDF
KubeCon NA - 2021 Tools That I Wish Existed 3 Years Ago To Build a SaaS Offering
PDF
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
PDF
Intro to the Cloud with Knative (Spanish)
PDF
Keptn Meetup Interoperable ci/cd ecosystem
PDF
Kubernetes Community Day Spain -> Crossplane
PDF
QCon Plus From monoliths to k8s - Workshop
Devoxx UK - Platforms on top of K8s
WTF_is_SRE_DeveloperEnabledPlatforms.pdf
Lessons Learnt from creating platforms on Kubernetes @ Rejekts
Building Developer Experiences for the Cloud .pdf
KUBEDAY - JAPAN 2022 - Building FaaS Platforms.pdf
The Challenges of building Cloud Native Platforms
Functions Working Group Update - August 2022.pdf
JBCNConf 2022: Go vs Java (Kubernetes)
Expanding Interoperability in the CD ecosystem - CDCon - Austin, TX - 2022
KnativeCon 2022 - Knative Functions
Knative Maintainers KubeConEU 22 Knative Overview and Update
CDEventsCon Expanding Interoperability in the CD ecosystem
Pave the Golden Path On Your Internal Platform
KCD Guatemala - Abstracciones sobre Abstracciones
KubeCon NA - 2021 Tools That I Wish Existed 3 Years Ago To Build a SaaS Offering
Cloud Native Islamabad - Getting Closer to Continuous Delivery with Knative
Intro to the Cloud with Knative (Spanish)
Keptn Meetup Interoperable ci/cd ecosystem
Kubernetes Community Day Spain -> Crossplane
QCon Plus From monoliths to k8s - Workshop

Recently uploaded (20)

PPTX
CHAPTER 2 - PM Management and IT Context
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Essential Infomation Tech presentation.pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
System and Network Administraation Chapter 3
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
System and Network Administration Chapter 2
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
medical staffing services at VALiNTRY
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Transform Your Business with a Software ERP System
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Nekopoi APK 2025 free lastest update
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
top salesforce developer skills in 2025.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
CHAPTER 2 - PM Management and IT Context
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Essential Infomation Tech presentation.pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
System and Network Administraation Chapter 3
Design an Analysis of Algorithms II-SECS-1021-03
System and Network Administration Chapter 2
PTS Company Brochure 2025 (1).pdf.......
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
How Creative Agencies Leverage Project Management Software.pdf
medical staffing services at VALiNTRY
How to Choose the Right IT Partner for Your Business in Malaysia
Transform Your Business with a Software ERP System
Navsoft: AI-Powered Business Solutions & Custom Software Development
Nekopoi APK 2025 free lastest update
VVF-Customer-Presentation2025-Ver1.9.pptx
top salesforce developer skills in 2025.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf

Spring I/O 2022: Knative and Spring - Bringing back the `func`