Mauricio Salatino and Thomas Vitale presented on using Knative and Spring to build serverless applications with functions. They demonstrated how to deploy functions from code to a URL using Knative Serving and Functions. They also discussed using Knative Eventing to build event-driven architectures and route events between functions. Finally, they proposed a game architecture using functions and events on Kubernetes and discussed challenges around scaling, latency, and consistency.
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
Knative and Spring Functions for Serverless Applications
1. Mauricio Salatino & Thomas Vitale
Devoxx UK
May 11th, 2022
Knative and Spring
Bringing back the func
@salaboy @vitalethomas
2. 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
3. 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
6. Serverless Architectures
Developers focus on code
Focus on business logic
@salaboy @vitalethomas
Developer
Platform
Infrastructure
Provisioning
Workload
Management
Dynamic
Scaling
7. 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
16. Functions Patterns
Asynchronous Interactions
Async Processing
Function
HTTP
Doing
something that
takes a long time
……………………………………………
…………………………………………………
……………………………………………………
………………………………………………
………………………………………
Results
22. Func - extras
In active development, join the community!
* External template repos
* func run
* On-cluster build, no Docker locally
* 1.0 GA is on the roadmap
26. Spring Cloud Function
Business logic as functions
Transparent
Type
Conversion
Function
Arity
Function
Composition
Reactive
Support
JAR
Functions
@salaboy @vitalethomas
29. Spring Cloud Function
Deployment and integrations
Knative CloudEvents RSocket
Azure
Functions
Google Cloud
Functions
AWS
Lambda
@salaboy @vitalethomas
31. Kubernetes Cluster
Function-based Game architecture
Game architecture
<Client Side>
React Application
<Orchestrator>
Game FrontEnd
<Function>
Start Game
<Function>
Level X
…
<Function>
Get LeaderB
Redis
(State)
HTTP
SYNC
<Function>
Level 1
…
32. Takeaways and challenges
Synchronous functions
Functions scale up
and down based on
demand
An Orchestrator is
needed
Synchronising state
is hard
Make sure that the
data store is not a
bottleneck
Latency can
become an issue
@salaboy @vitalethomas
37. Routing Events with 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
38. Takeaways and challenges
Eventing
An event-based
approach enable
more reactive
scenarios
Knative Eventing
abstracts the
message broker
implementations
CloudEvents
provide a standard
structure for
sharing data
Monitoring is
required to
understand how
data is
fl
owing
We need to deal
with eventual
consistency in our
applications
@salaboy @vitalethomas
40. 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/devoxxuk-2022-knative-spring-func
41. Mauricio Salatino & Thomas Vitale
Devoxx UK
May 11th, 2022
Knative and Spring
Bringing back the func
@salaboy @vitalethomas