SlideShare une entreprise Scribd logo
1  sur  124
Workshop de SOA
                                 Level 1




Friday, February 13, 2009
Friday, February 13, 2009
Objetivo

                            Mostrar o caminho que
                              SOA tem seguido

Friday, February 13, 2009
2000




                                   W
                                   3C




Friday, February 13, 2009
                            2001



                            2002



                            2003



                            2004



                            2005



                            2006



                            2007



                            2008
Friday, February 13, 2009
serviço


Friday, February 13, 2009
serviço
  arquitetura




Friday, February 13, 2009
infra-estrutura



                            serviço
  arquitetura




Friday, February 13, 2009
padrão


                            infra-estrutura



                            serviço
  arquitetura




Friday, February 13, 2009
padrão


                            infra-estrutura



                            serviço
  arquitetura



                                              método


Friday, February 13, 2009
padrão


                            infra-estrutura
                                      interoperabilidade
                            serviço
  arquitetura



                                               método


Friday, February 13, 2009
padrão


                                    infra-estrutura
                                               interoperabilidade
                                    serviço
  arquitetura

                            intercâmbio

                                                        método


Friday, February 13, 2009
padrão


                                    infra-estrutura
                                               interoperabilidade
                                    serviço
  arquitetura

                                          mensagem
                            intercâmbio

                                                        método


Friday, February 13, 2009
padrão


                                    infra-estrutura
                                               interoperabilidade
                                    serviço
  arquitetura

                                          mensagem
                            intercâmbio

                                                        método
    integração
Friday, February 13, 2009
padrão


                                    infra-estrutura
                                               interoperabilidade
         desacoplamento

                                    serviço
  arquitetura

                                          mensagem
                            intercâmbio

                                                        método
    integração
Friday, February 13, 2009
padrão
                                                   coordenação
                                    infra-estrutura
                                               interoperabilidade
         desacoplamento

                                    serviço
  arquitetura

                                          mensagem
                            intercâmbio

                                                          método
    integração
Friday, February 13, 2009
padrão
                                                   coordenação
           orquestração
                                    infra-estrutura
                                               interoperabilidade
         desacoplamento

                                    serviço
  arquitetura

                                          mensagem
                            intercâmbio

                                                          método
    integração
Friday, February 13, 2009
padrão
                                                   coordenação
           orquestração
                                    infra-estrutura
                                               interoperabilidade
         desacoplamento

                                    serviço             processos
  arquitetura
                                                        de negócio

                                          mensagem
                            intercâmbio

                                                          método
    integração
Friday, February 13, 2009
padrão
                                                   coordenação
           orquestração
                                    infra-estrutura
                                               interoperabilidade
         desacoplamento

                                    serviço             processos
  arquitetura
                                                        de negócio

                                          mensagem
                            intercâmbio

                                          reuso           método
    integração
Friday, February 13, 2009
Friday, February 13, 2009
Friday, February 13, 2009
Friday, February 13, 2009
C
                             P
                            R
Friday, February 13, 2009
A
                                B
                               R
                             O
                                   C
                            C
                                 P
                                R
Friday, February 13, 2009
I
                              MA
                            RB
                                R
                              O
                                  C
                            C
                               P
                             R
Friday, February 13, 2009
s
                                      ce
                                    vi
                                  r
                                eSI
                               b
                             e
                            W RM A
                                      B
                                     R
                                   O
                                           C
                                 C
                                         P
                                     R
Friday, February 13, 2009
Friday, February 13, 2009
Friday, February 13, 2009
Friday, February 13, 2009
Friday, February 13, 2009
Friday, February 13, 2009
Soluções Silver Bullet
Friday, February 13, 2009
prome$$a$




                            Soluções Silver Bullet
Friday, February 13, 2009
Estratégia stop-the-world




Friday, February 13, 2009
Implantação árdua e demorada
Friday, February 13, 2009
Colou?


Friday, February 13, 2009
2005
                            SOA nem
                             que seja
                            na marra!




Friday, February 13, 2009
Projetos SOA
Friday, February 13, 2009
Projetos SOA
Friday, February 13, 2009
Falta de escalabilidade




Friday, February 13, 2009
Interview
    John Crupi on Enterprise SOA



  So service oriented architecture, hype or reality?

  A little of both there's a lot of hype behind it. (...) it's
  architectural driven and if
  you don't have the architecture
  in place there's no product that
  out of the box will give you
  SOA today.



Friday, February 13, 2009
Guerrilla SOA
Friday, February 13, 2009
#1
                                SOA
                              tem a ver
                             com filosofia
                                e não
                            com tecnologia

Friday, February 13, 2009
#2
                               SOA
                             tem a ver
                            com R.O.I.



Friday, February 13, 2009
#3
                                   SOA
                               tem a ver com
                            governança de ativos




Friday, February 13, 2009
Article
    Quest for True SOA
    Posted by Alex Maclinovsky on Sep 10, 2008



                   According to these definitions, SOA
              Governance is what turns Enterprise Services
                 from digital artifacts into true business
                    assets by allowing responsible reuse
                            across the domains of control of SOA
                                        participants



Friday, February 13, 2009
Redesenvolvimento de software
Friday, February 13, 2009
Software também é
                                patrimônio




Friday, February 13, 2009
Lato Sensu em Sistemas Orientados a Objetos
                            Laboratório de Tópicos Avançados - 2°/2008




                            Antes de trocar,
                                    você reforma
Friday, February 13, 2009
Lato Sensu em Sistemas Orientados a Objetos
                                       Laboratório de Tópicos Avançados - 2°/2008




                            ...até a última ponta gota
Friday, February 13, 2009
Article
   SOA Governance: An Enterprise View
   Posted by Michael Poulin on Aug 20, 2008 03:54 AM




Friday, February 13, 2009
Article
   SOA Governance: An Enterprise View
   Posted by Michael Poulin on Aug 20, 2008 03:54 AM




             (...)organisations were assured that SOA was new
                  IT technology for integration and reuse of
                              existing assets.




Friday, February 13, 2009
Article
   SOA Governance: An Enterprise View
   Posted by Michael Poulin on Aug 20, 2008 03:54 AM




                            Very few succeeded and went forward




Friday, February 13, 2009
Article
   SOA Governance: An Enterprise View
   Posted by Michael Poulin on Aug 20, 2008 03:54 AM




                            Other organisations failed in gaining
                             promised ROI and time to market

Friday, February 13, 2009
Interview
    Jim Webber on quot;Guerilla SOAquot;

                               A lot of SOA projects I have seen, have been
                                  somewhat akin to mobilizing an army.



      We want to address specific discrete business
      problems, organized by
      priorities according
      to the business stakeholder
      and get those processes
      implemented rapidly in an
      incremental way with
                            feedback.
      lots of
Friday, February 13, 2009
Major changes in
                             technology have
                            not been driven by
                              the technologies
                            themselves but by
                               the change in
                             thinking that
                               they enabled.

Friday, February 13, 2009
“Enterprises around the world are increasingly pursuing the
      core business benefits of Service-Oriented Architecture
       (SOA)—business agility, reduction in integration expense,
       greater asset reuse, and improved business visibility. And
       yet, many large organizations are running into roadblocks
      with their heavyweight, enterprise-wide SOA initiatives. As
         an alternative, many organizations are finding a “right
                 weight,” step-by-step approach to SOA is more
                          effective and lowers risk as well.”

                                         SIMPLIFYING SOA
                            LOW RISK, HIGH VALUE, “RIGHT WEIGHT” SOA
                                          December 2007
                                      Analyst: Jason Bloomberg
Friday, February 13, 2009
Economically,
   quot;right-sourcingquot;
   is far more eficient
    than quot;outsourcingquot;
         and SaaS.


Friday, February 13, 2009
Interview
  Stefan Tilkov on SOA

                            Why SOA? Why now? What's
                            actually new?
                            (...) What I think is exciting is
                            the fact that it creates, or at
                            least that it is perceived to
                            create the opportunity to
                            align business and
                            technology.

Friday, February 13, 2009
Visão moderna de SOA




Friday, February 13, 2009
estilo


                            Visão moderna de SOA




Friday, February 13, 2009
estilo


                            Visão moderna de SOA

                                   lucro




Friday, February 13, 2009
estilo


                            Visão moderna de SOA

                                   lucro



                                   ROI
Friday, February 13, 2009
estilo
                                           reaproveitamento


                            Visão moderna de SOA

                                   lucro



                                   ROI
Friday, February 13, 2009
estilo
                            ativos            reaproveitamento


                            Visão moderna de SOA

                                      lucro



                                      ROI
Friday, February 13, 2009
estilo
                            ativos            reaproveitamento


                            Visão moderna de SOA

                                      lucro

           agilidade
                                      ROI
Friday, February 13, 2009
estilo
                            ativos            reaproveitamento


                            Visão moderna de SOA

                                      lucro

           agilidade                               efetividade
                                      ROI
Friday, February 13, 2009
Legados
                              ativos




Friday, February 13, 2009
Novos legados estão sempre chegando




Friday, February 13, 2009
Novos legados estão sempre chegando




Friday, February 13, 2009
Novos legados estão sempre chegando




Friday, February 13, 2009
Como integrá-los?




Friday, February 13, 2009
Como integrá-los?
                                 ponto a ponto




                        S1                       S2




                        S3                       S4


Friday, February 13, 2009
Como integrá-los?
                                  estrela



                    S1                          S2


                                  broker
                                   hub
                                   bus

                    S3                          S4



Friday, February 13, 2009
Reaproveitamento



Friday, February 13, 2009
Integracão ponto-a-ponto
                                      direta


                              CORBA



                              RMI
                 WebServices
                                               S1      S2

                       REST                    S3      S4
Friday, February 13, 2009
Integracão estrela
                                  indireta




           Enterprise Service Bus


Friday, February 13, 2009
Enterprise Service Bus




                            facilitador da integração entre serviços
Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
!
                            S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3



                                      ESB


                                                 !
                                 S4         S5

Friday, February 13, 2009
JBoss ESB
                              Rosetta
Friday, February 13, 2009
Lato Sensu em Sistemas Orientados a Objetos
                                          Laboratório de Tópicos Avançados - 2°/2008




                    Na vida real, as coisas não são tão simples assim
Friday, February 13, 2009
Lato Sensu em Sistemas Orientados a Objetos
                                         Laboratório de Tópicos Avançados - 2°/2008




                            Nem sempre as peças se encaixam
Friday, February 13, 2009
Nem sempre os serviços falam a mesma língua
Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
!
                            S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3



                                      ESB


                                                 !
                                 S4         S5

Friday, February 13, 2009
Lato Sensu em Sistemas Orientados a Objetos
                                     Laboratório de Tópicos Avançados - 2°/2008




                 Nem sempre o destino da mensagem é conhecido
Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
!
                            S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3




                                            ?
                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3




                                            ?
                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3




                                            !
                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3



                                      ESB


                                                 !
                                 S4         S5

Friday, February 13, 2009
?
                            Como tomar esta decisão?
Friday, February 13, 2009
package    poker;      import      java.util.ArrayList;       import     java.util.Arrays;      import
java.util.Collection; import java.util.Collections; import java.util.Comparator; import
                                                                                                          ?xml version = quot;1.0quot; encoding = quot;UTF-8quot;? jbossesb xmlns=quot;http://
java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map;
                                                                                                          anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/
import java.util.Set; import java.util.Map.Entry; public class PokerHand { public static
final int HIGH_CARD = 0; public static final int ONE_PAIR = 1; public static final int                    jbossesb-1.0.1.xsdquot; parameterReloadSecs=quot;5quot;providers jms-provider
TWO_PAIRS = 2; public static final int THREE_OF_A_KIND = 3; public static final int                       name=quot;JBossMQquot; connection-factory=quot;ConnectionFactoryquot; jms-bus
STRAIGHT = 4; public static final int FLUSH = 5; public static final int FULL_HAND = 6;
                                                                                                          busid=quot;quickstartGwChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest-
public static final int FOUR_OF_A_KIND = 7; public static final int STRAIGHT_FLUSH = 8;
                                                                                                          name=quot;queue/quickstart_simple_cbr_Requestquot; / /jms-bus jms-bus
private Card[] cards = new Card[5]; public PokerHand(Card c1, Card c2, Card c3, Card c4,
                                                                                                          busid=quot;quickstartEsbChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest-
Card c5) throws InvalidHandException { cards[0] = c1; cards[1] = c2; cards[2] = c3;
                                                                                                          name=quot;queue/Bquot; / /jms-bus jms-bus busid=quot;CBRNormalShippingquot; jms-message-
cards[3] = c4; cards[4] = c5; if (!isValid()) throw new InvalidHandException(cards); }
private boolean isValid() { SetCard set = new HashSetCard(); for (Card c : cards)                     filter dest-type=quot;QUEUEquot; dest-name=quot;queue/CBRNormalShippingquot; / /jms-bus
set.add(c); if (set.size() != cards.length) return false; return true; } public int                       jms-bus busid=quot;CBRExpressFreeShippingquot; jms-message-filter dest-type=quot;QUEUEquot;
getGame() { MapInteger, Integer cardsCount = countCards(); CollectionInteger
                                                                                                          dest-name=quot;queue/CBRExpressFreeShippingquot; / /jms-bus/jms-provider /
combinations       =    cardsCount.values();          if     (combinations.contains(3))       {      if
                                                                                                          providersservices!-- ESB CBR Service -- service
(combinations.contains(2))       {   return    FULL_HAND;     }   return    THREE_OF_A_KIND;     }   if
                                                                                                          category=quot;MyFirstCBRServicesESBquot; name=quot;FirstCBRServiceESBquot; description=quot;ESB
(combinations.remove(2)) { if (combinations.contains(2)) { return TWO_PAIRS; } else




                                                                                                  ?
{   return    ONE_PAIR;    }   }    if(combinations.contains(4)){       return    FOUR_OF_A_KIND;     }   Listenerquot;  listeners !-- Gateway -- jms-listener name=quot;the-gatewayquot;
MapInteger,      Integer     suitCounter       =     countSuits();     if    (isStraight()){       if   busidref=quot;quickstartGwChannelquot; is-gateway=quot;truequot; / jms-listener
(suitCounter.values().contains(5)){ return STRAIGHT_FLUSH; } else { return STRAIGHT; } }
                                                                                                          name=quot;XPathContentBasedRouterquot; busidref=quot;quickstartEsbChannelquot; /jms-listener
if (suitCounter.values().contains(5)){ return FLUSH; } return HIGH_CARD; } private
                                                                                                          /listeners actions mep=quot;OneWayquot; action
MapInteger,     Integer    countSuits()     {    MapInteger,     Integer    suitCounter    =    new
                                                                                                          class=quot;org.jboss.soa.esb.actions.ContentBasedRouterquot; name=quot;ContentBasedRouterquot;
HashMapInteger,        Integer();        for       (Card      card      :      cards)      {       if
                                                                                                          property name=quot;ruleSetquot; value=quot;SimpleCBRRules-XPath.drlquot;/ property
(suitCounter.get(card.getSuit()) == null) { suitCounter.put(card.getSuit(), 1); } else


                  programaticamente                                                                                         declarativamente
{ suitCounter.put(card.getSuit(), suitCounter.get(card.getSuit()) + 1); } } return                        name=quot;ruleLanguagequot; value=quot;XPathLanguage.dslquot;/ property name=quot;ruleReloadquot;
suitCounter; } /** * [ [k, 2], *         [q, 2], *       [T, 1]] * @return */ private MapInteger,        value=quot;truequot;/ property name=quot;destinationsquot; route-to destination-
Integer countCards() { MapInteger, Integer counter = new HashMapInteger, Integer();
                                                                                                          name=quot;expressquot; service-category=quot;ExpressShippingquot; service-
for    (Card     card    :    cards)     {     if     (counter.get(card.getNumber())      ==      null)
                                                                                                          name=quot;ExpressShippingServicequot;/ route-to destination-name=quot;normalquot; service-
{    counter.put(card.getNumber(),         1);     }     else    {    counter.put(card.getNumber(),
                                                                                                          category=quot;NormalShippingquot; service-name=quot;NormalShippingServicequot;/ /property
counter.get(card.getNumber()) + 1); }} return counter; }private boolean isStraight()
{ Arrays.sort(cards); int i = 1; int limit; //Verifica sequencia onde o straight termina                  /action /actions /service!-- Normal Shipping -- service
com ace if(cards[4].getNumber() == Card.ACE  cards[0].getNumber() == Card.TWO){ limit =                 category=quot;NormalShippingquot; name=quot;NormalShippingServicequot; description=quot;Normal
4; } else { limit = 5; } for (i=1 ; i  limit; i++) { if (cards[i - 1].getNumber() + 1 !=
                                                                                                          Shipping Servicequot; listeners jms-listener name=quot;CBRNormalShippingquot;
cards[i].getNumber()) return false; } return true; } @Override public String toString()
                                                                                                          busidref=quot;CBRNormalShippingquot;/ /listeners actions mep=quot;OneWayquot; action
{ return quot; quot; + cards[0].getNumber() + quot; quot;+ cards[0].getSuit() + quot; - quot; +
                                                                                                          name=quot;testStorequot; class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action
cards[1].getNumber() + quot; quot;+ cards[1].getSuit() + quot; - quot; + cards[2].getNumber() + quot; quot;+
                                                                                                          name=quot;displayMessageActionquot;
cards[2].getSuit() + quot; - quot; + cards[3].getNumber() + quot; quot;+ cards[3].getSuit() + quot; - quot; +
cards[4].getNumber() + quot; quot;+ cards[4].getSuit(); } public Card[] getCards(){ return                        class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot;
cards; } public int compareTo(PokerHand hand2) { int comparison = this.getGame()-                         process=quot;displayMessagequot; / !-- This can be replaced with notification --
hand2.getGame();      //desempate.       if(comparison==0){        Integer[]     criteriosHand2       =
                                                                                                          action name=quot;routequot;
hand2.getCriteriosDesempate(); Integer[] criteriosThis = this.getCriteriosDesempate();
                                                                                                          class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteNormalShippingquot;
for(int i=0;icriteriosThis.length;i++){ comparison = criteriosThis[i]-criteriosHand2[i];
                                                                                                          process=quot;sendResponsequot; / /actions /service!-- Express Shipping --
if(comparison!=0){ break; } } } return comparison; } /** * Retorna um array com as cartas
na ordem em que so consideradas para o * desempate de duas mos que tem o mesmo jogo. *                  service category=quot;ExpressShippingquot; name=quot;ExpressShippingServicequot;
* ex: KKKQQ retorna [K,Q] * ex: QQQKK retorna [Q,K] * ex: A2345 retorna [5, 4, 3, 2, A] *                 description=quot;Express Shipping Servicequot; listeners jms-listener
ex: TT245 retorna [T,5,4,2] * ex: T2245 retorna [2,T,5,4] * ex: flush 2379T retorna [T,
                                                                                                          name=quot;CBRExpressFreeShippingquot; busidref=quot;CBRExpressFreeShippingquot;/ /listeners
9,7,3,2] * * @return */ public Integer[] getCriteriosDesempate() { MapInteger, Integer
                                                                                                          actions mep=quot;OneWayquot; action name=quot;testStorequot;
mapa    =    this.countCards();       ListEntry       criterios    =    new    ArrayListEntry();
                                                                                                          class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action
criterios.addAll(mapa.entrySet()); Collections.sort(criterios, new ComparatorEntry(){ /
                                                                                                          name=quot;displayMessageActionquot;
** * Ordena primeiro pelo valor e depois pela chave * * @param o1 * @param o2 * @return
*/ public int compare(Entry o1, Entry o2) { int comparacao = ((Integer)o2.getValue()) -                   class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot;
((Integer)o1.getValue()); if (comparacao == 0) { comparacao = ((Integer)o2.getKey()) -                    process=quot;displayMessagequot; / !-- This can be replaced with notification --
((Integer)o1.getKey()); } return comparacao; } }); // extrai os keys dos entrysets
                                                                                                          action name=quot;routequot;
ordenados    Integer[]     retorno    =   new    Integer[criterios.size()];       for  (int    i=0    ;
                                                                                                          class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteExpressShippingquot;
icriterios.size() ; i++) { retorno[i] = (Integer) criterios.get(i).getKey(); } //
                                                                                                          process=quot;sendResponsequot; / /actions /service /services/jbossesb
straight comeando com ace if (isStraight()  retorno[4] == Card.TWO  retorno[0] ==
Card.ACE) { return new Integer[]{Card.FIVE, Card.FOUR, Card.THREE, Card.TWO, Card.ACE}; }
return retorno; } }



Friday, February 13, 2009
package    poker;      import      java.util.ArrayList;       import     java.util.Arrays;      import
java.util.Collection; import java.util.Collections; import java.util.Comparator; import
                                                                                                          ?xml version = quot;1.0quot; encoding = quot;UTF-8quot;? jbossesb xmlns=quot;http://
java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map;
                                                                                                          anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/
import java.util.Set; import java.util.Map.Entry; public class PokerHand { public static
final int HIGH_CARD = 0; public static final int ONE_PAIR = 1; public static final int                    jbossesb-1.0.1.xsdquot; parameterReloadSecs=quot;5quot;providers jms-provider
TWO_PAIRS = 2; public static final int THREE_OF_A_KIND = 3; public static final int                       name=quot;JBossMQquot; connection-factory=quot;ConnectionFactoryquot; jms-bus
STRAIGHT = 4; public static final int FLUSH = 5; public static final int FULL_HAND = 6;
                                                                                                          busid=quot;quickstartGwChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest-
public static final int FOUR_OF_A_KIND = 7; public static final int STRAIGHT_FLUSH = 8;
                                                                                                          name=quot;queue/quickstart_simple_cbr_Requestquot; / /jms-bus jms-bus
private Card[] cards = new Card[5]; public PokerHand(Card c1, Card c2, Card c3, Card c4,
                                                                                                          busid=quot;quickstartEsbChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest-
Card c5) throws InvalidHandException { cards[0] = c1; cards[1] = c2; cards[2] = c3;
                                                                                                          name=quot;queue/Bquot; / /jms-bus jms-bus busid=quot;CBRNormalShippingquot; jms-message-
cards[3] = c4; cards[4] = c5; if (!isValid()) throw new InvalidHandException(cards); }
private boolean isValid() { SetCard set = new HashSetCard(); for (Card c : cards)                     filter dest-type=quot;QUEUEquot; dest-name=quot;queue/CBRNormalShippingquot; / /jms-bus
set.add(c); if (set.size() != cards.length) return false; return true; } public int                       jms-bus busid=quot;CBRExpressFreeShippingquot; jms-message-filter dest-type=quot;QUEUEquot;
getGame() { MapInteger, Integer cardsCount = countCards(); CollectionInteger
                                                                                                          dest-name=quot;queue/CBRExpressFreeShippingquot; / /jms-bus/jms-provider /
combinations       =    cardsCount.values();          if     (combinations.contains(3))       {      if
                                                                                                          providersservices!-- ESB CBR Service -- service
(combinations.contains(2))       {   return    FULL_HAND;     }   return    THREE_OF_A_KIND;     }   if
                                                                                                          category=quot;MyFirstCBRServicesESBquot; name=quot;FirstCBRServiceESBquot; description=quot;ESB
(combinations.remove(2)) { if (combinations.contains(2)) { return TWO_PAIRS; } else
{   return    ONE_PAIR;    }   }    if(combinations.contains(4)){       return    FOUR_OF_A_KIND;     }   Listenerquot;  listeners !-- Gateway -- jms-listener name=quot;the-gatewayquot;
MapInteger,      Integer     suitCounter       =     countSuits();     if    (isStraight()){       if   busidref=quot;quickstartGwChannelquot; is-gateway=quot;truequot; / jms-listener
(suitCounter.values().contains(5)){ return STRAIGHT_FLUSH; } else { return STRAIGHT; } }
                                                                                                          name=quot;XPathContentBasedRouterquot; busidref=quot;quickstartEsbChannelquot; /jms-listener
if (suitCounter.values().contains(5)){ return FLUSH; } return HIGH_CARD; } private
                                                                                                          /listeners actions mep=quot;OneWayquot; action
MapInteger,     Integer    countSuits()     {    MapInteger,     Integer    suitCounter    =    new
                                                                                                          class=quot;org.jboss.soa.esb.actions.ContentBasedRouterquot; name=quot;ContentBasedRouterquot;
HashMapInteger,        Integer();        for       (Card      card      :      cards)      {       if
                                                                                                          property name=quot;ruleSetquot; value=quot;SimpleCBRRules-XPath.drlquot;/ property
(suitCounter.get(card.getSuit()) == null) { suitCounter.put(card.getSuit(), 1); } else


                                                                                                                          declarativamente
                          programaticamente
{ suitCounter.put(card.getSuit(), suitCounter.get(card.getSuit()) + 1); } } return                        name=quot;ruleLanguagequot; value=quot;XPathLanguage.dslquot;/ property name=quot;ruleReloadquot;
suitCounter; } /** * [ [k, 2], *         [q, 2], *       [T, 1]] * @return */ private MapInteger,        value=quot;truequot;/ property name=quot;destinationsquot; route-to destination-
Integer countCards() { MapInteger, Integer counter = new HashMapInteger, Integer();
                                                                                                          name=quot;expressquot; service-category=quot;ExpressShippingquot; service-
for    (Card     card    :    cards)     {     if     (counter.get(card.getNumber())      ==      null)
                                                                                                          name=quot;ExpressShippingServicequot;/ route-to destination-name=quot;normalquot; service-
{    counter.put(card.getNumber(),         1);     }     else    {    counter.put(card.getNumber(),
                                                                                                          category=quot;NormalShippingquot; service-name=quot;NormalShippingServicequot;/ /property
counter.get(card.getNumber()) + 1); }} return counter; }private boolean isStraight()
{ Arrays.sort(cards); int i = 1; int limit; //Verifica sequencia onde o straight termina                  /action /actions /service!-- Normal Shipping -- service
com ace if(cards[4].getNumber() == Card.ACE  cards[0].getNumber() == Card.TWO){ limit =                 category=quot;NormalShippingquot; name=quot;NormalShippingServicequot; description=quot;Normal
4; } else { limit = 5; } for (i=1 ; i  limit; i++) { if (cards[i - 1].getNumber() + 1 !=
                                                                                                          Shipping Servicequot; listeners jms-listener name=quot;CBRNormalShippingquot;
cards[i].getNumber()) return false; } return true; } @Override public String toString()
                                                                                                          busidref=quot;CBRNormalShippingquot;/ /listeners actions mep=quot;OneWayquot; action
{ return quot; quot; + cards[0].getNumber() + quot; quot;+ cards[0].getSuit() + quot; - quot; +
                                                                                                          name=quot;testStorequot; class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action
cards[1].getNumber() + quot; quot;+ cards[1].getSuit() + quot; - quot; + cards[2].getNumber() + quot; quot;+
                                                                                                          name=quot;displayMessageActionquot;
cards[2].getSuit() + quot; - quot; + cards[3].getNumber() + quot; quot;+ cards[3].getSuit() + quot; - quot; +
cards[4].getNumber() + quot; quot;+ cards[4].getSuit(); } public Card[] getCards(){ return                        class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot;
cards; } public int compareTo(PokerHand hand2) { int comparison = this.getGame()-                         process=quot;displayMessagequot; / !-- This can be replaced with notification --
hand2.getGame();      //desempate.       if(comparison==0){        Integer[]     criteriosHand2       =
                                                                                                          action name=quot;routequot;
hand2.getCriteriosDesempate(); Integer[] criteriosThis = this.getCriteriosDesempate();
                                                                                                          class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteNormalShippingquot;
for(int i=0;icriteriosThis.length;i++){ comparison = criteriosThis[i]-criteriosHand2[i];
                                                                                                          process=quot;sendResponsequot; / /actions /service!-- Express Shipping --
if(comparison!=0){ break; } } } return comparison; } /** * Retorna um array com as cartas
na ordem em que so consideradas para o * desempate de duas mos que tem o mesmo jogo. *                  service category=quot;ExpressShippingquot; name=quot;ExpressShippingServicequot;
* ex: KKKQQ retorna [K,Q] * ex: QQQKK retorna [Q,K] * ex: A2345 retorna [5, 4, 3, 2, A] *                 description=quot;Express Shipping Servicequot; listeners jms-listener
ex: TT245 retorna [T,5,4,2] * ex: T2245 retorna [2,T,5,4] * ex: flush 2379T retorna [T,
                                                                                                          name=quot;CBRExpressFreeShippingquot; busidref=quot;CBRExpressFreeShippingquot;/ /listeners
9,7,3,2] * * @return */ public Integer[] getCriteriosDesempate() { MapInteger, Integer
                                                                                                          actions mep=quot;OneWayquot; action name=quot;testStorequot;
mapa    =    this.countCards();       ListEntry       criterios    =    new    ArrayListEntry();
                                                                                                          class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action
criterios.addAll(mapa.entrySet()); Collections.sort(criterios, new ComparatorEntry(){ /
                                                                                                          name=quot;displayMessageActionquot;
** * Ordena primeiro pelo valor e depois pela chave * * @param o1 * @param o2 * @return
*/ public int compare(Entry o1, Entry o2) { int comparacao = ((Integer)o2.getValue()) -                   class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot;
((Integer)o1.getValue()); if (comparacao == 0) { comparacao = ((Integer)o2.getKey()) -                    process=quot;displayMessagequot; / !-- This can be replaced with notification --
((Integer)o1.getKey()); } return comparacao; } }); // extrai os keys dos entrysets
                                                                                                          action name=quot;routequot;
ordenados    Integer[]     retorno    =   new    Integer[criterios.size()];       for  (int    i=0    ;
                                                                                                          class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteExpressShippingquot;
icriterios.size() ; i++) { retorno[i] = (Integer) criterios.get(i).getKey(); } //
                                                                                                          process=quot;sendResponsequot; / /actions /service /services/jbossesb
straight comeando com ace if (isStraight()  retorno[4] == Card.TWO  retorno[0] ==
Card.ACE) { return new Integer[]{Card.FIVE, Card.FOUR, Card.THREE, Card.TWO, Card.ACE}; }
return retorno; } }



Friday, February 13, 2009
Lato Sensu em Sistemas Orientados a Objetos
                                  Laboratório de Tópicos Avançados - 2°/2008




                            Configuração declarativa de regras

Friday, February 13, 2009
Pra isso, usa-se um
                               Engine de Regras
                                         para

                            declaração          execução




Friday, February 13, 2009
Pra isso, usa-se um
                               Engine de Regras
                                          para

                             declaração          execução




Friday, February 13, 2009
regras




                  fatos     engine de regras   decisão
Friday, February 13, 2009
regras
                    +       +                      =
                                engine de regras       decisão
                  fatos




Friday, February 13, 2009
JBoss Rules
                               Drools
Friday, February 13, 2009
Lato Sensu em Sistemas Orientados a Objetos
                                          Laboratório de Tópicos Avançados - 2°/2008




                       Às vezes o processamento de uma mensagem
                         envolve vários serviços, que precisam ser
                                  coordenados entre si.
Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
!
                            S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
!
                            S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2         S3



                                      ESB




                                 S4         S5

Friday, February 13, 2009
S1        S2    S3



                                      ESB




                                 S4

Friday, February 13, 2009
!
                            S1        S2    S3



                                      ESB




                                 S4

Friday, February 13, 2009
!
                            S1        S2    S3



                                      ESB




                                 S4

Friday, February 13, 2009
S1        S2    S3



                                      ESB




                                 S4

Friday, February 13, 2009
ESB




Friday, February 13, 2009
Falta de coordenação pode levar à total
                                 perda de controle do ambiente




Friday, February 13, 2009
Torna-se então necessária a formalização de processos
Friday, February 13, 2009
Engine de Processos




Friday, February 13, 2009
Huguinho




                            Zezinho




                            Luizinho




Friday, February 13, 2009
JBoss jBPM
Friday, February 13, 2009
JBoss SOA Platform
Friday, February 13, 2009
PR
                            alexandre.gomes@seatecnologia.com.br
                             blog.seatecnologia.com.br



Friday, February 13, 2009

Contenu connexe

En vedette

Mercadeo de servicio maiyer
Mercadeo de servicio maiyerMercadeo de servicio maiyer
Mercadeo de servicio maiyerdillinger06
 
Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...
Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...
Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...Joshep Lujan
 
Wet aanpak-fraude-toeslagen-2014-1
Wet aanpak-fraude-toeslagen-2014-1Wet aanpak-fraude-toeslagen-2014-1
Wet aanpak-fraude-toeslagen-2014-1Siebe Sietsma
 
Unidad I Introduccion a Señales Y Sistemas
Unidad I Introduccion a Señales Y SistemasUnidad I Introduccion a Señales Y Sistemas
Unidad I Introduccion a Señales Y SistemasGrupo05N
 
Aba guidelines for_asd
Aba guidelines for_asdAba guidelines for_asd
Aba guidelines for_asdMarta Montoro
 
Termo de Referência / Drenagem da Região Oceânica de Niterói
Termo de Referência / Drenagem da Região Oceânica de NiteróiTermo de Referência / Drenagem da Região Oceânica de Niterói
Termo de Referência / Drenagem da Região Oceânica de NiteróiFelipe Peixoto
 
Leyes BáSicas De Exponentes Tutorial
Leyes BáSicas De Exponentes TutorialLeyes BáSicas De Exponentes Tutorial
Leyes BáSicas De Exponentes Tutorialalbertoruiz
 
vectores 1º bachillerato
vectores 1º bachilleratovectores 1º bachillerato
vectores 1º bachilleratoboletinesmarcos
 
Implementación de Sistema de Transferencia Interbancaria - Cierre
Implementación de Sistema de Transferencia Interbancaria - CierreImplementación de Sistema de Transferencia Interbancaria - Cierre
Implementación de Sistema de Transferencia Interbancaria - CierreDharma Consulting
 
Negocios empresariales
Negocios empresarialesNegocios empresariales
Negocios empresarialesmego2011
 
Guía de práctica clínica sobre el trastorno por déficit de atención
Guía de práctica clínica sobre el trastorno por déficit de atenciónGuía de práctica clínica sobre el trastorno por déficit de atención
Guía de práctica clínica sobre el trastorno por déficit de atenciónEmmanuel Oquendo
 
Tecnico+en+sistemas+v1
Tecnico+en+sistemas+v1Tecnico+en+sistemas+v1
Tecnico+en+sistemas+v1Karla Preciado
 
Sistemas de vigilancia epidemiologicos
Sistemas de vigilancia epidemiologicosSistemas de vigilancia epidemiologicos
Sistemas de vigilancia epidemiologicosBetzabe Reyes
 

En vedette (19)

Mercadeo de servicio maiyer
Mercadeo de servicio maiyerMercadeo de servicio maiyer
Mercadeo de servicio maiyer
 
1.03 exponentes enteros
1.03 exponentes enteros1.03 exponentes enteros
1.03 exponentes enteros
 
Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...
Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...
Propuesta para la Preparación de la Certificación CMMI Nivel 2 de Pymes Desar...
 
Wet aanpak-fraude-toeslagen-2014-1
Wet aanpak-fraude-toeslagen-2014-1Wet aanpak-fraude-toeslagen-2014-1
Wet aanpak-fraude-toeslagen-2014-1
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Unidad I Introduccion a Señales Y Sistemas
Unidad I Introduccion a Señales Y SistemasUnidad I Introduccion a Señales Y Sistemas
Unidad I Introduccion a Señales Y Sistemas
 
Aba guidelines for_asd
Aba guidelines for_asdAba guidelines for_asd
Aba guidelines for_asd
 
Termo de Referência / Drenagem da Região Oceânica de Niterói
Termo de Referência / Drenagem da Região Oceânica de NiteróiTermo de Referência / Drenagem da Região Oceânica de Niterói
Termo de Referência / Drenagem da Região Oceânica de Niterói
 
Leyes BáSicas De Exponentes Tutorial
Leyes BáSicas De Exponentes TutorialLeyes BáSicas De Exponentes Tutorial
Leyes BáSicas De Exponentes Tutorial
 
vectores 1º bachillerato
vectores 1º bachilleratovectores 1º bachillerato
vectores 1º bachillerato
 
Implementación de Sistema de Transferencia Interbancaria - Cierre
Implementación de Sistema de Transferencia Interbancaria - CierreImplementación de Sistema de Transferencia Interbancaria - Cierre
Implementación de Sistema de Transferencia Interbancaria - Cierre
 
Negociacion
NegociacionNegociacion
Negociacion
 
Negocios empresariales
Negocios empresarialesNegocios empresariales
Negocios empresariales
 
Guía de práctica clínica sobre el trastorno por déficit de atención
Guía de práctica clínica sobre el trastorno por déficit de atenciónGuía de práctica clínica sobre el trastorno por déficit de atención
Guía de práctica clínica sobre el trastorno por déficit de atención
 
Tecnico+en+sistemas+v1
Tecnico+en+sistemas+v1Tecnico+en+sistemas+v1
Tecnico+en+sistemas+v1
 
"Somos Físicos" Substâncias e Misturas
"Somos Físicos" Substâncias e Misturas"Somos Físicos" Substâncias e Misturas
"Somos Físicos" Substâncias e Misturas
 
Factores
FactoresFactores
Factores
 
Alfabetizaçao e letramento
Alfabetizaçao e letramentoAlfabetizaçao e letramento
Alfabetizaçao e letramento
 
Sistemas de vigilancia epidemiologicos
Sistemas de vigilancia epidemiologicosSistemas de vigilancia epidemiologicos
Sistemas de vigilancia epidemiologicos
 

Plus de SEA Tecnologia

Loomio how to Series - Working on a Discussion
Loomio how to Series - Working on a DiscussionLoomio how to Series - Working on a Discussion
Loomio how to Series - Working on a DiscussionSEA Tecnologia
 
Loomio how to Series - Creating a new Group of People
Loomio how to Series - Creating a new Group of PeopleLoomio how to Series - Creating a new Group of People
Loomio how to Series - Creating a new Group of PeopleSEA Tecnologia
 
Loomio how to Series - Creating a new Discussion
Loomio how to Series - Creating a new DiscussionLoomio how to Series - Creating a new Discussion
Loomio how to Series - Creating a new DiscussionSEA Tecnologia
 
Gerentes em Crise existencial - Existimos no Universo Ágil?
Gerentes em Crise existencial - Existimos no Universo Ágil?Gerentes em Crise existencial - Existimos no Universo Ágil?
Gerentes em Crise existencial - Existimos no Universo Ágil?SEA Tecnologia
 
O curioso caso de Náutilus Button
O curioso caso de Náutilus ButtonO curioso caso de Náutilus Button
O curioso caso de Náutilus ButtonSEA Tecnologia
 
Contratos de desenvolvimento de software para governo blue pill or red pill?
Contratos de desenvolvimento de software para governo  blue pill or red pill?Contratos de desenvolvimento de software para governo  blue pill or red pill?
Contratos de desenvolvimento de software para governo blue pill or red pill?SEA Tecnologia
 
Os benefícios e desafios da participação pública digital
Os benefícios e desafios da participação pública digitalOs benefícios e desafios da participação pública digital
Os benefícios e desafios da participação pública digitalSEA Tecnologia
 
A escola do século XXI deve ser ágil, enxuta e empreendedora.
A escola do século XXI deve ser ágil, enxuta e empreendedora.A escola do século XXI deve ser ágil, enxuta e empreendedora.
A escola do século XXI deve ser ágil, enxuta e empreendedora.SEA Tecnologia
 
Open data, scraping e thacks com Software Livre
Open data, scraping e thacks com Software LivreOpen data, scraping e thacks com Software Livre
Open data, scraping e thacks com Software LivreSEA Tecnologia
 
Agilidade dos projetos à empresa, uma história de Intracontágio
Agilidade dos projetos à empresa, uma história de IntracontágioAgilidade dos projetos à empresa, uma história de Intracontágio
Agilidade dos projetos à empresa, uma história de IntracontágioSEA Tecnologia
 
Roadshow Brasília Novas funcionalidades Liferay 6
Roadshow Brasília Novas funcionalidades Liferay 6Roadshow Brasília Novas funcionalidades Liferay 6
Roadshow Brasília Novas funcionalidades Liferay 6SEA Tecnologia
 
Roadshow Liferay no Brasil 2010
Roadshow Liferay no Brasil 2010Roadshow Liferay no Brasil 2010
Roadshow Liferay no Brasil 2010SEA Tecnologia
 
Sem tesão não há solução
Sem tesão não há soluçãoSem tesão não há solução
Sem tesão não há soluçãoSEA Tecnologia
 
Empreendimentos em Rede
Empreendimentos em RedeEmpreendimentos em Rede
Empreendimentos em RedeSEA Tecnologia
 

Plus de SEA Tecnologia (20)

Loomio how to Series - Working on a Discussion
Loomio how to Series - Working on a DiscussionLoomio how to Series - Working on a Discussion
Loomio how to Series - Working on a Discussion
 
Loomio how to Series - Creating a new Group of People
Loomio how to Series - Creating a new Group of PeopleLoomio how to Series - Creating a new Group of People
Loomio how to Series - Creating a new Group of People
 
Loomio how to Series - Creating a new Discussion
Loomio how to Series - Creating a new DiscussionLoomio how to Series - Creating a new Discussion
Loomio how to Series - Creating a new Discussion
 
Gerentes em Crise existencial - Existimos no Universo Ágil?
Gerentes em Crise existencial - Existimos no Universo Ágil?Gerentes em Crise existencial - Existimos no Universo Ágil?
Gerentes em Crise existencial - Existimos no Universo Ágil?
 
O curioso caso de Náutilus Button
O curioso caso de Náutilus ButtonO curioso caso de Náutilus Button
O curioso caso de Náutilus Button
 
Contratos de desenvolvimento de software para governo blue pill or red pill?
Contratos de desenvolvimento de software para governo  blue pill or red pill?Contratos de desenvolvimento de software para governo  blue pill or red pill?
Contratos de desenvolvimento de software para governo blue pill or red pill?
 
#Fail
#Fail#Fail
#Fail
 
Agilidade no Governo
Agilidade no GovernoAgilidade no Governo
Agilidade no Governo
 
Os benefícios e desafios da participação pública digital
Os benefícios e desafios da participação pública digitalOs benefícios e desafios da participação pública digital
Os benefícios e desafios da participação pública digital
 
A escola do século XXI deve ser ágil, enxuta e empreendedora.
A escola do século XXI deve ser ágil, enxuta e empreendedora.A escola do século XXI deve ser ágil, enxuta e empreendedora.
A escola do século XXI deve ser ágil, enxuta e empreendedora.
 
Lean Startup
Lean StartupLean Startup
Lean Startup
 
Open Data
Open DataOpen Data
Open Data
 
Open data, scraping e thacks com Software Livre
Open data, scraping e thacks com Software LivreOpen data, scraping e thacks com Software Livre
Open data, scraping e thacks com Software Livre
 
Agilidade dos projetos à empresa, uma história de Intracontágio
Agilidade dos projetos à empresa, uma história de IntracontágioAgilidade dos projetos à empresa, uma história de Intracontágio
Agilidade dos projetos à empresa, uma história de Intracontágio
 
Roadshow Brasília Novas funcionalidades Liferay 6
Roadshow Brasília Novas funcionalidades Liferay 6Roadshow Brasília Novas funcionalidades Liferay 6
Roadshow Brasília Novas funcionalidades Liferay 6
 
Roadshow Liferay no Brasil 2010
Roadshow Liferay no Brasil 2010Roadshow Liferay no Brasil 2010
Roadshow Liferay no Brasil 2010
 
Sem tesão não há solução
Sem tesão não há soluçãoSem tesão não há solução
Sem tesão não há solução
 
Empreendimentos em Rede
Empreendimentos em RedeEmpreendimentos em Rede
Empreendimentos em Rede
 
Java Profiling Tools
Java Profiling ToolsJava Profiling Tools
Java Profiling Tools
 
Misc Monitoring Tools
Misc Monitoring ToolsMisc Monitoring Tools
Misc Monitoring Tools
 

Dernier

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Dernier (20)

How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

Workshop De SOA - Level 1

  • 1. Workshop de SOA Level 1 Friday, February 13, 2009
  • 3. Objetivo Mostrar o caminho que SOA tem seguido Friday, February 13, 2009
  • 4. 2000 W 3C Friday, February 13, 2009 2001 2002 2003 2004 2005 2006 2007 2008
  • 7. serviço arquitetura Friday, February 13, 2009
  • 8. infra-estrutura serviço arquitetura Friday, February 13, 2009
  • 9. padrão infra-estrutura serviço arquitetura Friday, February 13, 2009
  • 10. padrão infra-estrutura serviço arquitetura método Friday, February 13, 2009
  • 11. padrão infra-estrutura interoperabilidade serviço arquitetura método Friday, February 13, 2009
  • 12. padrão infra-estrutura interoperabilidade serviço arquitetura intercâmbio método Friday, February 13, 2009
  • 13. padrão infra-estrutura interoperabilidade serviço arquitetura mensagem intercâmbio método Friday, February 13, 2009
  • 14. padrão infra-estrutura interoperabilidade serviço arquitetura mensagem intercâmbio método integração Friday, February 13, 2009
  • 15. padrão infra-estrutura interoperabilidade desacoplamento serviço arquitetura mensagem intercâmbio método integração Friday, February 13, 2009
  • 16. padrão coordenação infra-estrutura interoperabilidade desacoplamento serviço arquitetura mensagem intercâmbio método integração Friday, February 13, 2009
  • 17. padrão coordenação orquestração infra-estrutura interoperabilidade desacoplamento serviço arquitetura mensagem intercâmbio método integração Friday, February 13, 2009
  • 18. padrão coordenação orquestração infra-estrutura interoperabilidade desacoplamento serviço processos arquitetura de negócio mensagem intercâmbio método integração Friday, February 13, 2009
  • 19. padrão coordenação orquestração infra-estrutura interoperabilidade desacoplamento serviço processos arquitetura de negócio mensagem intercâmbio reuso método integração Friday, February 13, 2009
  • 23. C P R Friday, February 13, 2009
  • 24. A B R O C C P R Friday, February 13, 2009
  • 25. I MA RB R O C C P R Friday, February 13, 2009
  • 26. s ce vi r eSI b e W RM A B R O C C P R Friday, February 13, 2009
  • 32. Soluções Silver Bullet Friday, February 13, 2009
  • 33. prome$$a$ Soluções Silver Bullet Friday, February 13, 2009
  • 35. Implantação árdua e demorada Friday, February 13, 2009
  • 37. 2005 SOA nem que seja na marra! Friday, February 13, 2009
  • 40. Falta de escalabilidade Friday, February 13, 2009
  • 41. Interview John Crupi on Enterprise SOA So service oriented architecture, hype or reality? A little of both there's a lot of hype behind it. (...) it's architectural driven and if you don't have the architecture in place there's no product that out of the box will give you SOA today. Friday, February 13, 2009
  • 43. #1 SOA tem a ver com filosofia e não com tecnologia Friday, February 13, 2009
  • 44. #2 SOA tem a ver com R.O.I. Friday, February 13, 2009
  • 45. #3 SOA tem a ver com governança de ativos Friday, February 13, 2009
  • 46. Article Quest for True SOA Posted by Alex Maclinovsky on Sep 10, 2008 According to these definitions, SOA Governance is what turns Enterprise Services from digital artifacts into true business assets by allowing responsible reuse across the domains of control of SOA participants Friday, February 13, 2009
  • 48. Software também é patrimônio Friday, February 13, 2009
  • 49. Lato Sensu em Sistemas Orientados a Objetos Laboratório de Tópicos Avançados - 2°/2008 Antes de trocar, você reforma Friday, February 13, 2009
  • 50. Lato Sensu em Sistemas Orientados a Objetos Laboratório de Tópicos Avançados - 2°/2008 ...até a última ponta gota Friday, February 13, 2009
  • 51. Article SOA Governance: An Enterprise View Posted by Michael Poulin on Aug 20, 2008 03:54 AM Friday, February 13, 2009
  • 52. Article SOA Governance: An Enterprise View Posted by Michael Poulin on Aug 20, 2008 03:54 AM (...)organisations were assured that SOA was new IT technology for integration and reuse of existing assets. Friday, February 13, 2009
  • 53. Article SOA Governance: An Enterprise View Posted by Michael Poulin on Aug 20, 2008 03:54 AM Very few succeeded and went forward Friday, February 13, 2009
  • 54. Article SOA Governance: An Enterprise View Posted by Michael Poulin on Aug 20, 2008 03:54 AM Other organisations failed in gaining promised ROI and time to market Friday, February 13, 2009
  • 55. Interview Jim Webber on quot;Guerilla SOAquot; A lot of SOA projects I have seen, have been somewhat akin to mobilizing an army. We want to address specific discrete business problems, organized by priorities according to the business stakeholder and get those processes implemented rapidly in an incremental way with feedback. lots of Friday, February 13, 2009
  • 56. Major changes in technology have not been driven by the technologies themselves but by the change in thinking that they enabled. Friday, February 13, 2009
  • 57. “Enterprises around the world are increasingly pursuing the core business benefits of Service-Oriented Architecture (SOA)—business agility, reduction in integration expense, greater asset reuse, and improved business visibility. And yet, many large organizations are running into roadblocks with their heavyweight, enterprise-wide SOA initiatives. As an alternative, many organizations are finding a “right weight,” step-by-step approach to SOA is more effective and lowers risk as well.” SIMPLIFYING SOA LOW RISK, HIGH VALUE, “RIGHT WEIGHT” SOA December 2007 Analyst: Jason Bloomberg Friday, February 13, 2009
  • 58. Economically, quot;right-sourcingquot; is far more eficient than quot;outsourcingquot; and SaaS. Friday, February 13, 2009
  • 59. Interview Stefan Tilkov on SOA Why SOA? Why now? What's actually new? (...) What I think is exciting is the fact that it creates, or at least that it is perceived to create the opportunity to align business and technology. Friday, February 13, 2009
  • 60. Visão moderna de SOA Friday, February 13, 2009
  • 61. estilo Visão moderna de SOA Friday, February 13, 2009
  • 62. estilo Visão moderna de SOA lucro Friday, February 13, 2009
  • 63. estilo Visão moderna de SOA lucro ROI Friday, February 13, 2009
  • 64. estilo reaproveitamento Visão moderna de SOA lucro ROI Friday, February 13, 2009
  • 65. estilo ativos reaproveitamento Visão moderna de SOA lucro ROI Friday, February 13, 2009
  • 66. estilo ativos reaproveitamento Visão moderna de SOA lucro agilidade ROI Friday, February 13, 2009
  • 67. estilo ativos reaproveitamento Visão moderna de SOA lucro agilidade efetividade ROI Friday, February 13, 2009
  • 68. Legados ativos Friday, February 13, 2009
  • 69. Novos legados estão sempre chegando Friday, February 13, 2009
  • 70. Novos legados estão sempre chegando Friday, February 13, 2009
  • 71. Novos legados estão sempre chegando Friday, February 13, 2009
  • 73. Como integrá-los? ponto a ponto S1 S2 S3 S4 Friday, February 13, 2009
  • 74. Como integrá-los? estrela S1 S2 broker hub bus S3 S4 Friday, February 13, 2009
  • 76. Integracão ponto-a-ponto direta CORBA RMI WebServices S1 S2 REST S3 S4 Friday, February 13, 2009
  • 77. Integracão estrela indireta Enterprise Service Bus Friday, February 13, 2009
  • 78. Enterprise Service Bus facilitador da integração entre serviços Friday, February 13, 2009
  • 79. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 80. ! S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 81. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 82. S1 S2 S3 ESB ! S4 S5 Friday, February 13, 2009
  • 83. JBoss ESB Rosetta Friday, February 13, 2009
  • 84. Lato Sensu em Sistemas Orientados a Objetos Laboratório de Tópicos Avançados - 2°/2008 Na vida real, as coisas não são tão simples assim Friday, February 13, 2009
  • 85. Lato Sensu em Sistemas Orientados a Objetos Laboratório de Tópicos Avançados - 2°/2008 Nem sempre as peças se encaixam Friday, February 13, 2009
  • 86. Nem sempre os serviços falam a mesma língua Friday, February 13, 2009
  • 87. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 88. ! S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 89. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 90. S1 S2 S3 ESB ! S4 S5 Friday, February 13, 2009
  • 91. Lato Sensu em Sistemas Orientados a Objetos Laboratório de Tópicos Avançados - 2°/2008 Nem sempre o destino da mensagem é conhecido Friday, February 13, 2009
  • 92. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 93. ! S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 94. S1 S2 S3 ? ESB S4 S5 Friday, February 13, 2009
  • 95. S1 S2 S3 ? ESB S4 S5 Friday, February 13, 2009
  • 96. S1 S2 S3 ! ESB S4 S5 Friday, February 13, 2009
  • 97. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 98. S1 S2 S3 ESB ! S4 S5 Friday, February 13, 2009
  • 99. ? Como tomar esta decisão? Friday, February 13, 2009
  • 100. package poker; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import ?xml version = quot;1.0quot; encoding = quot;UTF-8quot;? jbossesb xmlns=quot;http:// java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/ import java.util.Set; import java.util.Map.Entry; public class PokerHand { public static final int HIGH_CARD = 0; public static final int ONE_PAIR = 1; public static final int jbossesb-1.0.1.xsdquot; parameterReloadSecs=quot;5quot;providers jms-provider TWO_PAIRS = 2; public static final int THREE_OF_A_KIND = 3; public static final int name=quot;JBossMQquot; connection-factory=quot;ConnectionFactoryquot; jms-bus STRAIGHT = 4; public static final int FLUSH = 5; public static final int FULL_HAND = 6; busid=quot;quickstartGwChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest- public static final int FOUR_OF_A_KIND = 7; public static final int STRAIGHT_FLUSH = 8; name=quot;queue/quickstart_simple_cbr_Requestquot; / /jms-bus jms-bus private Card[] cards = new Card[5]; public PokerHand(Card c1, Card c2, Card c3, Card c4, busid=quot;quickstartEsbChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest- Card c5) throws InvalidHandException { cards[0] = c1; cards[1] = c2; cards[2] = c3; name=quot;queue/Bquot; / /jms-bus jms-bus busid=quot;CBRNormalShippingquot; jms-message- cards[3] = c4; cards[4] = c5; if (!isValid()) throw new InvalidHandException(cards); } private boolean isValid() { SetCard set = new HashSetCard(); for (Card c : cards) filter dest-type=quot;QUEUEquot; dest-name=quot;queue/CBRNormalShippingquot; / /jms-bus set.add(c); if (set.size() != cards.length) return false; return true; } public int jms-bus busid=quot;CBRExpressFreeShippingquot; jms-message-filter dest-type=quot;QUEUEquot; getGame() { MapInteger, Integer cardsCount = countCards(); CollectionInteger dest-name=quot;queue/CBRExpressFreeShippingquot; / /jms-bus/jms-provider / combinations = cardsCount.values(); if (combinations.contains(3)) { if providersservices!-- ESB CBR Service -- service (combinations.contains(2)) { return FULL_HAND; } return THREE_OF_A_KIND; } if category=quot;MyFirstCBRServicesESBquot; name=quot;FirstCBRServiceESBquot; description=quot;ESB (combinations.remove(2)) { if (combinations.contains(2)) { return TWO_PAIRS; } else ? { return ONE_PAIR; } } if(combinations.contains(4)){ return FOUR_OF_A_KIND; } Listenerquot; listeners !-- Gateway -- jms-listener name=quot;the-gatewayquot; MapInteger, Integer suitCounter = countSuits(); if (isStraight()){ if busidref=quot;quickstartGwChannelquot; is-gateway=quot;truequot; / jms-listener (suitCounter.values().contains(5)){ return STRAIGHT_FLUSH; } else { return STRAIGHT; } } name=quot;XPathContentBasedRouterquot; busidref=quot;quickstartEsbChannelquot; /jms-listener if (suitCounter.values().contains(5)){ return FLUSH; } return HIGH_CARD; } private /listeners actions mep=quot;OneWayquot; action MapInteger, Integer countSuits() { MapInteger, Integer suitCounter = new class=quot;org.jboss.soa.esb.actions.ContentBasedRouterquot; name=quot;ContentBasedRouterquot; HashMapInteger, Integer(); for (Card card : cards) { if property name=quot;ruleSetquot; value=quot;SimpleCBRRules-XPath.drlquot;/ property (suitCounter.get(card.getSuit()) == null) { suitCounter.put(card.getSuit(), 1); } else programaticamente declarativamente { suitCounter.put(card.getSuit(), suitCounter.get(card.getSuit()) + 1); } } return name=quot;ruleLanguagequot; value=quot;XPathLanguage.dslquot;/ property name=quot;ruleReloadquot; suitCounter; } /** * [ [k, 2], * [q, 2], * [T, 1]] * @return */ private MapInteger, value=quot;truequot;/ property name=quot;destinationsquot; route-to destination- Integer countCards() { MapInteger, Integer counter = new HashMapInteger, Integer(); name=quot;expressquot; service-category=quot;ExpressShippingquot; service- for (Card card : cards) { if (counter.get(card.getNumber()) == null) name=quot;ExpressShippingServicequot;/ route-to destination-name=quot;normalquot; service- { counter.put(card.getNumber(), 1); } else { counter.put(card.getNumber(), category=quot;NormalShippingquot; service-name=quot;NormalShippingServicequot;/ /property counter.get(card.getNumber()) + 1); }} return counter; }private boolean isStraight() { Arrays.sort(cards); int i = 1; int limit; //Verifica sequencia onde o straight termina /action /actions /service!-- Normal Shipping -- service com ace if(cards[4].getNumber() == Card.ACE cards[0].getNumber() == Card.TWO){ limit = category=quot;NormalShippingquot; name=quot;NormalShippingServicequot; description=quot;Normal 4; } else { limit = 5; } for (i=1 ; i limit; i++) { if (cards[i - 1].getNumber() + 1 != Shipping Servicequot; listeners jms-listener name=quot;CBRNormalShippingquot; cards[i].getNumber()) return false; } return true; } @Override public String toString() busidref=quot;CBRNormalShippingquot;/ /listeners actions mep=quot;OneWayquot; action { return quot; quot; + cards[0].getNumber() + quot; quot;+ cards[0].getSuit() + quot; - quot; + name=quot;testStorequot; class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action cards[1].getNumber() + quot; quot;+ cards[1].getSuit() + quot; - quot; + cards[2].getNumber() + quot; quot;+ name=quot;displayMessageActionquot; cards[2].getSuit() + quot; - quot; + cards[3].getNumber() + quot; quot;+ cards[3].getSuit() + quot; - quot; + cards[4].getNumber() + quot; quot;+ cards[4].getSuit(); } public Card[] getCards(){ return class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot; cards; } public int compareTo(PokerHand hand2) { int comparison = this.getGame()- process=quot;displayMessagequot; / !-- This can be replaced with notification -- hand2.getGame(); //desempate. if(comparison==0){ Integer[] criteriosHand2 = action name=quot;routequot; hand2.getCriteriosDesempate(); Integer[] criteriosThis = this.getCriteriosDesempate(); class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteNormalShippingquot; for(int i=0;icriteriosThis.length;i++){ comparison = criteriosThis[i]-criteriosHand2[i]; process=quot;sendResponsequot; / /actions /service!-- Express Shipping -- if(comparison!=0){ break; } } } return comparison; } /** * Retorna um array com as cartas na ordem em que so consideradas para o * desempate de duas mos que tem o mesmo jogo. * service category=quot;ExpressShippingquot; name=quot;ExpressShippingServicequot; * ex: KKKQQ retorna [K,Q] * ex: QQQKK retorna [Q,K] * ex: A2345 retorna [5, 4, 3, 2, A] * description=quot;Express Shipping Servicequot; listeners jms-listener ex: TT245 retorna [T,5,4,2] * ex: T2245 retorna [2,T,5,4] * ex: flush 2379T retorna [T, name=quot;CBRExpressFreeShippingquot; busidref=quot;CBRExpressFreeShippingquot;/ /listeners 9,7,3,2] * * @return */ public Integer[] getCriteriosDesempate() { MapInteger, Integer actions mep=quot;OneWayquot; action name=quot;testStorequot; mapa = this.countCards(); ListEntry criterios = new ArrayListEntry(); class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action criterios.addAll(mapa.entrySet()); Collections.sort(criterios, new ComparatorEntry(){ / name=quot;displayMessageActionquot; ** * Ordena primeiro pelo valor e depois pela chave * * @param o1 * @param o2 * @return */ public int compare(Entry o1, Entry o2) { int comparacao = ((Integer)o2.getValue()) - class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot; ((Integer)o1.getValue()); if (comparacao == 0) { comparacao = ((Integer)o2.getKey()) - process=quot;displayMessagequot; / !-- This can be replaced with notification -- ((Integer)o1.getKey()); } return comparacao; } }); // extrai os keys dos entrysets action name=quot;routequot; ordenados Integer[] retorno = new Integer[criterios.size()]; for (int i=0 ; class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteExpressShippingquot; icriterios.size() ; i++) { retorno[i] = (Integer) criterios.get(i).getKey(); } // process=quot;sendResponsequot; / /actions /service /services/jbossesb straight comeando com ace if (isStraight() retorno[4] == Card.TWO retorno[0] == Card.ACE) { return new Integer[]{Card.FIVE, Card.FOUR, Card.THREE, Card.TWO, Card.ACE}; } return retorno; } } Friday, February 13, 2009
  • 101. package poker; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import ?xml version = quot;1.0quot; encoding = quot;UTF-8quot;? jbossesb xmlns=quot;http:// java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/ import java.util.Set; import java.util.Map.Entry; public class PokerHand { public static final int HIGH_CARD = 0; public static final int ONE_PAIR = 1; public static final int jbossesb-1.0.1.xsdquot; parameterReloadSecs=quot;5quot;providers jms-provider TWO_PAIRS = 2; public static final int THREE_OF_A_KIND = 3; public static final int name=quot;JBossMQquot; connection-factory=quot;ConnectionFactoryquot; jms-bus STRAIGHT = 4; public static final int FLUSH = 5; public static final int FULL_HAND = 6; busid=quot;quickstartGwChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest- public static final int FOUR_OF_A_KIND = 7; public static final int STRAIGHT_FLUSH = 8; name=quot;queue/quickstart_simple_cbr_Requestquot; / /jms-bus jms-bus private Card[] cards = new Card[5]; public PokerHand(Card c1, Card c2, Card c3, Card c4, busid=quot;quickstartEsbChannelquot; jms-message-filter dest-type=quot;QUEUEquot; dest- Card c5) throws InvalidHandException { cards[0] = c1; cards[1] = c2; cards[2] = c3; name=quot;queue/Bquot; / /jms-bus jms-bus busid=quot;CBRNormalShippingquot; jms-message- cards[3] = c4; cards[4] = c5; if (!isValid()) throw new InvalidHandException(cards); } private boolean isValid() { SetCard set = new HashSetCard(); for (Card c : cards) filter dest-type=quot;QUEUEquot; dest-name=quot;queue/CBRNormalShippingquot; / /jms-bus set.add(c); if (set.size() != cards.length) return false; return true; } public int jms-bus busid=quot;CBRExpressFreeShippingquot; jms-message-filter dest-type=quot;QUEUEquot; getGame() { MapInteger, Integer cardsCount = countCards(); CollectionInteger dest-name=quot;queue/CBRExpressFreeShippingquot; / /jms-bus/jms-provider / combinations = cardsCount.values(); if (combinations.contains(3)) { if providersservices!-- ESB CBR Service -- service (combinations.contains(2)) { return FULL_HAND; } return THREE_OF_A_KIND; } if category=quot;MyFirstCBRServicesESBquot; name=quot;FirstCBRServiceESBquot; description=quot;ESB (combinations.remove(2)) { if (combinations.contains(2)) { return TWO_PAIRS; } else { return ONE_PAIR; } } if(combinations.contains(4)){ return FOUR_OF_A_KIND; } Listenerquot; listeners !-- Gateway -- jms-listener name=quot;the-gatewayquot; MapInteger, Integer suitCounter = countSuits(); if (isStraight()){ if busidref=quot;quickstartGwChannelquot; is-gateway=quot;truequot; / jms-listener (suitCounter.values().contains(5)){ return STRAIGHT_FLUSH; } else { return STRAIGHT; } } name=quot;XPathContentBasedRouterquot; busidref=quot;quickstartEsbChannelquot; /jms-listener if (suitCounter.values().contains(5)){ return FLUSH; } return HIGH_CARD; } private /listeners actions mep=quot;OneWayquot; action MapInteger, Integer countSuits() { MapInteger, Integer suitCounter = new class=quot;org.jboss.soa.esb.actions.ContentBasedRouterquot; name=quot;ContentBasedRouterquot; HashMapInteger, Integer(); for (Card card : cards) { if property name=quot;ruleSetquot; value=quot;SimpleCBRRules-XPath.drlquot;/ property (suitCounter.get(card.getSuit()) == null) { suitCounter.put(card.getSuit(), 1); } else declarativamente programaticamente { suitCounter.put(card.getSuit(), suitCounter.get(card.getSuit()) + 1); } } return name=quot;ruleLanguagequot; value=quot;XPathLanguage.dslquot;/ property name=quot;ruleReloadquot; suitCounter; } /** * [ [k, 2], * [q, 2], * [T, 1]] * @return */ private MapInteger, value=quot;truequot;/ property name=quot;destinationsquot; route-to destination- Integer countCards() { MapInteger, Integer counter = new HashMapInteger, Integer(); name=quot;expressquot; service-category=quot;ExpressShippingquot; service- for (Card card : cards) { if (counter.get(card.getNumber()) == null) name=quot;ExpressShippingServicequot;/ route-to destination-name=quot;normalquot; service- { counter.put(card.getNumber(), 1); } else { counter.put(card.getNumber(), category=quot;NormalShippingquot; service-name=quot;NormalShippingServicequot;/ /property counter.get(card.getNumber()) + 1); }} return counter; }private boolean isStraight() { Arrays.sort(cards); int i = 1; int limit; //Verifica sequencia onde o straight termina /action /actions /service!-- Normal Shipping -- service com ace if(cards[4].getNumber() == Card.ACE cards[0].getNumber() == Card.TWO){ limit = category=quot;NormalShippingquot; name=quot;NormalShippingServicequot; description=quot;Normal 4; } else { limit = 5; } for (i=1 ; i limit; i++) { if (cards[i - 1].getNumber() + 1 != Shipping Servicequot; listeners jms-listener name=quot;CBRNormalShippingquot; cards[i].getNumber()) return false; } return true; } @Override public String toString() busidref=quot;CBRNormalShippingquot;/ /listeners actions mep=quot;OneWayquot; action { return quot; quot; + cards[0].getNumber() + quot; quot;+ cards[0].getSuit() + quot; - quot; + name=quot;testStorequot; class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action cards[1].getNumber() + quot; quot;+ cards[1].getSuit() + quot; - quot; + cards[2].getNumber() + quot; quot;+ name=quot;displayMessageActionquot; cards[2].getSuit() + quot; - quot; + cards[3].getNumber() + quot; quot;+ cards[3].getSuit() + quot; - quot; + cards[4].getNumber() + quot; quot;+ cards[4].getSuit(); } public Card[] getCards(){ return class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot; cards; } public int compareTo(PokerHand hand2) { int comparison = this.getGame()- process=quot;displayMessagequot; / !-- This can be replaced with notification -- hand2.getGame(); //desempate. if(comparison==0){ Integer[] criteriosHand2 = action name=quot;routequot; hand2.getCriteriosDesempate(); Integer[] criteriosThis = this.getCriteriosDesempate(); class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteNormalShippingquot; for(int i=0;icriteriosThis.length;i++){ comparison = criteriosThis[i]-criteriosHand2[i]; process=quot;sendResponsequot; / /actions /service!-- Express Shipping -- if(comparison!=0){ break; } } } return comparison; } /** * Retorna um array com as cartas na ordem em que so consideradas para o * desempate de duas mos que tem o mesmo jogo. * service category=quot;ExpressShippingquot; name=quot;ExpressShippingServicequot; * ex: KKKQQ retorna [K,Q] * ex: QQQKK retorna [Q,K] * ex: A2345 retorna [5, 4, 3, 2, A] * description=quot;Express Shipping Servicequot; listeners jms-listener ex: TT245 retorna [T,5,4,2] * ex: T2245 retorna [2,T,5,4] * ex: flush 2379T retorna [T, name=quot;CBRExpressFreeShippingquot; busidref=quot;CBRExpressFreeShippingquot;/ /listeners 9,7,3,2] * * @return */ public Integer[] getCriteriosDesempate() { MapInteger, Integer actions mep=quot;OneWayquot; action name=quot;testStorequot; mapa = this.countCards(); ListEntry criterios = new ArrayListEntry(); class=quot;org.jboss.soa.esb.actions.TestMessageStorequot;/ action criterios.addAll(mapa.entrySet()); Collections.sort(criterios, new ComparatorEntry(){ / name=quot;displayMessageActionquot; ** * Ordena primeiro pelo valor e depois pela chave * * @param o1 * @param o2 * @return */ public int compare(Entry o1, Entry o2) { int comparacao = ((Integer)o2.getValue()) - class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.MyJMSListenerActionquot; ((Integer)o1.getValue()); if (comparacao == 0) { comparacao = ((Integer)o2.getKey()) - process=quot;displayMessagequot; / !-- This can be replaced with notification -- ((Integer)o1.getKey()); } return comparacao; } }); // extrai os keys dos entrysets action name=quot;routequot; ordenados Integer[] retorno = new Integer[criterios.size()]; for (int i=0 ; class=quot;org.jboss.soa.esb.samples.quickstart.simplecbr.RouteExpressShippingquot; icriterios.size() ; i++) { retorno[i] = (Integer) criterios.get(i).getKey(); } // process=quot;sendResponsequot; / /actions /service /services/jbossesb straight comeando com ace if (isStraight() retorno[4] == Card.TWO retorno[0] == Card.ACE) { return new Integer[]{Card.FIVE, Card.FOUR, Card.THREE, Card.TWO, Card.ACE}; } return retorno; } } Friday, February 13, 2009
  • 102. Lato Sensu em Sistemas Orientados a Objetos Laboratório de Tópicos Avançados - 2°/2008 Configuração declarativa de regras Friday, February 13, 2009
  • 103. Pra isso, usa-se um Engine de Regras para declaração execução Friday, February 13, 2009
  • 104. Pra isso, usa-se um Engine de Regras para declaração execução Friday, February 13, 2009
  • 105. regras fatos engine de regras decisão Friday, February 13, 2009
  • 106. regras + + = engine de regras decisão fatos Friday, February 13, 2009
  • 107. JBoss Rules Drools Friday, February 13, 2009
  • 108. Lato Sensu em Sistemas Orientados a Objetos Laboratório de Tópicos Avançados - 2°/2008 Às vezes o processamento de uma mensagem envolve vários serviços, que precisam ser coordenados entre si. Friday, February 13, 2009
  • 109. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 110. ! S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 111. ! S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 112. S1 S2 S3 ESB S4 S5 Friday, February 13, 2009
  • 113. S1 S2 S3 ESB S4 Friday, February 13, 2009
  • 114. ! S1 S2 S3 ESB S4 Friday, February 13, 2009
  • 115. ! S1 S2 S3 ESB S4 Friday, February 13, 2009
  • 116. S1 S2 S3 ESB S4 Friday, February 13, 2009
  • 118. Falta de coordenação pode levar à total perda de controle do ambiente Friday, February 13, 2009
  • 119. Torna-se então necessária a formalização de processos Friday, February 13, 2009
  • 120. Engine de Processos Friday, February 13, 2009
  • 121. Huguinho Zezinho Luizinho Friday, February 13, 2009
  • 123. JBoss SOA Platform Friday, February 13, 2009
  • 124. PR alexandre.gomes@seatecnologia.com.br blog.seatecnologia.com.br Friday, February 13, 2009

Notes de l'éditeur

  1. O pilar fundamental chama-se serviço. Tem gente que diz que SOA é arquitetura, uma infra-estrutura, um padrão, um método Independente do que seja, o que todos querem é a interoperabilidade de serviços que, através do intercâmbio de mensagens são capazes de integrarem entre si de forma altamente desacoplada, coordenada e orquestrada, para a composição de processos de negócio, tudo isso pra viabilizar o reuso
  2. Tudo começa quando um elemento X deseja comunicar-se com um elemento Y, numa estratégia chamada de RPC, de onde derivaram tecnologias como CORBA, RMI e WebServices
  3. No mundo real, essa comunicação se dá com vários elementos X, Y e Z
  4. Com a tendência utópica de se chegar no ponto de criarmos aplicações como se fossem Legos.
  5. UTOPIA que existiu no CORBA, no EJB e nos WebServices
  6. E aí os grandes fabricantes trouxeram para o mercado soluções complexíssimas, cheias de tecnologias e prome$$a$
  7. E, para a implantação de SOA, usam a estratégia stop-the-world. 1 ano para a implantação completa.
  8. Sem, contudo, avisar de que se trata de uma longa e solitária viagem.
  9. E aí, a história colou?
  10. Em 2005 fizemos o Café Brasil....
  11. Alguns projetos até que vingaram de lá pra cá, mas quase sempre no melhor estilo Torre de Babel (querer alcancar os céus) Ou seria um castelo de cartas?
  12. Só que o modelo não tava escalando (fazer mais com o mesmo ou o mesmo com menos)
  13. - E aí você pode perguntar: SOA é hype ou realidade? - CTO for Sun's Enterprise Web Service Practice: “SOA não está num produto”
  14. E é daí que começa a idéia do SOA de Guerrilha
  15. SOA é a disciplina de aproveitar ao máximo o que já existe...
  16. ...pra evitar que o mesmo investimento seja refeito várias vezes
  17. Afinal, software é um ativo tão valioso quanto móveis e máquinas.
  18. Geralmente, nunca descartamos algo antes de tentar recuperar sua utilidade.
  19. E, se em tudo na vida, sempre queremos aproveitar até a última gota, por que não com software?
  20. - Entretanto, o caminho seguido não tem sido dos melhores - Muitos estão fazendo exageradamente o que se diz certo - Poucos têm obtido êxito - Vários têm falhado - Por falta de governança!
  21. - Jim Webber, da ThoughtWorks. Empresa do Martin Fowler. - Artigo que resume bem tudo o que tá acontecendo por aí. - SOA: Implantação incremental, por prioridades e guiado por muito feedback.
  22. Este livro diz tudo. As grandes mudanças não estão na tecnologia, mas na forma de se pensar software.
  23. Ao invés de abordagems pesadas e trabalhosas, prefira as adoções passo-a-passo, colhendo os benefícios o mais rápido possível
  24. innoQ SOA consultant and InfoQ SOA Community editor
  25. - Então, nesta visão moderna (ou pós-moderna), SOA, em primeiro lugar, é um ESTILO de arquitetura que busca primordialmente maiores LUCROS através da preocupação constante com o ROI. - Para isso, o REAPROVEITAMENTO dos ATIVOS existentes deve ser sempre realizado o quão antes possível, com AGILIDADE, não necessariamente visando a rapidez, mas a EFETIVIDADE dos resultados.
  26. Temos então o seguinte cenário. Você já possui alguns legados existentes que precisam ser integrados.
  27. Só que novos legados podem sempre aparecer, de fornecedores, clientes, etc, que também precisam ser incorporados ao ecosistema existente.
  28. Como integrá-los? Existem alguns modelos....
  29. Todo mundo fala com todo mundo.
  30. Comunicação centralizada. Mais simples. Lógica de integração separada da lógica de negócio (clichê)
  31. Em ambos os casos, busca-se a mesma coisa: reaproveitamento
  32. Tecnologias de comunicação ponto-a-ponto
  33. A tecnologia da moda para este tipo de integração se chama “Barramento de integração de serviços”
  34. E são nos ESBs que nos concentraremos.
  35. - A idéia é que todos os seviços estejam ligados ao barramento. - Um serviço cria uma mensagem - Posta a mensagem no barramento - O barramento entrega a mensagem - A mensagem é lida pelo serviço de destino
  36. Mas, na vida real, as coisas não são tão simples assim.
  37. Ou seja, nem sempre a mensagem produzida por um serviço é compreendida por outro, sendo necessária sua transformação no meio do caminho.
  38. Não necessariamente um serviço entende o formato da mensagem de outro serviço.
  39. Ou seja, o destino da mensagem pode ser calculado dinamicamente, durante o seu envio.
  40. E não necessariamente o destinatário da mensagem é estaticamente definido. Daí, fica no barramento a responsabilidade de decidir (rotear) o rumo das mensagens.
  41. Sempre há duas formas. - Uma com código Java e outra com código XML - Em Java há a cultura da programação declarativa: segurança, transação, persistência...
  42. Ou seja, ao invés de programar a regra, você a declara em alto nível
  43. -Então, o que um engine de regras faz é analisar os FATOS sob a luz das REGRAS existentes para proferir sua DECISÃO - Ou seja, REGRAS + FATOS + ENGINE = DECISAO
  44. Quem faz isso no mercado?
  45. Uma mensagem pode ser processada por vários serviços. Mais ainda. Uma mensagem pode ser consumida por um serviço, que gera outra mensagem, que é consumida por outro serviço...
  46. E se um dos serviços for, na verdade, uma tarefa manual que deve ser executada por um ser humano?
  47. A medida que a quantidade de serviços aumenta, sua composição e coordenação torna-se mais complexa.
  48. - E aí que se torna necessária a utilização de um engine de processos. - Ferramenta para automação do processo de controle de processos
  49. O funcionamento é o seguinte: - Você define o processo - Submete-o ao engine - Deixa que o engine o execute quantas vezes forem necessárias
  50. No mercado, um exemplo de aplicação dessa natureza é o JBoss jBPM