Tolerância a Faltas nos Web Services Reliable Messaging Protocol - RMP
RMP Tolerar faltas temporárias na comunicação Garantir a semântica da invocação do Web Service independentemente do protocolo de transporte usado do tipo de interacção RPC ou mensagens Reliable Messaging - Modelo
Especificação WS-Reliability The current specification defines the following reliability features: Guaranteed message delivery, or At-Least-Once delivery semantics. Guaranteed message duplicate elimination, or At-Most- Once delivery semantics. Guaranteed message delivery and duplicate elimination, or Exactly-Once delivery semantics. Guaranteed message ordering for delivery within a group of messages. Response- Reply
Callback RM-Reply Poll RM-Reply
Ligação entre o WSDL e o RMP A successful WSDL One-way operation maps to: a sequence of RMP invocations of the form: S-RMP.Submit(p) + R-RMP.Deliver(p), where (p) is the payload sent in the request (input message) of the operation described in WSDL. A successful WSDL Request-response operation maps to; a sequence of RMP invocations of the form: S-RMP.Submit(p) + R-RMP.Deliver(p) + R-RMP.Respond(p2) + S-RMP.Notify(p2), where (p) is the payload sent in the request and (p2) is the payload returned in the response (output message) of the operation described in WSDL. Identificadores das Mensagens A Reliable Message contains an Identifier that is globally unique and relies on the notion of a group. A Reliable Message always belongs to a group. The Sending RMP sends a group of messages to the Receiving RMP as a sequence of individual messages. The Reliable Message Identifier is a combination of a group ID and an optional sequence number; a sequence number, if present, is an integer that is unique within a group. More precisely, a message is uniquely identified as follows: When there is only one message in the group: the group ID, which is a globally unique group identifier, may be used alone as Message Identifier. No sequence number is required, although one is allowed. When the message belongs to a group of several messages: the message is identified by the group ID and a unique sequence number.
Dimensões consideradas Estrutura das mensagens
Poll Request Pedido
Resposta Transacções Atómicas
Topics WS-Coordination WS-AtomicTransaction WS-BusinessActivity IBM: Developer Works Web Services: Technical Library/Standards http://www.ibm.com/developerworks/webservices/library/ws-coor http://www.ibm.com/developerworks/webservices/library/ws-atomtran http://www.ibm.com/developerworks/webservices/library/ws-busact MSFT: Web Services Development Center http://msdn.microsoft.com/webservices BEA: Dev2Dev WebServices http://dev2dev.bea.com/technologies/webservices/index.jsp A necessidade de Coordinação Os Web Services são serviços que encapsulam funcionalidade. Necessitam de um mecanismo para que todos os participantes numa aplicação distribuída possam atingir um estado mútuo de consenso sobre o resultado As actividades podem ter um espectro muito diversificado de comportamento em relação ao modelo de faltas, forma como recuperam, etc. Não há um único modelo transaccional que sirva para todas as aplicações baseadas em web-service. É necessário considerar ACID 2PC, open nested, compensação, long-running com reconciliação, client-session scoping,...
Architecture for distributed WebService Activities WS-TX participants Web service Application message set WS-TX participants Web service XML message with context security WS-TX coordinator Activity context WS-TX resource security QoS... Registration service QoS... WS-Coordination WS-Coordination Web service platform (Vendor A) Key Middleware Web service platform (Vendor B) Application Protocol-specific service Web Services Standards WS-Transactions (AT & BA) WS-Coordination Transactions & Reliability Coordination Framework WSDL Service Descriptions UDDI Publishing & discovery SOAP / XML Protocol Message / Protocol HTTP, HTTPR, SMTP, MQ Internet, intranet Transport Network
Ws-coordination..\..\..\2005 Conceitos\SOA\Transacções\WebServiceCoordination. ppt WS Atomic Transactions 2PC diagrama de estados
Protocolos do WS-Atomic Transaction
Mensagem de invocação de um participante <soapenv> <soapbody> <wscoor:register> <RegistrationService> <Address>http://myRegistrationService</Address> </RegistrationService> <RequesterReference> <Address>http://myDatabaseWebService</Address> </RequesterReference> <ProtocolIdentifier> http://xml-soap.org/2002/xx/atomictransaction/2pc </ProtocolIdentifier> <ParticipantProtocolService> <Address>http://myResource</Address> </ParticipantProtocolService> </wscoor:register> </soapbody> </soapenv>
Atomic Transactions WSDL..\..\..\2005 Conceitos\SOA\Transacções\wsat.wsdl WS- Business Activities..\..\..\..\2005 Conceitos\SOA\WebServiceTransactionsBA.ppt