This document discusses best practices for middleware and integration architecture modernization using Apache Camel. It provides an overview of Apache Camel, including what it is, how it works through routes, and the different Camel projects. It then covers trends in integration architecture like microservices, cloud native, and serverless. Key aspects of Camel K and Camel Quarkus are summarized. The document concludes with a brief discussion of the Camel Kafka Connector and pointers to additional resources.
Best Practices for Middleware and Integration Architecture Modernization with Apache Camel
1. Best Practices for
Middleware and Integration
Architecture Modernization
Claus Ibsen
Red Hat
March 2020
With Apache Camel
2. About
Claus Ibsen
● Senior Principal Software Engineer at Red Hat
● ASF Member & Java Champion
● Apache Camel Tech Lead
● Author of Camel in Action books
● Based in Denmark
● Blog: https://medium.com/@davsclaus
● Linkedin: https://www.linkedin.com/in/davsclaus
● Twitter: @davsclaus
3. Agenda
● What’s Camel
● Camel 3
● Integration Evolution
● Serverless
● Camel K
● Camel Quarkus
● Camel Kafka Connector
● More Material
9. What is Apache Camel
● Java based integration framework
● Runtime support: Spring Boot, Quarks, Java EE, Microprofile, OSGi, Standalone, etc.
● Based on Enterprise Integration Patterns
● Comes with 300+ components (connectors)
● DSL (Java or XML) to describe integration flow (routes)
● Can integrate everything ... almost everything
13. Apache Camel 3 - Projects
Camel
Swiss knife of integration
Camel Spring Boot
Camel on
Spring Boot
14. Apache Camel 3 - Projects
Camel
Swiss knife of integration
Camel Spring Boot
Camel on
Spring Boot
Camel Karaf
Camel on
Apache Karaf / OSGi
15. Apache Camel 3 - Projects
Camel K
Camel on
Kubernetes & Knative
Camel
Swiss knife of integration
Camel Spring Boot
Camel on
Spring Boot
Camel Karaf
Camel on
Apache Karaf / OSGi
16. Apache Camel 3 - Projects
Camel Quarkus
Optimized JVM & Native
compiled Java (GraalVM)
Camel K
Camel on
Kubernetes & Knative
Camel
Swiss knife of integration
Camel Spring Boot
Camel on
Spring Boot
Camel Karaf
Camel on
Apache Karaf / OSGi
17. Apache Camel 3 - Projects
Camel Quarkus
Optimized JVM & Native
compiled Java (GraalVM)
Camel K
Camel on
Kubernetes & Knative
Camel
Swiss knife of integration
Camel Spring Boot
Camel on
Spring Boot
Camel Karaf
Camel on
Apache Karaf / OSGi
Camel Kafka Connector
Kafka Connector with Camel
31. Serverless Requirements
For the platform
● Scaling to zero
● Rapid scaling up and down
● Eventing mechanism
● Routing and networking
For the application runtime
● Fast startup
● Fast first response
● Low on memory and CPU
● Small size on disk
32. Serverless Requirements
For the platform
● Scaling to zero
● Rapid scaling up and down
● Eventing mechanism
● Routing and networking
For the application runtime
● Fast startup
● Fast first response
● Low on memory and CPU
● Small size on disk
K
34. A lightweight integration platform, based on Apache Camel,
born on Kubernetes, with serverless superpowers.
What is Apache Camel K ?
35. A lightweight integration platform, based on Apache Camel,
born on Kubernetes, with serverless superpowers.
What is Apache Camel K ?
Runs on “vanilla” Kubernetes (1) ...
K
1.
36. A lightweight integration platform, based on Apache Camel,
born on Kubernetes, with serverless superpowers.
What is Apache Camel K ?
Runs on “vanilla” Kubernetes (1), Openshift (2) ...
K
1.
K
2.
37. A lightweight integration platform, based on Apache Camel,
born on Kubernetes, with serverless superpowers.
What is Apache Camel K ?
Runs on “vanilla” Kubernetes (1), Openshift (2) and gives its best on a Knative-powered cluster (3)!
K
1.
K
2.
K
3.
42. Architecture of Camel K
Dev Environment Remote Cloud
kamel CLI
Camel K
Operator
“Integration”
Custom
Resource
Running Pod
Live updates!
Fast redeploy!
Less than 1 second!
Tailored for cloud-native development experience
43. Fast Deployment of Camel K
Time to run a integration using different strategies (in seconds)
Lower is better
😃
F-m-p is the “fabric8-maven-plugin”
(http://maven.fabric8.io/) deploying a
average spring-boot based
integration on Minishift vs. a remote
OpenShift cluster (accounting time to
upload the fat Jar). Source S2I build
has been measured in Red Hat Fuse
Online.
49. Java Density Problem
CONTAINER ORCHESTRATION
Node Node Node
Traditional Cloud-Native
Java Stack
Traditional Cloud-Native
Java Stack
Traditional Cloud-Native
Java Stack
Traditional Cloud-Native
Java Stack
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
NodeJS
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
Go Go Go
https://developers.redhat.com/blog/2017/03/14/java-inside-docker/
53. What is Quarkus ?
Supersonic Subatomic Java
A Kubernetes Native Java stack tailored for GraalVM &
OpenJDK HotSpot, crafted from the best of breed Java libraries
and standards
60. What is Apache Kafka?
● Kafka is known as
○ a distributed streaming platform
○ or a pub/sub messaging broker
● It’s an ecosystem
○ Multiple components part of Apache Kafka
○ A lot of 3rd party integrations
○ One of them is Kafka Connect
Streams
API
Producer
API
Consumer
API
3rd party
tools
Mirror
Maker
Connect
61. What is Kafka Connect?
● It is a framework that helps you to integrate Kafka with other systems
○ A user can define source and sink connectors to stream data in/out of Kafka brokers
○ Connectors are plugable - you can use one of the many connectors available or write your own
● Distributed and scalable by default
● Automatic offset management
● Simple transformations
● Streaming / batch integration
Kafka Connect:
Source
Connector
Kafka Connect:
Sink
Connector
External
System
External
System
62. What is Camel Kafka Connector?
● A Kafka Connector built on top of Apache Camel
● Started as an internal proof-of-concept
○ A sub-project of the Apache Camel
○ Donated by Red Hat to the ASF on December 2019
● Reuses in a simple way most of the Camel components as Kafka sink and sources
64. Demo S3 to JMS
● https://github.com/oscerd/camel-kafka-connector-demo
● S3 Source connector (camel-aws-s3)
● JMS Sink connector (camel-sjms2)
● A file loaded on a bucket -> file content in a JMS Queue
To run Kafka on
Kubernetes
68. More Camel Material
● Apache Camel K
https://github.com/apache/camel-k
● Apache Camel Quarkus
https://github.com/apache/camel-quarkus
● Apache Camel Kafka Connector
https://github.com/apache/camel-kafka-connector
● Quick Camel K demo
https://www.youtube.com/watch?v=I-g2xt-Qcb8
● Camel K Introduction Blog
https://www.nicolaferraro.me/2018/10/15/introducing-camel-k
● Kubernetes enterprise integration patterns with Camel K webinar
https://www.youtube.com/watch?v=51x9BewGCYA
● Camel K and Knative video
https://www.youtube.com/watch?v=lOqubmVSGdw
69. More Material
● Webinar - Apache Camel 3 is here what’s new
https://www.redhat.com/en/events/webinar/apache-camel-3-here-whats-new
● QCon 2020 Talk by Bilgin - Evolution of Distributed Systems on Kubernetes
https://www.infoq.com/presentations/kubernetes-primitives-design-patterns
https://k8spatterns.io/ https://www.manning.com/books/camel-in-action-second-edition
70. ● Red Hat Integration
https://www.redhat.com/en/products/integration
● Red Hat Middleware
https://developers.redhat.com/middleware
● Red Hat Event Driven Architecture
https://developers.redhat.com/topics/event-driven
More Material
71. Any Questions ?
Follow us on Twitter
@davsclaus
@ApacheCamel
https://github.com/apache/camel
A star on github is appreciated