Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Camel Riders in the Cloud

1,389 views

Published on

Apache Camel has fundamentally changed the way enterprise Java™ developers think about system-to-system integration by making enterprise integration patterns (EIP) a simple declaration in a lightweight application wrapped and delivered as a single JAR.

Published in: Software
  • Be the first to comment

Camel Riders in the Cloud

  1. 1. Camel riders in the cloud Red Hat DevNation Live March 2018
  2. 2. About me ● Senior Principal Software Engineer at Red Hat ● 9 years as full time Apache Camel committer ● Author of Camel in Action books ● Based in Denmark, Europe Blog: http://www.davsclaus.com Twitter: @davsclaus Linkedin: davsclaus E-Mail: cibsen@redhat.com
  3. 3. System Integration
  4. 4. Integration Framework
  5. 5. PATTERN BASED INTEGRATION 200+ COMPONENTS Batch, messaging, web services, cloud, APIs, and more ... BUILT-IN DATA TRANSFORMATION JSON, XML, HL7, YAML, SOAP, Java, CSV, and more ... INTUITIVE ROUTING Develop integrations quickly in Java or XML. ENTERPRISE INTEGRATION PATTERNS Build integrations using enterprise best practices. Create, connect, and compose APIs with ease. NATIVE REST SUPPORT Apache Camel, a powerful pattern-based integration engine with a comprehensive set of connectors and data formats to tackle any integration problem.
  6. 6. Enterprise Integration Patterns
  7. 7. Enterprise Integration Patterns
  8. 8. Camel Routes from("file:data/inbox") .to("jms:queue:order"); <route> <from uri="file:data/inbox"/> <to uri="jms:queue:order"/> </route> Java DSL XML DSL
  9. 9. Camel Architecture
  10. 10. Camel runs everywhere Application Servers Linux Containers
  11. 11. Camel connects everything Legacy Systems ● File ● FTP ● JMS ● JDBC ● SQL ● TCP/UDP ● Mail ● HDFS ● JPA ● MongoDB ● ... Public Cloud ● AWS ○ S3 ○ SQS ○ Kinesis ○ ... ● Google ○ Bigquery ○ Pubsub ● Azure ○ Blob ○ Queue ● Box / Dropbox ● Facebook ● Linkedin ● Salesforce ● SAP ● ServiceNowIoT ● CoAP ● MQTT ● PubNub SaaS
  12. 12. +
  13. 13. + +
  14. 14. + + +
  15. 15. + + + =
  16. 16. What about Camel in the Cloud?
  17. 17. Monolith MyApp @burrsutter
  18. 18. Microservices @burrsutter
  19. 19. Microservices @burrsutter
  20. 20. Microservices @burrsutter
  21. 21. Microservices @burrsutter
  22. 22. Microservices @burrsutter
  23. 23. Microservices @burrsutter
  24. 24. Network of Services @burrsutter
  25. 25. Container JVM Service C Microservices == Distributed Computing @burrsutter Container JVM Service B Container JVM Service A
  26. 26. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities @burrsutter
  27. 27. @burrsutter
  28. 28. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities + Kubernetes @burrsutter
  29. 29. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities + OpenShift @burrsutter
  30. 30. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities + Istio @burrsutter
  31. 31. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Microservices'ilities + 3scale @burrsutter
  32. 32. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity But where is Camel? @burrsutter
  33. 33. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity But where is Camel? @burrsutter embedded in your (Java) services
  34. 34. Container JVM Service C Microservices == Distributed Integration @burrsutter Container JVM Service B Container JVM Service A
  35. 35. Container JVM Service C Microservices == Distributed Integration @burrsutter Container JVM Service B Container JVM Service A Legacy
  36. 36. 37 THE THREE PILLARS OF AGILE INTEGRATION Key foundational capabilities needed by today’s enterprises DISTRIBUTED INTEGRATION -LIGHTWEIGHT -PATTERN BASED -EVENT ORIENTED -COMMUNITY SOURCED CONTAINERS - CLOUD NATIVE SOLUTIONS -LEARN ARTIFACTS, INDIVIDUALLY DEPLOYABLE - CONTAINER BASED SCALING AND HIGH AVAILABILITY APIs -WELL DEFINED, REUSABLE, AND WELL MANAGED END-POINTS -ECOSYSTEM LEVERAGE FLEXIBILITY SCALABILITY RE-USABILITY
  37. 37. Camel in the cloud
  38. 38. Best Practice - Small in Size ● Camel is light-weight ○ (camel-core 4mb) ● Add only Camel component you need ● Single fat-jar via ○ Spring Boot ○ WildFly-Swarm ○ Vert.X ○ etc.
  39. 39. Best Practice - Stateless ● Favour stateless applications ● If state is needed: ○ Data-grid ■ camel-infinispan ■ camel-hazelcast ■ camel-ignite ■ ... ○ Database ■ camel-sql ■ camel-jpa ■ ... ○ Kubernetes Stateful-set
  40. 40. Best Practice - Configuration Management ● Kubernetes ConfigMap ○ Inject via ENV ○ Inject via files ● Kubernetes Secrets ○ Inject via ENV ○ Inject via files ○ Inject via files on classpath $ oc get cm -o yaml my-configmap apiVersion: v1 data: fallback: I still got no response kind: ConfigMap
  41. 41. Best Practice - Fault Tolerant ● Camel Retry ○ onException ○ errorHandler ● Camel Hystrix ○ circuit breaker
  42. 42. Best Practice - Fault Tolerant ● Camel Retry ○ onException ○ errorHandler Thundering Herd Problem
  43. 43. Best Practice - Health Checks ● Health Checks ○ camel-spring-boot actuator ○ wildfly-swarm monitor ● Readiness Probe ○ Kubernetes ● Liveness Probe ○ Kubernetes
  44. 44. ● Works anywhere Best Practice - EIP Patterns
  45. 45. EIP Cloud Patterns Service Call from("timer") .serviceCall("hello-service"); Plugins ● Kubernetes ● Ribbon ● Consul ● Etcd ● Zookeeper
  46. 46. EIP Cloud Patterns Hystrix EIP from("timer:foo") .hystrix() .to("http:myservice") .onFallback() .to("bean:fallback") .end()
  47. 47. EIP Cloud Patterns Distributed Tracing
  48. 48. MyService Monitoring Tracing API Discovery Invocation Resilience Pipeline Authentication Logging Elasticity Usable Camel capabilities @burrsutter Camel Retry Camel Hystrix Camel Zipkin Camel OpenTracing Camel Rest / Rest DSL Camel Connectors
  49. 49. Demo Time
  50. 50. Basic Demo
  51. 51. More Information ● Slides and Demo source code: https://github.com/davsclaus/camel-riders-in-the-cloud ● Apache Camel website: http://camel.apache.org ● Best "What is Apache Camel" article: https://dzone.com/articles/open-source-integration-apache ● My blog: http://www.davsclaus.com ● DevNation Live https://developers.redhat.com/devnationlive
  52. 52. Camel in Action 2nd edition ● Discount code (40%): ctwdevnatlive18 (ordering from Manning) https://www.manning.com/books/camel-in-action-second-edition
  53. 53. Q & A

×