apache activemq, camel, cxf e servicemix overview - portugues

36
A Progress So3ware Company Overview sobre Apache Ac6veMQ, Camel, CXF e ServiceMix Marcelo Jabali Sr. Solutions Consultant Dec., 2011

Upload: marcelo-jabali

Post on 19-Jun-2015

1.169 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    1   A  Progress  So3ware  Company  

A  Progress  So3ware  Company  

Overview  sobre  Apache  Ac6veMQ,  Camel,  CXF  e  ServiceMix  

Marcelo Jabali Sr. Solutions Consultant Dec., 2011

Page 2: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    2   A  Progress  So3ware  Company  

Quando  Você  Iniciou  Sua  Sessão  Webex…  

Page 3: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    3   A  Progress  So3ware  Company  

Agenda  

§  Apache  Ac6veMQ  §  Apache  Camel  §  Apache  CXF  §  Apache  ServiceMix  §  Overview  sobre  a  FuseSource  

Page 4: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    4   A  Progress  So3ware  Company  

Sobre  mim…  

Marcelo  Jabali  Sr.  Solu6ons  Consultant    [email protected]    marcelojabali.blogspot.com  

   mjabali    linkedin.com/in/jabali  

Page 5: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    5   A  Progress  So3ware  Company  

Apache  Ac6veMQ  

§  Servidor  de  mensagens  de  alta  performance  baseado  na  especificação  JMS  (Java  Message  Service)  

Clientes conectam para os brokers usando conectores com simples URLs

Suporte para armazenamento de mensagens em banco de dados e sistema de arquivos.

… configuração baseada em Spring XML beans.

Topics e queues criados dinamicamente.

Network connectors controlam como os brokers interagem com outros brokers para replicação, failover, clustering, etc…

Page 6: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    6   A  Progress  So3ware  Company  

Alta  Disponibilidade  

§  Duas  abordagens  complementares:  • Master/Slave  

–   Acesso  a  mensagens  persistentes  após  falha  do  broker  

• Network  of  Brokers  –   Escalabilidade  Horizontal  (#  de  mensagens,  #  de  conexões  cliente,  geografia,  etc)  

Page 7: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    7   A  Progress  So3ware  Company  

Alta  Disponibilidade:  Master/Slave  

master

Store

slave

Page 8: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    8   A  Progress  So3ware  Company  

Alta  Disponibilidade:  Master/Slave  

master

Store

Producer

slave

failover:(tcp://master:61616,tcp://slave:61616)?randomize=false

Page 9: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    9   A  Progress  So3ware  Company  

Alta  Disponibilidade:  Master/Slave  

master

Store

slave

Consumer

slave

failover:(tcp://master:61616,tcp://slave:61616)?randomize=false

Producer

Page 10: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    10   A  Progress  So3ware  Company  

Network  of  Brokers:  Geograficamente  Dispersos  

Producer Consumer Producer Consumer

Page 11: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    11   A  Progress  So3ware  Company  

Network  of  Brokers:  Geograficamente  Dispersos  

master slave

master slave

master

master

master

master master

master

Page 12: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    12   A  Progress  So3ware  Company  

Network  of  Brokers  +  Master/Slave  

master A master B

master Aslave

master Bslave

Producer Consumer Producer Consumer

Page 13: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    13   A  Progress  So3ware  Company  

Apache  Camel  

§  Apache  Camel  é  um  poderoso  framework  de  integração  de  código  aberto  baseado  nos  padrões  de  integração  corpora6vos  (Enterprise  Integra6on  Panerns)  

http://enterpriseintegrationpatterns.com/

Page 14: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    14   A  Progress  So3ware  Company  

Apache  Camel:  Panerns  

§  Mais  de  50  Enterprise  Integra6on  Panerns  

http://camel.apache.org/eip

Page 15: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    15   A  Progress  So3ware  Company  

Apache  Camel:  Arquitetura  

Page 16: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    16   A  Progress  So3ware  Company  

Apache  Camel:  Exemplo  

§  Cenário  Típico:  ”ler  arquivo  XML  em  um  servidor  FTP,  processá-­‐lo  usando  XSLT  e  então  enviar  uma  mesagem  JMS  com  o  resultado  da  transformação”  

Consumer Processor Producer

FTP JMS

Camel Route

Page 17: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    17   A  Progress  So3ware  Company  

Apache  Camel:  Exemplo  

§  Java  DSL      from("ftp://john@localhost/ftp?password=xxx") .to("xslt:MyTransform.xslt")

.to("activemq:queue:MyQueue")

Consumer Processor Producer

FTP JMS

Camel Route

Page 18: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    18   A  Progress  So3ware  Company  

Apache  Camel:  Exemplo  

§  Spring  XML  DSL  <camelContext id=“camel”

xmlns=“http://activemq.apache.org/camel/schema/spring”>

<route>

<from uri=“ftp://john@localhost/ftp?password=xxx”/> <to uri=“xslt:MyTransform.xslt”/> <to uri=“activemq:queue:MyQueue”/>

</route>

</camelContext>

     

Consumer Processor Producer

FTP JMS

Camel Route

Page 19: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    19   A  Progress  So3ware  Company  

Apache  Camel:  Opções  de  Deployment  

§  Estratégia  de  Deployment  •  Sem  dependência  de  Container  •  Leve  •  Pode  ser  embu6do  em  outras  

tecnologias  

§  Opções  de  Deployment  •  Standalone  •  WAR  •  Spring  •  JEE  •  OSGi  •  Cloud  

Containers  Mais  Usados    Apache  ServiceMix  Apache  Ac.veMQ  Apache  Tomcat  Je5y  JBoss  IBM  WebSphere  Oracle  WebLogic  Oracle  OC4j  Glassfish  Google  App  Engine  Amazon  EC2  ...  others  

Page 20: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    20   A  Progress  So3ware  Company  

Apache  CXF  

§  Apache CXF é um framework de serviços de código aberto escrito em Java

§  CXF permite que você desenvolva serviços usando APIs como JAX-WS e JAX-RS

§  Estes serviços podem ainda utilizar uma variedade de protocolos como SOAP, XML/HTTP, RESTful HTTP e transportes como HTTP, JMS ou JBI

Page 21: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    21   A  Progress  So3ware  Company  

Construindo  Aplicações  com  Apache  CXF  

§  CXF abstrai os detalhes do processo de comunicação entre serviços e consumidores •  … permitindo que desenvolvedores concentrem-se na lógica do

serviço ao invés de lógica de integração

§  CXF suporta dois modelos de desenvolvimento: •  Code-first

–  Expõe “plain old Java objects” (POJOs) como serviços ou –  Explicitamente usa Java Annotations

•  WSDL-first (Contract-first) –  Gera classes Java a partir do WSDL

§  CXF pode ser utilizado para desenvolvimento de ambos componentes (client e servidor)

Page 22: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    22   A  Progress  So3ware  Company  

Apache  CXF:  Comunicação  Client-­‐Server  

Client API: JAX-WS

Network

hello.wsdl

SOAP/HTTP

Binding: SOAP Interceptors

Transport: HTTP

Service API: JAX-WS

Binding: SOAP Interceptors

Transport: HTTP

<service name=“HelloWorld”/> <soap:address location=“http:/frankenstein:9090/”/> </service>

Page 23: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    23   A  Progress  So3ware  Company  

Apache  CXF:    Opções  de  Deployment  

§  CXF pode ser deployed em vários containers baseados em diferentes tecnologias: •  Servlet engine (ex. Tomcat) •  J2EE container (ex. JBoss) •  OSGi container (ex. ServiceMix) •  Standalone JVM (ex. java –jar myapp.jar)

Page 24: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    24   A  Progress  So3ware  Company  

Apache  ServiceMix  

§  Completo Enterprise Service Bus (ESB) de código aberto •  Baseado em tecnologia OSGi (http://www.osgi.org)

§  Suporta múltiplos componentes •  OSGi bundles •  JBI artifacts •  Servlets •  Spring beans •  Camel routes (http://camel.apache.org) •  CXF web services e RESTful services (http://cxf.apache.org)

Page 25: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    25   A  Progress  So3ware  Company  

Apache  ServiceMix:  Arquitetura  

§  ServiceMix é composto por duas camadas principais baseadas em OSGi •  Core : Também conhecida como “kernel”. Baseado em outro

projeto Apache chamado Karaf que extende o modelo OSGi para gerenciamento e manutenção de bundles

•  Technology: Camada de componentes utilizados para suportar diferentes tecnologias

Page 26: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    26   A  Progress  So3ware  Company  

Apache  ServiceMix:  Core  

§  Suporte para Hot deployment de bundles OSGi §  Configuração Dinâmica de Bundles através do OSGi

ConfigurationAdmin

§  Serviços de Logging fornecidos por Log4J suportando diferentes APIs como SLF4J, Java Utils, JCL, Avalon, Tomcat, OSGi

§  Deployment através de file-drop, Maven repository e/ou download remoto (http://)

§  Administração via console

§  Acesso Remoto via SSH

§  Framework de segurança baseado em JAAS (Java Authentication and Authorization Service)

Page 27: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    27   A  Progress  So3ware  Company  

Apache  ServiceMix:  Technology  

§  Spring Framework §  JMS Message Broker §  JAX-WS/JAX-RS Web Services support §  Enterprise Integration Patterns (EIP) support §  Java Business Integration (JBI) support

Page 28: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    28   A  Progress  So3ware  Company  

Apache  ServiceMix:  Opções  de  Deployment  

§  Quando você deploy uma solução em ServiceMix, tipicamente você precisa da camada Core e um ou mais componentes da camada de Technology

§  Exemplos: •  Para suportar Enterprise Integration Patterns(EIPs)

–  ServiceMix Core + Camel •  Para suportar soluções JAX-WS/JAX-RS

–  ServiceMix Core + CXF •  Para suportar soluções JMS

–  ServiceMix Core + ActiveMQ •  Para suportar EIPs + JAX-WS + JMS

–  ServiceMix Core + Camel + CXF + ActiveMQ

Page 29: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    29   A  Progress  So3ware  Company  

FuseSource  Corpora6on  

Líderes  em  Integração  e  Messaging  de  Código  Aberto  

Suporte  Corpora=vo  

Distribuições  Testadas  e  Homologadas  Time  de  

Desenvolvedores  nos  Projetos  Chave  

Page 30: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    30   A  Progress  So3ware  Company  

FuseSource  :  Integração  de  Código  Aberto  

Projeto Apache Produto FuseSource Apache ServiceMix Fuse ESB

Apache ActiveMQ Fuse Message Broker

Apache CXF Fuse Services Framework

Apache Camel Fuse Mediation Router

§  Custo-­‐Benexcio  e  Uso  Comprovado  em  Soluções  Corpora6vas  

§  Mesmo  código  fonte  da  Apache  §  Licença  para  u6lização,  manutenção  e  distribuição  (Apache  

GPL)    §  Mais  de  25  commiters  nos  projetos  Apache  

Page 31: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    31   A  Progress  So3ware  Company  

Forrester  Wave  Report  Q2  2011:  Fuse  ESB  é  um  dos  líderes  

§  FuseSource  classificado  na  categoria  “Líder”  juntamente  com  outros  tradicionais  fornecedores  

§  Uma  das  poucas  soluções  open  source  consideradas  neste  estudo  

§  Mais  completa  e  robusta  solução  open  source  

http://fusesource.com/forrester

Page 32: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    32   A  Progress  So3ware  Company  

Suporte •  Cobertura  24x7  •  Organização  global  •  Especialistas  em  integração  de  sistemas  de  missão  crí6ca  

•  Assistência  para  updates  e  migrações  

Influência •  Roadmap  de  Produtos  

•  Planejamento  •  Canal  para  Apache  

Ferramentas •  Desenvolvimento  •  Operações  •  Gerenciamento  •  Documentação  

FuseSource:  Serviços  de  Subscrição  

Page 33: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    33   A  Progress  So3ware  Company  

FuseSource:  Pacote  de  Serviços  

Avaliação Desenvolvimento Produção

PoC Workshop

Pontapé inicial de desenvolvimento; Reduz riscos; Projeto piloto

Architecture Assessment

Revisão e análise da arquitetura e infrastrutura existentes; definição da arquitetura proposta

Developer Training

Intensivo treinamento virtual e onsite para habilitar sua equipe técnica

Best Practices

Desenvolvimento acelerado; garantia de qualidade; foco contínuo

Performance, Scaling and HA Review

Revisão e ajustes de performance, métricas e configurações de alta disponibilidade

Go Live Habilita seu time de operações para o planejemanto, configuração e gerenciamento

Page 34: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    34   A  Progress  So3ware  Company  

FuseSource:  Treinamento  

§  Treinamento  Virtual  •  Treinamento  Intera6vo  Online  •  Exercícios,  demonstrações  e  discussões  técnicas  durante  todo  o  

curso  •  Sem  custos  adicionais  (viagem,  estadia,  deslocamento,  …)  

§  Treinamento  Onsite  •  2  dias  por  projeto  

–  Ac6veMQ,  Camel,  CXF  ou  ServiceMix  

•  5  dias  para  todos  os  projetos  •  Customizável  

Page 35: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    35   A  Progress  So3ware  Company  

A  Progress  So3ware  Company  

Obrigado!  

No  vendor  lock-­‐in  Free  to  redistribute  

Enterprise  class  

Page 36: Apache ActiveMQ, Camel, CXF e ServiceMix Overview - Portugues

Copyright  ©  2011  Progress  So3ware  Corpora6on  and/or  its  subsidiaries  or  affiliates.  All  rights  reserved.    36   A  Progress  So3ware  Company  

Mais  Informações  em    hnp://fusesource.com