Slide 1

Slide 1 text

@kevindubois @danieloh30 Serverless Java in Action: Cloud Agnostic Design Patterns and Tips

Slide 2

Slide 2 text

@kevindubois @danieloh30 Who We Are! Daniel Oh Developer Advocate, Java Champion @danieloh30 Kevin Dubois Developer Advocate, Java Champion @kevindubois

Slide 3

Slide 3 text

@kevindubois @danieloh30 overprovisioned & wasting resources underprovisioned & unhappy users! Traditional Deployments

Slide 4

Slide 4 text

@kevindubois @danieloh30 Serverless Use only what you need! with Serverless

Slide 5

Slide 5 text

@kevindubois @danieloh30 https://www.cncf.io/blog/2023/12/20/cncf-cloud-native-finops-cloud-financial-management-microsurvey/

Slide 6

Slide 6 text

@kevindubois @danieloh30 Java & Serverless

Slide 7

Slide 7 text

@kevindubois @danieloh30 Java warmup time https://youtu.be/bWmuqh6wHgE (first 13 minutes)

Slide 8

Slide 8 text

@kevindubois @danieloh30 Quarkus + Native (via GraalVM) 0.016 Seconds Quarkus + JVM (via OpenJDK) 0.943 Seconds Traditional Cloud-Native Stack 4.3 Seconds Supersonic, Subatomic Java Quarkus Quarkus + Native (via GraalVM) 12 MB Quarkus + JVM (via OpenJDK) 73 MB Traditional Cloud-Native Stack 136 MB

Slide 9

Slide 9 text

@kevindubois @danieloh30 AWS Lambda, Functions... Built around the FaaS components and other services such as API Gateways. It enabled a variety of use cases but it is far from ideal for general computing and with room for improvements. 1.0 ➔ HTTP and other few Sources ➔ Functions only ➔ Limited execution time (5 min) ➔ No orchestration ➔ Limited local development experience FaaS

Slide 10

Slide 10 text

@kevindubois @danieloh30

Slide 11

Slide 11 text

@kevindubois @danieloh30

Slide 12

Slide 12 text

@kevindubois @danieloh30 ● Regulatory changes ● Outages ● Price changes, contract renegotiations ● Other vendor offers better services ● New CIO/CTO ● Shadow IT ● … What if …

Slide 13

Slide 13 text

@kevindubois @danieloh30

Slide 14

Slide 14 text

@kevindubois @danieloh30 Writing cloud agnostic functions with Java & Quarkus

Slide 15

Slide 15 text

@kevindubois @danieloh30 github.com/serverless-java-in-action/examples

Slide 16

Slide 16 text

@kevindubois @danieloh30 quarkus create app funqy \ -x funqy-amazon-lambda

Slide 17

Slide 17 text

@kevindubois @danieloh30 AWS Lambda, Functions... Built around the FaaS components and other services such as API Gateways. It enabled a variety of use cases but it is far from ideal for general computing and with room for improvements. 1.0 ➔ HTTP and other few Sources ➔ Functions only ➔ Limited execution time (5 min) ➔ No orchestration ➔ Limited local development experience Serverless Containers With the advent of containers & Kubernetes, many frameworks and solutions started to auto-scale containers. Cloud providers created offerings using managed services completely abstracting Kubernetes APIs. 1.5 ➔ Fargate, Cloud Run, Container Instances ➔ Knative, KEDA, etc ➔ Kubernetes based auto-scaling ➔ Microservices and Functions ➔ Easier to debug & test locally ➔ Polyglot & Portable Serverless is evolving...

Slide 18

Slide 18 text

@kevindubois @danieloh30

Slide 19

Slide 19 text

@kevindubois @danieloh30 Open Source & Cloud Native Ecosystem FTW!

Slide 20

Slide 20 text

@kevindubois @danieloh30 Knative https://github.com/knative

Slide 21

Slide 21 text

@kevindubois @danieloh30 $ kn func create -l quarkus myfunc $ kn func deploy $ kn service create myservice --image=xyz github.com/serverless-java-in-action/examples

Slide 22

Slide 22 text

@kevindubois @danieloh30 AWS Lambda, Functions... Built around the FaaS components and other services such as API Gateways. It enabled a variety of use cases but it is far from ideal for general computing and with room for improvements. 1.0 ➔ HTTP and other few Sources ➔ Functions only ➔ Limited execution time (5 min) ➔ No orchestration ➔ Limited local development experience Serverless Containers With the advent of containers & Kubernetes, many frameworks and solutions started to auto-scale containers. Cloud providers created offerings using managed services completely abstracting Kubernetes APIs. 1.5 ➔ Fargate, Cloud Run, Container Instances ➔ Knative, KEDA, etc ➔ Kubernetes based auto-scaling ➔ Microservices and Functions ➔ Easier to debug & test locally ➔ Polyglot & Portable Integration & State The maturity and benefits of Serverless are recognized industry wide and it adds the missing parts to make pattern suitable for general purpose workloads and used on the enterprise. 2.0 ➔ Basic state handling ➔ Enterprise Integration Patterns ➔ Advanced Messaging Capabilities ➔ Blended with your PaaS ➔ Enterprise-ready event sources ➔ Solutions and outcome focused

Slide 23

Slide 23 text

@kevindubois @danieloh30 CloudEvents CNCF graduated project - https://cloudevents.io/ Provides a common event schema => Interoperability, portability Extensible through extension attributes SDKs for different programming languages Protocol-agnostic (HTTP, AMQP, MQTT, …) Wide adoption

Slide 24

Slide 24 text

@kevindubois @danieloh30 Knative Eventing Usage Patterns Broker and Trigger

Slide 25

Slide 25 text

@kevindubois @danieloh30

Slide 26

Slide 26 text

@kevindubois @danieloh30

Slide 27

Slide 27 text

@kevindubois @danieloh30

Slide 28

Slide 28 text

@kevindubois @danieloh30 github.com/kdubois/CamelQuarkusVoter

Slide 29

Slide 29 text

@kevindubois @danieloh30 Serverless Java in Action Kevin Dubois & Daniel Oh

Slide 30

Slide 30 text

@kevindubois @danieloh30 Thank you! Daniel Oh Developer Advocate, Java Champion @danieloh30 Kevin Dubois Developer Advocate, Java Champion @kevindubois