Be jug 090611_apacheservicemix


Published on

BeJug presentation of Apache ServiceMix with Camel, ActiveMQ, CXF and target architectures on ESB platform

Published in: Technology
  • Be the first to comment

Be jug 090611_apacheservicemix

  1. 1. Integra6on  with     Apache  ServiceMix  and  Camel   BeJUG,   Louvain-­‐La-­‐Neuve,  9th  June  2011   Charles  Moulliard   Sr.  Principal  Solu6on  Architect   Apache  CommiOer   A  Progress  So3ware  Company  1   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  2. 2. Speaker  background     Charles  Moulliard   •  Engineer  in  Agronomy  &  Master  in  Zoology   •  17  years  of  experience  in  IT  world  development  (J2EE,  .NET)   •  Specialised  in  new  technologies  web/Internet  &  integra6on   •  Project  manager  in  bank,  financial,  telco,  insurance  and  transport   world   •  Solu6on  Architect  at  FuseSource       •  CommiOer  on  projects  :   – Apache  ServiceMix,     – Apache  Karaf  (PMC)  &     – Apache  Camel   •  Author  of  book  :  "ServiceMix  and  Karaf  in  Ac6on  –  Mannings"  2   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  3. 3. Goal   «  Introduce  some  projects  of  the  Apache  founda6on  Integra6on   oriented  like  Camel,  ServiceMix     and     Present  target  Architectures  »    3   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  4. 4. Agenda     Integra6on  with  Camel  and  ServiceMix   •  Demys6fy  ESB   •  ServiceMix  -­‐  mul6-­‐containers  plaform   •  Presenta6on  of  projects  -­‐  Camel,  CXF,  Karaf  et  Ac6veMq   •  Descrip6on  of  architectures   –  Messaging   –  Osgi   –  Messaging  +  osgi   –  web   •  High  availability,  scalibility  and  clustering   –  Ac6veMQ,  ServiceMix   –  Ac6veMQ  and  ServiceMix   •  Cloud  and  provisioning  4   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  5. 5. «  Demis6fy  the  ESB  and  present  Apache  ServiceMix  plaform  »  5   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  6. 6. ESB  -­‐  ServiceMix      Demys6fy  the  concept  -­‐   Enterprise  Service  Bus      This  is  not   →    Nor  a   →      But  an  exchanging  plaform        of  messages,  objects        moving  within  a  transport   layer  6   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  7. 7. ESB  -­‐  ServiceMix  (1)    llow  to  separate  the   A business  layer  from  those   which  will  transport  the   informa6on  and  transform  it    rovide  connectors   P (=endpoints)  to  collect   informa6on  and  send  it  on   the  bus  as  messages    essages  are  transformed   M using  marshallers  7   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  8. 8. ServiceMix  -­‐  Container  ship     erviceMix  –  Project  of  the  Apache  Founda6on   S   tarted  in  2005  to  implement  the  Java  Business  Integra6on   S specifica6on     ecoupling  of  the  components  (business,  technical)  by  using   D XML  messages     efine  a  model  to  package/deploy  applica6ons  (SU/SA)     D   ayer  transport  is  called    Normalised  Messaging  Router       L8   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  9. 9. ServiceMix  -­‐  Container  ship  (2)   Message is ACK or ERRRouting isdefined into Normalizedthe SU = XML exchanges9   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  10. 10. ServiceMix  -­‐  Container  ship  (3)    JBI  approach  is  interes6ng  but  restric6ve     • XML  format   • Encapsula6on  of  the  rou6ng   • Components  dvlpt  (25  vs  more  than  100  for  camel)   • Few  support  from  IT  actors  (IBM,  Oracle,  …)  to  improve  exis6ng  spec  1.0     2.0   • We  can  make  the  parellism  with  EJB  story  ….     ecision  has  been  taken  3  years  ago  by  members  of  project  to   D • Become  independent  of  JBI  spec  (we  support  it  but  op6onal)   • Adopt  Camel  as  the  new  rou6ng  bus   • Propose  a  new  kernel  (=  meaning  a  new  Architecture  design)   • Extend  the  idea  of  the  project,  plaform  to  become  a  mul6-­‐container  or   container  ship  10   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  11. 11. SMX  -­‐  Container  ship  (4)     erviceMix  4   S   ased  on  an  OSGI  kernel   B • Apache  Felix   • Eclipse  Equinox     hy  →  offers  modularity,  jars   W management  and  versioning     erviceMix  becomes  an   S Integra6on  Plaform  for   opensource  projects   • Camel   • CXF   • Ac6veMQ,   • Aries  (JPA,  Transac6on,  JNDI)   •   ….      11   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  12. 12. Karaf  –  Heart  of  ServiceMix     irthdate  -­‐  16th  of  June  2010   B   un6me  using  an  OSGI  server  :   R • Apache  Felix   • Eclipse  Equinox     rovide  a  lightweight  container  where   P  Applica6ons    Composants    Routes      ...      can  be  deployed  12   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  13. 13. Karaf  –  Heart  of  ServiceMix  (1)     <<jvm>> :ServiceMix4 Container Container Container Container Container Container Lightweight container (Apache Karaf) OSGI Kernel (Apache Felix / Eclipse Equinox) Java Boot (Register as service - Wrapper)13   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  14. 14. Karaf  –  heart  of  ServiceMix  (2)       aracteris6cs  :   C  Administra6on  console  (locale,  remote,  ssh,  web,  jmx)      Provisioning  system  (features)      Hot  deployment  and  configura6on  management      Instances  management      Security  integra6on  (JAAS  →  ldap,  jdbc,  file)      Logging  management  (log4j,  logger,  commons  logging,  ….)     …  let’s  have  a  look  with  a  demo  …        14   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  15. 15. Which  container  (s)    The  plaform  is  «  modular  »  because  we  can  select  the     librairies,  containers  that  we  would  like  to  use   Jetty, Pax Web Camel, JBI Integration Web CXF Spring, Blueprint Web Services IoC ActiveMQ Middelware Java15   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  16. 16. «  Camel  the  Integra6on  Framework  of  the  Enterprise  PaOerns  -­‐   EIP  rou6ng  messages  through  the  bus  »  16   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  17. 17. Camel    Birthdate  -­‐  March  2007    OpenSource  Integra6on  Framework  implemen6ng                  EIP  paOerns  (book  published  in  2005  by  Gregor  Hohpe)    Why  EIP    To  provide  word  defini6on,  grammar  and  language   when  designing  integra6on  projects    Camel  uses  a  Domain  Specific  Language  transposing  the  EIP   paOerns  into  Java,  XML    It  supports:   •  In  memory  bus      Alterna6ve  to  JBI  using  NMR   •  Route  objects    can  be  XML,  File,  Stream,  Bytes,…     •  Transac6onal  architecture,   •  Sync/Async  exchanges,   •  Threads  Management,    17   • Copyright  ©  2010  Progress  Sexcep6on  nd/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     Error  and   o3ware  Corpora6on  a handling   A  Progress  So3ware  Company  
  18. 18. Camel  (1)     More  than  50  paOerns  are  implemented   hOp://­‐integra6on-­‐paOerns.html  18   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  19. 19. Camel  (2)    More  than  100  components   hOp://  19   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  20. 20. Camel  (3)    18  data  formaters  to  simplify   data  exchange  between  layers,   applica6ons  connected    Example  :  JAXB,  Bindy,  SOAP    Uses  marshaler  (xml    object)   and  unmarsharler  (object     xml)    Will  be  typically  use  in  IN,  OUT   flows     hOp://­‐format.html  20   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  21. 21. Camel  (4)   The  model  –>  Content  Based  Router   and  its  DSL  language  21   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  22. 22. Camel  (5)  22   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  23. 23. Camel  (6)  23   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  24. 24. Camel  (7)  24   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  25. 25. Camel  (8)   URI  =  «    component  name  »  and  proper6es  25   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  26. 26. Camel    Java  DSL  26   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  27. 27. Camel    Route  Camel  +  Java  DSL  27   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  28. 28. Camel     Endpoints  and  predicate  can  be  provided  into  the                                   camel  route  directly  28   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  29. 29. Camel    Integra6on  with  IntelliJ,  Eclipse,  NetBeans  29   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  30. 30. Camel  (9)    Instead  of  Java,  use  Spring  /  XML  DSL  30   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  31. 31. Camel  (10)    IDE  assistance  31   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  32. 32. «  CXF  –  The  tool  to  generate  Web  Services  »  32   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  33. 33. CXF     Merge  of  2  projects(Cel6c  and  Xfire)     Simplify  the  crea6on  and  deployment  of  webservices                  2  approaches  :  java  to  wsdl  or  wsdl  to  java.     Support  the  following  standards  :   •  JAX-­‐WS  :  Web  Services  (XML/SOAP)   •  JAX-­‐RS  :  RESTfull  service  (JSON)   •  SOAP  1.1,  1.2,  WSDL  1.1     •  WS-­‐Security  :  securise  the  connexion  client/server  or  vice  versa   •  WS-­‐Addressing  :  standardize  the  data  exchange  in  the  SOAP  Header   for  the  rou6ng   •  WS-­‐RM  :   message  delivery  guaranty    33   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  34. 34. CXF  (1)   To  use  it,  simply  add  cxf  maven  plugin  into  the   pom  of  the  project   <plugin> <groupId>org.apache.cxf</groupId> <artifactId>cxf-codegen-plugin</artifactId> <version>${cxf-version}</version> <executions> <execution> <id>generate-sources</id> <phase>generate-sources</phase> <configuration> <sourceRoot> ${basedir}/target/generated/src/main/java </sourceRoot> <wsdlOptions> <wsdlOption> <wsdl> ${basedir}/src/main/resources/report.wsdl </wsdl> </wsdlOption> </wsdlOptions> </configuration> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> </plugin>34   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  35. 35. CXF  (2)      …  and  configure  a  spring  file  <beans xmlns="" xmlns:xsi="" xmlns:cxf="" xsi:schemaLocation=""> <import resource="classpath:META-INF/cxf/cxf.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> <import resource="classpath:META-INF/cxf/cxf-extension-http-jetty.xml"/> …. <cxf:cxfEndpoint id="reportIncident" address="http://localhost:9080/incident" wsdlURL="etc/report_incident.wsdl" serviceClass="org.apache.camel.example.ReportIncidentEndpoint"> </cxf:cxfEndpoint> …</beans> 35   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  36. 36. «  Ac6veMQ  –  broker  and  messaging  factory  »  36   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  37. 37. Ac6veMQ  -­‐  MoM  layer     A  high  performance,  reliable  messaging  fabric,  suppor6ng  JMS,  C,  .Net,  and   other  frameworks     Offers  persistance  for  messages  and  bridge  between  ServiceMix  instances  Clients connect to the Networkbroker using connectors controlconnectors with how the brokersimple URIs interacts with other brokers for discovery, replication, Topics and queues created failover, clustering and store & dynamically. forward. … all based on a flexible Spring- File & JDBC-based based core. message stores supported.37   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  38. 38. FUSE  Message  Broker  (Apache  Ac6veMQ)     Point  to  Point   •  Sender/producer  sends  messages  to  a  queue.   •  Receiver/consumer  listens  for  messages  from  the  queue   •  Messages  are  stored  un6l  read  (or  expired)   •  Messages  can  be  persisted  on  disk   •  Messages  are  read  only  once.   <<jvm>> frodo:ActiveMQ p:Producer Foo:File c1:Consumer m m 1: Producer sends a 2: Consumer reads message to the broker the message38   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  39. 39. FUSE  Message  Broker  (Apache  Ac6veMQ)     Publish  to  subscribe   •  A  JMS  client  sends  message  to  the  topic.   •  The  JMS  broker  sends  message  to  all  subscribers  that  are  currently   alive.   –  Alterna6vely,  durable  subscrip-ons  can  be  used  so  that  all   subscribers  will  receive  message  even  if  not  alive  at  6me  of  sending   •  Messages  are  read  several  6mes  (rela6on  1  to  many)   <<jvm>> m frodo:ActiveMQ s1:Subscriber p:Producer Foo:Topic m m s2:Subscriber39   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  40. 40. How  the  Apache  products  relate  to  each  other…   <<supports transport>> <<supports transport>> ActiveMQ <<implements flow with>> ServiceMix CXF <<deploy into>> <<supports activemq endpoints>> <<deploy into>> <<supports cxf endpoints>> Camel <<supports jbi endpoints>> <<deploy into>>40   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  41. 41. «  What  are  the  Architectures  that  we  can  design  with   ServiceMix,  Camel,  Ac>veMq  »  41   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  42. 42. Architecture  -­‐  Messaging    The  bus  operates  the  exchanges  between  the  endpoints   using  Camel,  NMR,  JBI   <<jvm>>   FTP   ServiceMix4   Web  Service   BUS   Bean<<MyBean>>   from(FTP)   from(«  cxf:bean:myWS  »)   .beanRef(«  myBean  »);   .beanRef(«  myBean  »)  ;  42   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  43. 43. Architecture  -­‐  Java     The  OSGI  plaform  proposes  a  Service  Registry  (comparable   to  JNDI)  where  "interfaces"  are  registered      Clients  access  to  the  service  using  lookup  mechanism   <<jvm>>   A ServiceMix4   «  Interface  »   Service   DAO   PoJo   Hibernate/JPA   C B OSGI  registry  <bean  id="incidentServiceTarget"  class="org.apache.camel.service.impl.IncidentServiceImpl">     <property  name="incidentDAO">       <osgi:reference  interface="org.apache.camel.dao.IncidentDAO"/>      </property>  </bean>   43   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  44. 44. Architecture  –  Messaging  +  Java    Decoupling  of  the  "services"  from  integra6on  layer   <<jvm>>   ServiceMix4   C  «  Interface  »   Service   DAO   PoJo   Hibernate/JPA   OSGI  Registry   from(«  cxf:bean:myWS  »)   .to(«  bean:validate  »)   B .beanRef(«org.bejug.jpaService»);   A Bean     Web  Service   Validate  44   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  45. 45. Architecture  –    Java  +  Web     ServiceMix  is  a  web  plaform,  it  uses    JeOy  Web  Applica6on   Server,  Pax  Web  –  a  tooling  for  war  and  OSGI  HTTP  Service  to   register  Servlet,  …   <<jvm>>   A ServiceMix4   «  Interface  »   Service   Hibernate/JPA   DAO   PoJo   C Web   B Applica-on   OSGI  registry   Bundle   OSGI  Run-me   B A 45   Bean     Web  Service   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company   Validate  
  46. 46. Only  one  ServiceMix  instance    Deployment  unit    bundle  (=  jar  with  addi6onal  data  in  file    Several  camel  routes  can  be  deployed  in  different  bundles,   cross-­‐communica6on  via  NMR  bus  (name  is  the  same  but   different  from  JBI)   NMR  46   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  47. 47. What  can  I  do  when  x  instances  are  required     When  we  need  asymetric  deployment  because  CPU,  memory  is   not  sufficient  then    we  use  Ac6veMQ  to  interconnect  the   instances  and  persist  messages   47   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  48. 48. «  High  availability,  scalability  and  clustering  »  48   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  49. 49. High-­‐availability  -­‐  Ac6veMQ    2  mechanisms  :  pure  Master/Slave  et  Shared  message  store     <<jvm>> <<jvm>> frodo:ActiveMQ frodo:ActiveMQ Master state The brokers replicated compete to with the slave acquire lock on the shared system (file or DB) <<jvm>> <<jvm>> samwise:ActiveMQ samwise:ActiveMQ49   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  50. 50. High  Availability  -­‐  ServiceMix     Only  one  mechanism  is  available  –  Lock  based  (File,  DB)     Bundles  can  be  deployed  in  ac6ve  or  passive  mode  50   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  51. 51. High-­‐Availability  –  Amq  and  Smx     Combine  Ac6veMQ  (shared  store)  anf  ServiceMix  (shared  lock)     Network  of  brokers   Camel - FTP SMX4 Actif (Master) BUSHeadquarter queue:order from(ftp) bean://order .to(amq:queue:order) queue:order queue:order NetWork of BUS Master from Broker Regional office (amq:queue:order) .bean://order bean://order Camel - WS queue:order BUS BUS Slave queue:order from (amq:queue:order) from(ftp) .bean://order .to(amq:queue:order) SMX4 Passive (Slave) 51   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  52. 52. Cloud,  Provisioning    FuseSource  Fabric  based  on  Apache  Zookeeper    Distributed  coordina6on  service  highly  available  using  a   repository  for  cluster  configs  and  the  node  (run6me)     ACLs   Data exchange <<Zookeeper:toto>>   Sync   <<Zookeeper:nestor>>  52   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  53. 53. Cloud,  Provisioning  (2)  53   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  54. 54. Provisioning  –  local  and  remote    Solu6on  to  deploy  locally  or  remotelly    Idea  :  we  have  a  profile  defining  what  we  would  like  to  deploy   and  configure  and  link  it  to  an  agent  =  instance  of  ServiceMix   karaf@root> fabric:create-profile --parents default webserver karaf@root> zk:create -r /fabric/configs/versions/base/profiles/webserver/ org.fusesource.fabric.agent/repository.karaf mvn:org.apache.karaf.assemblies.features/standard/2.2.1-SNAPSHOT/xml/features karaf@root> zk:create -r /fabric/configs/versions/base/profiles/webserver/ org.fusesource.fabric.agent/feature.war war karaf@root> fabric:create-agent --profile webserver --parent root test54   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  55. 55. Cloud     Fabric  allows  to  register  camel  HTTP  endpoints  with  a  logical   name  (we  dont  need  to  know  Ip/Hostname)     Provide  a  new  strategy  for  Web/HOp/  WebServices  architecture   with  loadbalancing  between  the  instances  of  the  cloud   <from uri="fabric:BeJug: jetty:"/><from uri="direct:A/><to uri="fabric:BeJug"/> <<Zookeeper:2>> <from uri="fabric:BeJug: <<Zookeeper:1>> jetty:"/> <<Zookeeper:3>> Discovery  mechanism   55   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  56. 56. «  End  of  the  first  part  »  56   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  57. 57. Demo     rom  theory  to  «  pra6que  »   F   ransposi6on  of  the  EIP  into  camel  DSL   T   evelopment  of  the  Camel  routes   D   esign  of  the  mul6-­‐6ers  architecture  (service,  DAO,  web   D services,  …)     mplementa6on  of  the  web  services,  web  site   I   ackaging  and  deployment   P57   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  58. 58. Context   hOp://­‐osgi-­‐camel-­‐part2.html  58   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  59. 59. Code  Source     emo  1  –  Integrate  camel,  web  services,  web  technologies  in  a   D Java  project  with  Service,  DAO  and  persistence  layer   hOps://­‐osgi-­‐servicemix-­‐tutorial     emo  2  –  Use  FuseSource  Fabric  to  deploy  a  project  in  a  cloud   D architecture  and  use  camel-­‐fabric  to  loadbalance  requests   between  nodes  of  the  cloud  space   hOps://­‐ examples/fabric-­‐camel-­‐cluster-­‐loadbalancing      59   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  60. 60. Links     ntegra6on  -­‐  Camel  :  hOp://   I   SB  -­‐  ServiceMix  :  hOp://   E   un6me  -­‐  Karaf  :  hOp://   R   ebService  -­‐  CXF  :  hOp://   W   roker  -­‐  Ac6veMQ  :  hOp://   B   SGI  EE  -­‐  Aries  :  hOp://   O   useSource  :  hOp://   F   IP  :  hOp://   E   abric  :  hOp://   F60   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company  
  61. 61. Questions ?More info  me on Twitter : LinkedIn : My blog : http://cmoulliard.blogspot.com61   Copyright  ©  2010  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.     A  Progress  So3ware  Company