Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless Integration with Camel Quarkus

Serverless Integration with Camel Quarkus

When you build an application you will undoubtedly need to integrate it with other applications and systems. The Apache Camel project’s goal is to simplify the way we do integration, using the book “Enterprise Integration Patterns” as the gold standard.

Apache Camel has been around for a while, but it is more relevant now than it has ever been. In this session we’ll show you how Camel can leverage Quarkus’ fast startup time and developer experience.

As a bonus it can make use of technologies like serverless computing (eg. Knative) and data streaming (eg. Kafka), to remove bottlenecks, integrate faster and better than ever before, and save resources and money on top of it.

Attendees should come away from this event with the following:

Understanding of what Serverless Enterprise Integration means and how to deliver better software faster
How serverless technologies like Knative can optimize resource usage and scale rapidly to respond to fluctuating demand
How the next iteration of Apache Camel (based on Quarkus) can leverage serverless computing and event driven architectures to do integration when and where it’s needed

Kevin Dubois

October 12, 2022
Tweet

More Decks by Kevin Dubois

Other Decks in Programming

Transcript

  1. @kevindubois #Camel #Quarkus #Devoxx Kevin Dubois • Principal Developer Advocate

    at Red Hat • Previously: (Lead) Software Engineer / Architect, mostly in USA • Speak English, Dutch, French, Italian fluently… and a tiny bit of German and Spanish • Passionate about improving Dev Experience with Open Source • And … An Antwerp Native! Linkedin: kevindubois Github: kdubois @kevindubois
  2. @kevindubois #Camel #Quarkus #Devoxx 5 What problem needs to be

    resolved? Sometimes it’s a ‘MICRO-problem’, for instance ... • Sometimes the focus is on data/protocol transformation. • This is an integration problem. “I need this information in this specific format and protocol !”
  3. @kevindubois #Camel #Quarkus #Devoxx 6 … and, some other times

    you have a ‘MACRO-problem’, for instance: • Here the focus is on interconnecting sources and destinations efficiently. ➔ This also... is an integration problem. “I want an easy and standard way to interconnect my app”
  4. @kevindubois #Camel #Quarkus #Devoxx 7 “Good” Integration Bespoke/Custom made Integration

    Integration with reusable & standard components • As a quick win, often a problem is initially resolved in a custom manner. • In the long run this results to be counterproductive.
  5. @kevindubois #Camel #Quarkus #Devoxx Apache Camel 11 Swiss knife of

    integration Solve integration problem by applying best practices out of the box. Even with microservice architectures. Patterns 300+ Components Lightweight Runtimes Data Formats Packed with 300+ components such as databases, message queues, APIs. Quarkus, Standalone, Spring Boot,Application Servers, and natively on Cloud. Translate messages in multiple formats, and industry standard formats from finance, telco, health-care, and more
  6. @kevindubois #Camel #Quarkus #Devoxx Apache Camel 14 Swiss knife of

    integration Simple, self-explained Domain Specific Language. Available in Java, YAML, XML DSLs Reactive Routing Engine Backlog Tracer/Tracer Comprehensive Tooling Back pressure model. Smooth flow control. Better thread management. Capturing a trace inside and between Camel route. For better observability Support autocomplete, correction on multiple IDE with LSP Server. Graphical data mapper. from(“kafka:topic”) .to(“grpc:endpoint”)
  7. @kevindubois #Camel #Quarkus #Devoxx Apache Camel Community 15 Source: https://www.apache.org/foundation/docs/FY2021AnnualReport.pdf

    ➢ The biggest and most active community for open source integration software ➢ 600+ unique contributors ➢ 3800+ pull requests (mostly from external contributors) ➢ 15+ years of development and one of the most active Apache projects
  8. @kevindubois #Camel #Quarkus #Devoxx Serverless “Serverless computing refers to the

    concept of building and running applications that do not require server management. It describes a finer-grained deployment model where applications, bundled as one or more functions are uploaded to a platform and then executed, scaled, and billed in response to the exact demand needed at the moment” -- CNCF Definition, https://www.cncf.io/blog/2018/02/14/cncf-takes-first-step-towards-serverless-computing/
  9. @kevindubois #Camel #Quarkus #Devoxx Immutable revisions Deploy new features: performing

    canary, A/B or blue-green testing with gradual traffic rollout with no sweat and following best practices. No need to configure number of replicas, or idling. Scale to zero when not in use, auto scale to thousands during peak, with built-in reliability and fault-tolerance. Automatic scaling Ready for the Hybrid Cloud Truly portable serverless running anywhere Kubernetes runs, that is on-premises or on any public cloud. Leverage data locality and SaaS when needed. Event Driven Architectures Build loosely coupled & distributed apps connecting with a variety of built-in or third-party event sources or connectors powered by Operators. Any programming language Use any programming language or runtime of choice. From Java, Python, Go and JavaScript to Quarkus, SpringBoot or Node.js. Simplified developer experience to deploy applications/code on serverless containers abstracting infrastructure & focusing on what matters. Containers made easy prem aws azur e Knative is an Open Source, Cloud Agnostic Solution to build Serverless and Event Driven Applications Knative
  10. @kevindubois #Camel #Quarkus #Devoxx Serverless Operational Benefits Over provisioning Time

    in capacity planning IT cost of idle resources Under provisioning Lost business revenue Poor quality of service More applications Direct line between IT costs & business revenue NOT Serverless with Serverless
  11. @kevindubois #Camel #Quarkus #Devoxx “Traditional” Java wasn’t designed for Containers

    & Serverless At the expense of startup speed Rich dynamic behavior built for mutable systems Designed to be long-running Yet containers are primarily immutable Designed for Throughput At the expense of footprint ➔ Java likes to uses as many resources as it can get
  12. @kevindubois #Camel #Quarkus #Devoxx Quarkus is a Java Stack that

    : ★ Is based on Java standards ★ Moves as much as possible to build phase ★ Minimizes runtime dependencies ★ Maximizes dead code elimination ★ Enables Native Build with GraalVM / Mandrel ◦ (without having to know how to work with GraalVM!) ★ Brings Developer joy !
  13. @kevindubois #Camel #Quarkus #Devoxx 27 Supersonic Subatomic Java Quarkus +

    Native (via GraalVM) 12 MB Quarkus + JVM (via OpenJDK) 73 MB Traditional Cloud-Native Stack 136 MB Quarkus + Native (via GraalVM) 0.016 Seconds Quarkus + JVM (via OpenJDK) 0.943 Seconds Traditional Cloud-Native Stack 4.3 Seconds
  14. @kevindubois #Camel #Quarkus #Devoxx A cohesive platform for optimized developer

    joy: • Quick code-build-verify turnaround ◦ Live reload in the blink of an eye ◦ Continuous Testing • No hassle native executable generation • Many developer-friendly features: Dev services; Hibernate Panache; simplified logging; IDE plugins; Kubernetes & Openshift Extensions, etc Quarkus brings Developer Joy
  15. @kevindubois #Camel #Quarkus #Devoxx fromF("twitter-search:// %s?", searchTerm) .process(new TweetInfoProcessor ())

    .choice() .when(simple("${body} ~~ openshiftdevspaces" )) .setBody(simple("{\"shortname\":\"openshiftdevspaces \"} ")) .to("direct:sendToKafka" ) .otherwise().log("no match"); from("direct:sendToKafka" ) .to("kafka:{{kafka.topic.name}}" );
  16. @kevindubois #Camel #Quarkus #Devoxx > kamel run roll-die.yaml • 1

    source code file web service roll-die.yam l • 1 CLI command Create integration file Running on OpenShift 1 Execute CLI Tools 2 3 Camel K For Developers - from: uri: "platform-http:/roll-die" steps: - setBody: simple: "roll: ${random(1,6)}” 44
  17. @kevindubois #Camel #Quarkus #Devoxx Wrap up ★ Apache Camel =

    an integration toolkit with 350+ connectors ★ Camel Quarkus = developer joy + fast startup + easy integration ★ Scale from 0 and easy deployments with Knative ★ Also cool: Low/No Code with Camel K and Kamelets