Advertisement

Simplify integrations-final-pdf

Global Field CTO at Solo.io
May. 27, 2014
Advertisement

More Related Content

Similar to Simplify integrations-final-pdf(20)

Advertisement

More from Christian Posta(20)

Advertisement

Simplify integrations-final-pdf

  1. 2 2 Simplify Enterprise Integration With Apache Camel and Fuse Christian Posta Principal Middleware Specialist/Architect
  2. 3 •  What is Integration? •  Camel… what? •  Honestly… Camel Rox! •  Demo time! •  Questions? Yah… over beer J Agenda
  3. 4 Your speaker Christian Posta Blog: http://christianposta.com/blog Twitter: @christianposta Email: christian@redhat.com •  Principal Middleware Specialist/Architect •  Based in Phoenix, AZ •  Committer on Apache Camel, ActiveMQ, Apollo •  Author: Essential Camel Components DZone Refcard
  4. 5 5 What is Integration?
  5. 6
  6. 7 •  Off the shelf? Home Grown? Acquisition? •  Platforms •  Protocols / Data Formats •  Data Formats •  Timing •  Organizational mismatch Integration L
  7. 8 •  Common language!!!!! •  Specific context •  Forces at work •  Concrete solution •  Guidance •  65 patterns Patterns FTW!
  8. 9 •  Protocol mediation •  Routing, Transformation, EIPs •  Start small, build up, ESB if needed •  Open Source •  Community driven Lightweight integration, right?
  9. Consume XML doc from file system, put onto messaging queue, separately consume from queue, do some routing, archive to file system. Logging, tracing, debugging. Also implement flexibility, HA messaging, scalability. •  Clearly cannot be done •  A few months •  A few weeks •  A few Days •  < 1 day10
  10. 11 11 Camel… right?
  11. 12 Apache Camel Apache Camel is an open-source, light-weight, integration library. Use Camel to integrate disparate systems that speak different protocols and data formats
  12. 13 •  Light-weight integration library •  Domain Specific Language •  Enterprise Integration Patterns •  Components •  Routing and Mediation (like an ESB?) •  Runs in any container (or stand alone) What is Apache Camel?
  13. 14 Quick Example File System Message Oriented Middleware
  14. 15 Quick Example From A Send to B Filter message
  15. 16 Quick Example from(A) to(B)filter(predicate)
  16. 17 Quick Example from(A) .to(B).filter(isWidget)
  17. 18 Quick Example isWidget = xpath(“/quote/product = ‘widget’”); from(A) .filter(isWidget). to(B)
  18. 19 19 Honestly! Camel Rox!
  19. 20 •  Defined in Java, XML, Scala, Groovy DSL •  Step by step processing of a message: •  Consumer – Listen for incoming message •  Zero or more “filters” or Processors •  Producer – Send outgoing message •  Pipeline of “filters” or “processors” •  EIPs •  Tranformation •  Expressions •  Exceptions Camel Routes
  20. 21 •  Domain Specific Language •  Domain specific (integration) •  Build and describe integration flows •  Embedded within a general programming language •  Java, Spring XML, Scala, Groovy •  Take advantage of existing tools •  Fluent builders (builder pattern…) •  from(“..”).enrich(“…”).filter(“..”).to(“…”);
  21. 22 public class OrderProcessorRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“activemq:orders”) .choice() .when(header(“customer-rating”).isEqualTo(“gold”)) .to(“ibmmq:topic:specialCustomer”) .otherwise() .to(“ftp://user@host/orders/regularCustomers”) .end() .log(“received new order ${body.orderId}”) .to(“ibatis:storeOrder?statementType=Insert”); } }
  22. 23 <route id=“processOrders”> <from uri=“activemq:orders”/> <choice> <when> <simple>${header.customer-rating} == ‘gold’</simple> <to uri=“ibmmq:topic:specialCustomer”> </when> <otherwise> <to uri=“ftp://user@host/orders/regularCustomers” /> </otherwise> </choice> <log message=“received new order ${body.orderId}”/> <to uri=“ibatis:storeOrder?statementType=Insert”/> </route>
  23. 24 •  Message Routing •  Transformation •  Aggregation •  Splitting •  Resequencer •  Routing Slip •  Enricher Enterprise Integration Patterns
  24. 25 Components •  ActiveMQ, Websphere, Weblogic (JMS) •  AMQP •  ATOM feeds •  AWS (S3, SQS, SNS, others) •  Bean •  Cache (EHCache) •  CXF (JAX-WS, JAX-RS) •  EJB •  Drools •  File •  FTP •  Google App Engine •  GMail •  HTTP •  IRC •  jclouds •  JDBC •  Jetty •  Twitter •  MQTT •  MyBatis •  JPA •  Spring Integration •  Spring Web Services http://camel.apache.org/components.html To see list of all components!!
  25. 26 •  URI format: •  scheme:localPart[?options] •  scheme: identifies the “component” •  localPart: specific to the component •  options: is a list of name-value pairs •  Creates endpoints based on configuration •  Route endpoint “factories” •  Integrate with Camel Routes by creating producer/ consumer endpoints Components from(“aws-sqs://demo?defaultVisibilityTimeout=2”)
  26. 27 Another Example public class MyExampleRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception { from(“aws-sqs://demo?defaultVisibilityTimeout=2”) .setHeader(“type”).jsonpath(“$[‘type’]”) .filter(simple(“${header.type} == ‘login’”) .to(“jms:quote”); } }
  27. 28 •  Management with HawtIO http://hawt.io
  28. 29 •  Developer Tooling Support
  29. 30 JBoss Fuse Integrate Everything!
  30. Fabric8 (JBoss Fuse + Fabric) •  http://fabric8.io •  Simplifies deployments, management •  Blurs the line of PaaS •  Provides cluster capabilities, coordination •  Containers and Profiles •  Provides additional management tools for centralized configuration and monitoring 31
  31. 32 Fabric8
  32. 33 33 Resources
  33. 34 Professional Training Camel Development with Red Hat JBoss Fuse http://www.redhat.com/training/courses/jb421r/ Red Hat JBoss A-MQ Development and Deployment https://www.redhat.com/training/courses/jb437r/ Red Hat Certificate of Expertise in Camel Development http://www.redhat.com/training/certifications/jbcd-camel-development/
  34. 35 •  Books
  35. 36 •  Dzone Refcardz •  Camel Essential Components •  http://refcardz.dzone.com/refcardz/essential-camel-components •  Essential EIP with Apache Camel •  http://refcardz.dzone.com/refcardz/enterprise-integration REFCARDZ
  36. 37 37 Questions
  37. Consume XML doc from file system, put onto messaging queue, 38
  38. Separately consume from queue, do some routing, archive to file system. 39
  39. Logging, tracing, debugging. Also implement flexibility, HA messaging, scalability. 40
Advertisement