SlideShare a Scribd company logo
1 of 35
Download to read offline
Event-driven serverless
applications with Camel K
Nicola Ferraro - Principal Software Engineer @ Red Hat
Luca Burgazzoli - Principal Architect @ Red Hat
1
Agenda
2
● What is Apache Camel (and Camel K)?
● Camel K in the serverless space
● Demo
● Future developments
About us
3
Luca Burgazzoli
Principal Architect at Red Hat
Twitter: @lburgazzoli
We work on:
- Apache Camel and Camel K
- Red Hat Integration
- Knative Contrib
Nicola Ferraro
Principal Software Engineer at Red Hat
Twitter: @ni_ferraro
INTRO TO
APACHE CAMEL
… when you’re free to play!
We all love
microservices!
We are the
best team in
the world!
Software development is fun…
My
App
Let’s do it
serverless!
But then you realize...
… that you’re not alone in the world!
My
App
You need to solve a lot of problems:
● Different communication models (e.g. sync / async)
● Different protocols or messaging systems
● Different languages or technologies
● Different business domains
● Different data access patterns
● …
● What if your app is unavailable?
● How do we manage consistency?
Even with only two systems...
My
App
Your
App
I WAS A SHEEP
RANCHER
BEFORE I
WORKED HERE
● Different life philosophy
● Inability to change the other
side
● ...
If we had the perfect tool to deal with integration...
?
That could connect to
any almost any system
With support for known
integration patterns
That can work on and
off the cloud
That can integrate with
a simple language
from(“kafka:topic”)
.to(“grpc:endpoint”)
This is
Apache Camel
Apache Camel can set you free!
My
App
Your
App
from(“pulsar://company/nsx/topic1”)
.unmarshal().json()
.transform().simple(“${body[data]}”)
.to(“knative:event/activity”)
from(“knative:event/produced”)
.pollEnrich()
.simple(“aws2-s3://mybucket/files/${header.Ce-File}”)
.to(“kafka:ext-topic”)
Party Area
(Free lunch zone ®)
Apache Camel as of 2019/2020
● One of the most active Apache projects
● Several components contributed by the community
○ We have 329 346 components today
+40% New Users (users@camel.apache.org and StackOverflow)
+5 New Committers and PMC members
+4 New awesome sub-projects
(Camel K, Camel Quarkus, Camel Kafka Connect, Camel Spring-Boot)
Community is
what makes
Camel different
It does not look
11 years “old” ;)
Camel K
Camel K
● https://github.com/apache/camel-k
● A platform for directly running integrations on Openshift and Kubernetes
● Reached version 1.0.0 on June 9, 2020
What is Apache Camel K?
12
A lightweight integration platform, born on
Kubernetes, with serverless superpowers
Camel K13
Camel K for Developers
13
Create
integration file
from(“knative:channel/xxxx”)
.transform()...
.to(“kafka:topic”)
1
EXECUTE
CLI Tools
$ kamel run integration.java
2
RUNNING
Serverlesson
OpenShift/Kubernetes
3
Camel K14
Camel K Architecture
Knative
Kubernetes/OpenShift
Camel K Operator
DEVELOPER
Serverless
Function/Application
Pod
Serverless
Function/Application
Pod
Serverless
Function/Application
Pod
Tailored for cloud-native development
experience.
● Live coding on cloud
● Built-in dependency management
● Rapid deployment, incremental
updates
● Automate cloud resource generation
● Highly customizable
Integration
Custom Resource
LIVEUPDATE!!
Camel K15
Camel K Operator
CAMEL K
OPERATOR
● Choose a runtime
○ Java main
○ Quarkus
● Scaffold a project
● Add boilerplate
○ Container behaviour
○ Serverless behaviour
○ Monitoring setup …
● Add dependencies
● Create container image
○ Incremental updates
● Create OpenShift and Knative resources for
deployment
○ Secrets
○ Service
○ Config Map
○ Deployment
○ Ingress
Camel K16
Code Driven Serverless
from(“netty-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.to(“knative:channel/words”)
Knative Service
CronJob
Service
Route
Ingress
ServiceMonitor
Deployment
ConfigMap
Secret
camel-core
camel-jackson
camel-timer
camel-aws-s3
camel-sql
camel-knative
camel-netty-http
Container Images
JVM
Master
GC
Runtime
Readiness
Liveness
Channels
Brokers
Camel K17
Fast Deployment
from(“netty-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.to(“knative:channel/words”)
91e54dfb1179 ADD camel-netty-http
d74508fb5532 ADD camel-knative
adoptopenjdk/openjdk11:slim
ik-ab34df5462
from(“netty-http://0.0.0.0:8080”)
.process(new YourBusinessLogic())
.pollEnrich(“http://service”)
.to(“knative:channel/words”)
d74508fb5532 ADD camel-http
ik-ab34df5462
ik-cxfr345d
Evaluate
Run
Deploy
Build
Operator Phases
CAMEL K
AND
KNATIVE
Camel K loves Knative
A lightweight integration platform, born on
Kubernetes, with serverless superpowers
Not the official
logo, but we like it!
Camel K can also live without Knative, but it doesn’t want to ;)
Knative
Knative Serving Knative Eventing
Auto-scaling and scale-to-zero Messaging for event-based
applications
Knative
Service
POD
Scale Down to Zero
Request
Initiate and Start
Scale Up with Load
Knative Serving
Request
Request
Request
Request
POD
POD
POD
POD
Knative
Service
POD
rest().post(“/path”)
.to(“xx:system1”)
.to(“xx:system2”)
300+ components!
System 1
System 2
Request
Request
Request
Request
POD
POD
POD
POD
Scale Up with Load
Knative Serving with Camel K
Knative Eventing
Event Source
kn source
kn source create
kn source list
kn source list-types
Broker
New
Event
Trigger
kn trigger
Kn trigger create
kn trigger delete
kn trigger list
kn broker
Kn broker create
kn broker delete
kn broker list
Provider
kn service
kn service create
kn service delete
kn service describe
kn service list
kn service update
Event Providers
Infrastructure
New Customer
created event
Email service
Log service
Loyalty points
service
Trigger
Trigger
New
Event
New
Event
FEW Providers
Knative Eventing with Camel K
Event Source
Broker
New
Event
Camel K
Provider
Event Providers
Infrastructure
New Customer
created event
Email service
Log service
Loyalty points
service
New
Event
New
Event
300+ components!
Camel K
300+ components!
kamel run
kamel list
kamel delete
kamel run
kamel list
kamel delete
kn trigger
Kn trigger create
kn trigger delete
kn trigger list
Trigger
Knative Camel Sources
<< Custom Resource >>
kind: Integration
apiVersion:
camel.apache.org/v1
1
POD
POD
POD
POD
POD
For sources, users can choose to
deploy Knative CamelSources or
Apache Camel K Integrations
<< Custom Resource >>
kind: CamelSource
apiVersion:
sources.knative.dev/v1alpha1
Wraps...
kn source list ...
2
https://knative.dev/docs/eventing/samples/apache-camel-source/
DEMO
Demo
Camel Sources and Sinks
in an event mesh
Code:
https://github.com/nicolaferraro/camel-k-example-knative/tree/knative
Demo (backup recording)
https://youtu.be/_HeeALmroDM
THE FUTURE
POD
Quarkus
Currently, integrations can run on Quarkus in JVM mode:
POD POD
from(“knative:event/produced”)
.pollEnrich()
.simple(“aws2-s3://mybucket/files/${header.Ce-File}”)
.to(“kafka:ext-topic”)
The future is native,
with no changes in ux,
and much better
performance!
Have you heard
about GraalVM
and Mandrel?
https://github.com/apache/camel-quarkus
Kamelets
Meaning: Kamel route snippets
Non-camel users find it difficult to write Camel DSL, they just want to leverage it.
… … … …
1. Pick one
2. Configure parameters
3. Choose destination
query=quarkus
token=...
Kamelets have many more use cases outside Knative:
● Camel Kafka Connect
● Visual Tools for Camel K development
Kamelet Catalog (Kubernetes Objects)
Camel K
Testing software using BDD style.
Now part of citrusframework.org.
Same structure of Camel K (CLI + operator)
To run the test:
yaks test gateway.feature
https://github.com/citrusframework/yaks
Feature: API Gateway Works
Background:
Given URL: https://myservice/api/films
Scenario: Get a result from API
When send GET /
Then receive HTTP 200 OK
YAKS
Other important future developments
● Webhooks: reduce the amount of components that need an “always on” pod
● Keda: autoscaling not only limited to http workloads
Camel K
Want to learn more about Camel?
What’s new with Apache Camel 3? | DevNation Tech Talk
https://developers.redhat.com/devnation/tech-talks/apache-camel-3/
By Andrea Cosentino and Claus Ibsen
Kubernetes enterprise integration patterns with Camel-K | DevNation Tech Talk
https://developers.redhat.com/videos/youtube/51x9BewGCYA/
By Luca Burgazzoli and Nicola Ferraro
Thank you!
If you like Camel K:
1) Use it!
2) Contribute!
(We love any contribution!)
https://github.com/apache/camel-k
Follow us on Twitter:
@ni_ferraro
@lburgazzoli

More Related Content

More from Red Hat Developers

Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkRed Hat Developers
 
Distributed deployment of microservices across multiple OpenShift clusters | ...
Distributed deployment of microservices across multiple OpenShift clusters | ...Distributed deployment of microservices across multiple OpenShift clusters | ...
Distributed deployment of microservices across multiple OpenShift clusters | ...Red Hat Developers
 
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...Red Hat Developers
 
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...Red Hat Developers
 
11 CLI tools every developer should know | DevNation Tech Talk
11 CLI tools every developer should know | DevNation Tech Talk11 CLI tools every developer should know | DevNation Tech Talk
11 CLI tools every developer should know | DevNation Tech TalkRed Hat Developers
 
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkA Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkRed Hat Developers
 
GitHub Actions and OpenShift: ​​Supercharging your software development loops...
GitHub Actions and OpenShift: ​​Supercharging your software development loops...GitHub Actions and OpenShift: ​​Supercharging your software development loops...
GitHub Actions and OpenShift: ​​Supercharging your software development loops...Red Hat Developers
 
To the moon and beyond with Java 17 APIs! | DevNation Tech Talk
To the moon and beyond with Java 17 APIs! | DevNation Tech TalkTo the moon and beyond with Java 17 APIs! | DevNation Tech Talk
To the moon and beyond with Java 17 APIs! | DevNation Tech TalkRed Hat Developers
 
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...Red Hat Developers
 
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Red Hat Developers
 
Kubernetes configuration and security policies with KubeLinter | DevNation Te...
Kubernetes configuration and security policies with KubeLinter | DevNation Te...Kubernetes configuration and security policies with KubeLinter | DevNation Te...
Kubernetes configuration and security policies with KubeLinter | DevNation Te...Red Hat Developers
 
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
Level-up your gaming telemetry using Kafka Streams | DevNation Tech TalkLevel-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
Level-up your gaming telemetry using Kafka Streams | DevNation Tech TalkRed Hat Developers
 
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...Red Hat Developers
 
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkKnow your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkRed Hat Developers
 
Building streaming applications using a managed Kafka service | DevNation Tec...
Building streaming applications using a managed Kafka service | DevNation Tec...Building streaming applications using a managed Kafka service | DevNation Tec...
Building streaming applications using a managed Kafka service | DevNation Tec...Red Hat Developers
 
RESTEasy Reactive: Why should you care? | DevNation Tech Talk
RESTEasy Reactive: Why should you care? | DevNation Tech TalkRESTEasy Reactive: Why should you care? | DevNation Tech Talk
RESTEasy Reactive: Why should you care? | DevNation Tech TalkRed Hat Developers
 
Improving security with Istio | DevNation Tech Talk
Improving security with Istio | DevNation Tech TalkImproving security with Istio | DevNation Tech Talk
Improving security with Istio | DevNation Tech TalkRed Hat Developers
 
Building successful business Java apps: How to deliver more, code less, and c...
Building successful business Java apps: How to deliver more, code less, and c...Building successful business Java apps: How to deliver more, code less, and c...
Building successful business Java apps: How to deliver more, code less, and c...Red Hat Developers
 
Let's make a contract: The art of designing a Java API | DevNation Tech Talk
Let's make a contract: The art of designing a Java API | DevNation Tech TalkLet's make a contract: The art of designing a Java API | DevNation Tech Talk
Let's make a contract: The art of designing a Java API | DevNation Tech TalkRed Hat Developers
 
Building kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech TalkBuilding kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech TalkRed Hat Developers
 

More from Red Hat Developers (20)

Containers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech TalkContainers without docker | DevNation Tech Talk
Containers without docker | DevNation Tech Talk
 
Distributed deployment of microservices across multiple OpenShift clusters | ...
Distributed deployment of microservices across multiple OpenShift clusters | ...Distributed deployment of microservices across multiple OpenShift clusters | ...
Distributed deployment of microservices across multiple OpenShift clusters | ...
 
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
 
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
 
11 CLI tools every developer should know | DevNation Tech Talk
11 CLI tools every developer should know | DevNation Tech Talk11 CLI tools every developer should know | DevNation Tech Talk
11 CLI tools every developer should know | DevNation Tech Talk
 
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech TalkA Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
 
GitHub Actions and OpenShift: ​​Supercharging your software development loops...
GitHub Actions and OpenShift: ​​Supercharging your software development loops...GitHub Actions and OpenShift: ​​Supercharging your software development loops...
GitHub Actions and OpenShift: ​​Supercharging your software development loops...
 
To the moon and beyond with Java 17 APIs! | DevNation Tech Talk
To the moon and beyond with Java 17 APIs! | DevNation Tech TalkTo the moon and beyond with Java 17 APIs! | DevNation Tech Talk
To the moon and beyond with Java 17 APIs! | DevNation Tech Talk
 
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
 
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
 
Kubernetes configuration and security policies with KubeLinter | DevNation Te...
Kubernetes configuration and security policies with KubeLinter | DevNation Te...Kubernetes configuration and security policies with KubeLinter | DevNation Te...
Kubernetes configuration and security policies with KubeLinter | DevNation Te...
 
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
Level-up your gaming telemetry using Kafka Streams | DevNation Tech TalkLevel-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
 
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
Friends don't let friends do dual writes: Outbox pattern with OpenShift Strea...
 
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech TalkKnow your app: Add metrics to Java with Micrometer | DevNation Tech Talk
Know your app: Add metrics to Java with Micrometer | DevNation Tech Talk
 
Building streaming applications using a managed Kafka service | DevNation Tec...
Building streaming applications using a managed Kafka service | DevNation Tec...Building streaming applications using a managed Kafka service | DevNation Tec...
Building streaming applications using a managed Kafka service | DevNation Tec...
 
RESTEasy Reactive: Why should you care? | DevNation Tech Talk
RESTEasy Reactive: Why should you care? | DevNation Tech TalkRESTEasy Reactive: Why should you care? | DevNation Tech Talk
RESTEasy Reactive: Why should you care? | DevNation Tech Talk
 
Improving security with Istio | DevNation Tech Talk
Improving security with Istio | DevNation Tech TalkImproving security with Istio | DevNation Tech Talk
Improving security with Istio | DevNation Tech Talk
 
Building successful business Java apps: How to deliver more, code less, and c...
Building successful business Java apps: How to deliver more, code less, and c...Building successful business Java apps: How to deliver more, code less, and c...
Building successful business Java apps: How to deliver more, code less, and c...
 
Let's make a contract: The art of designing a Java API | DevNation Tech Talk
Let's make a contract: The art of designing a Java API | DevNation Tech TalkLet's make a contract: The art of designing a Java API | DevNation Tech Talk
Let's make a contract: The art of designing a Java API | DevNation Tech Talk
 
Building kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech TalkBuilding kubectl plugins with Quarkus | DevNation Tech Talk
Building kubectl plugins with Quarkus | DevNation Tech Talk
 

Recently uploaded

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

Event-driven serverless applications with Camel K | DevNation Tech Talk

  • 1. Event-driven serverless applications with Camel K Nicola Ferraro - Principal Software Engineer @ Red Hat Luca Burgazzoli - Principal Architect @ Red Hat 1
  • 2. Agenda 2 ● What is Apache Camel (and Camel K)? ● Camel K in the serverless space ● Demo ● Future developments
  • 3. About us 3 Luca Burgazzoli Principal Architect at Red Hat Twitter: @lburgazzoli We work on: - Apache Camel and Camel K - Red Hat Integration - Knative Contrib Nicola Ferraro Principal Software Engineer at Red Hat Twitter: @ni_ferraro
  • 5. … when you’re free to play! We all love microservices! We are the best team in the world! Software development is fun… My App Let’s do it serverless!
  • 6. But then you realize... … that you’re not alone in the world! My App
  • 7. You need to solve a lot of problems: ● Different communication models (e.g. sync / async) ● Different protocols or messaging systems ● Different languages or technologies ● Different business domains ● Different data access patterns ● … ● What if your app is unavailable? ● How do we manage consistency? Even with only two systems... My App Your App I WAS A SHEEP RANCHER BEFORE I WORKED HERE ● Different life philosophy ● Inability to change the other side ● ...
  • 8. If we had the perfect tool to deal with integration... ? That could connect to any almost any system With support for known integration patterns That can work on and off the cloud That can integrate with a simple language from(“kafka:topic”) .to(“grpc:endpoint”) This is Apache Camel
  • 9. Apache Camel can set you free! My App Your App from(“pulsar://company/nsx/topic1”) .unmarshal().json() .transform().simple(“${body[data]}”) .to(“knative:event/activity”) from(“knative:event/produced”) .pollEnrich() .simple(“aws2-s3://mybucket/files/${header.Ce-File}”) .to(“kafka:ext-topic”) Party Area (Free lunch zone ®)
  • 10. Apache Camel as of 2019/2020 ● One of the most active Apache projects ● Several components contributed by the community ○ We have 329 346 components today +40% New Users (users@camel.apache.org and StackOverflow) +5 New Committers and PMC members +4 New awesome sub-projects (Camel K, Camel Quarkus, Camel Kafka Connect, Camel Spring-Boot) Community is what makes Camel different It does not look 11 years “old” ;)
  • 12. Camel K ● https://github.com/apache/camel-k ● A platform for directly running integrations on Openshift and Kubernetes ● Reached version 1.0.0 on June 9, 2020 What is Apache Camel K? 12 A lightweight integration platform, born on Kubernetes, with serverless superpowers
  • 13. Camel K13 Camel K for Developers 13 Create integration file from(“knative:channel/xxxx”) .transform()... .to(“kafka:topic”) 1 EXECUTE CLI Tools $ kamel run integration.java 2 RUNNING Serverlesson OpenShift/Kubernetes 3
  • 14. Camel K14 Camel K Architecture Knative Kubernetes/OpenShift Camel K Operator DEVELOPER Serverless Function/Application Pod Serverless Function/Application Pod Serverless Function/Application Pod Tailored for cloud-native development experience. ● Live coding on cloud ● Built-in dependency management ● Rapid deployment, incremental updates ● Automate cloud resource generation ● Highly customizable Integration Custom Resource LIVEUPDATE!!
  • 15. Camel K15 Camel K Operator CAMEL K OPERATOR ● Choose a runtime ○ Java main ○ Quarkus ● Scaffold a project ● Add boilerplate ○ Container behaviour ○ Serverless behaviour ○ Monitoring setup … ● Add dependencies ● Create container image ○ Incremental updates ● Create OpenShift and Knative resources for deployment ○ Secrets ○ Service ○ Config Map ○ Deployment ○ Ingress
  • 16. Camel K16 Code Driven Serverless from(“netty-http://0.0.0.0:8080”) .process(new YourBusinessLogic()) .to(“knative:channel/words”) Knative Service CronJob Service Route Ingress ServiceMonitor Deployment ConfigMap Secret camel-core camel-jackson camel-timer camel-aws-s3 camel-sql camel-knative camel-netty-http Container Images JVM Master GC Runtime Readiness Liveness Channels Brokers
  • 17. Camel K17 Fast Deployment from(“netty-http://0.0.0.0:8080”) .process(new YourBusinessLogic()) .to(“knative:channel/words”) 91e54dfb1179 ADD camel-netty-http d74508fb5532 ADD camel-knative adoptopenjdk/openjdk11:slim ik-ab34df5462 from(“netty-http://0.0.0.0:8080”) .process(new YourBusinessLogic()) .pollEnrich(“http://service”) .to(“knative:channel/words”) d74508fb5532 ADD camel-http ik-ab34df5462 ik-cxfr345d Evaluate Run Deploy Build Operator Phases
  • 19. Camel K loves Knative A lightweight integration platform, born on Kubernetes, with serverless superpowers Not the official logo, but we like it! Camel K can also live without Knative, but it doesn’t want to ;)
  • 20. Knative Knative Serving Knative Eventing Auto-scaling and scale-to-zero Messaging for event-based applications
  • 21. Knative Service POD Scale Down to Zero Request Initiate and Start Scale Up with Load Knative Serving Request Request Request Request POD POD POD POD
  • 22. Knative Service POD rest().post(“/path”) .to(“xx:system1”) .to(“xx:system2”) 300+ components! System 1 System 2 Request Request Request Request POD POD POD POD Scale Up with Load Knative Serving with Camel K
  • 23. Knative Eventing Event Source kn source kn source create kn source list kn source list-types Broker New Event Trigger kn trigger Kn trigger create kn trigger delete kn trigger list kn broker Kn broker create kn broker delete kn broker list Provider kn service kn service create kn service delete kn service describe kn service list kn service update Event Providers Infrastructure New Customer created event Email service Log service Loyalty points service Trigger Trigger New Event New Event FEW Providers
  • 24. Knative Eventing with Camel K Event Source Broker New Event Camel K Provider Event Providers Infrastructure New Customer created event Email service Log service Loyalty points service New Event New Event 300+ components! Camel K 300+ components! kamel run kamel list kamel delete kamel run kamel list kamel delete kn trigger Kn trigger create kn trigger delete kn trigger list Trigger
  • 25. Knative Camel Sources << Custom Resource >> kind: Integration apiVersion: camel.apache.org/v1 1 POD POD POD POD POD For sources, users can choose to deploy Knative CamelSources or Apache Camel K Integrations << Custom Resource >> kind: CamelSource apiVersion: sources.knative.dev/v1alpha1 Wraps... kn source list ... 2 https://knative.dev/docs/eventing/samples/apache-camel-source/
  • 26. DEMO
  • 27. Demo Camel Sources and Sinks in an event mesh Code: https://github.com/nicolaferraro/camel-k-example-knative/tree/knative
  • 30. POD Quarkus Currently, integrations can run on Quarkus in JVM mode: POD POD from(“knative:event/produced”) .pollEnrich() .simple(“aws2-s3://mybucket/files/${header.Ce-File}”) .to(“kafka:ext-topic”) The future is native, with no changes in ux, and much better performance! Have you heard about GraalVM and Mandrel? https://github.com/apache/camel-quarkus
  • 31. Kamelets Meaning: Kamel route snippets Non-camel users find it difficult to write Camel DSL, they just want to leverage it. … … … … 1. Pick one 2. Configure parameters 3. Choose destination query=quarkus token=... Kamelets have many more use cases outside Knative: ● Camel Kafka Connect ● Visual Tools for Camel K development Kamelet Catalog (Kubernetes Objects)
  • 32. Camel K Testing software using BDD style. Now part of citrusframework.org. Same structure of Camel K (CLI + operator) To run the test: yaks test gateway.feature https://github.com/citrusframework/yaks Feature: API Gateway Works Background: Given URL: https://myservice/api/films Scenario: Get a result from API When send GET / Then receive HTTP 200 OK YAKS
  • 33. Other important future developments ● Webhooks: reduce the amount of components that need an “always on” pod ● Keda: autoscaling not only limited to http workloads
  • 34. Camel K Want to learn more about Camel? What’s new with Apache Camel 3? | DevNation Tech Talk https://developers.redhat.com/devnation/tech-talks/apache-camel-3/ By Andrea Cosentino and Claus Ibsen Kubernetes enterprise integration patterns with Camel-K | DevNation Tech Talk https://developers.redhat.com/videos/youtube/51x9BewGCYA/ By Luca Burgazzoli and Nicola Ferraro
  • 35. Thank you! If you like Camel K: 1) Use it! 2) Contribute! (We love any contribution!) https://github.com/apache/camel-k Follow us on Twitter: @ni_ferraro @lburgazzoli