Introduction to reliable message transmission for Web services

Source: Internet
Author: User
Tags header soap web services

Introduced

The OASIS WS-RX Technical Committee recently released a public preview of the WEB Services reliable message transfer (Wsrm,web services Reliable Messaging) 1.1 specification. As the Chairman of the Committee, I feel it necessary to make an introduction to WSRM and its norms. This article takes WSRM 1.1 draft four as the subject.

The WSRM specification allows two systems to implement reliable transmission messages. The goal is to ensure that messages are transmitted correctly from the sender to the receiver. The definition of reliable message transmission is complex, but it is advisable to use the JMS system in Java to implement a reliable transmission analogy of XML messages. The key difference is that JMS is a standard API and programming model with different implementations and wiring protocols (WIRE-PROTOCOL). WSRM, on the contrary, is a wired protocol that does not prescribe the implementation API and programming model, and is composed of soap based systems.

Agent

Before I explain the wiring protocol, I'd like to say a few words about how WSRM interacts with soap. Unlike queuing based systems, WSRM is transparent to existing applications. In a queue system, there is always an explicit Third-party queue system, where the sender puts the message and the recipient is removed from it. In RM, the SOAP processing engine on the client and server side is built into a processor/proxy (handler/agent), which is responsible for the transmission of messages. At the application level, these proxies are not visible, and they ensure that messages are retransmitted when a message is lost or not arrived. Like when you build a SOAP/JMS system for reliable SOAP message transmission, you must define queues and modify the URLs in the Web service. This is not necessary in WSRM because it adapts to existing HTTP (or other) naming conventions and URLs.

There are two logical types of proxies in WSRM: RMS (rm Source) and RMD (RM destination). In a given SOAP protocol stack, both can have one or more processors.

Rms:

Create a request to terminate the reliability contract.

Adds reliability descriptor header information to the message.

If necessary, send a message again.

RMD:

Create a response to terminate the reliability contract.

Receive and identify messages.

Optionally, discard duplicate messages.

Reject the Out-of-order message before the lost message arrives.

It should be emphasized that RMS, RMD, and client/requestor, service-side/responder should not be confused. In an environment where both ends are reliable (both request and response messages can be reliably transmitted), both RMS and RMD are present both on the client and the server.

Wired protocol

The most important concept in WSRM is sequence (Sequence). We can consider a sequence as a contract on which RMS and RMD can achieve reliable message transmission between the sender and the receiver. Each sequence has a lifecycle, a wide range of changes. In the sequence, the default maximum number of messages is 2^63, which is equivalent to sending 1000 messages per second in 292 million years!

Sequences can be created by createsequence and end with TerminateSequence. For example:

<soap:body>
 <wsrm:createsequence>
  <wsrm:acksto>
   <wsa:address>http://Business456.com/serviceA/789</wsa:address>
  </wsrm:acksto>
 </wsrm:createsequence>
</soap:body>

In a sequence, each message has a message number that is incremented sequentially on the initial value. The following is an example of a sequence header and a message number:

<soap:header>
 <wsrm:sequence>
  <wsrm:identifier>http://Business456.com/RM/ABC</wsrm:identifier>
  <wsrm:messagenumber>1</wsrm:messagenumber>
 </wsrm:sequence>
</soap:header>

The message number used to identify the message in the Sequenceacknowledgement header. The following is an example of sequenceacknowledgement header information:

<soap:header>
 <wsrm:sequenceacknowledgement>
  <wsrm:identifier>http://Business456.com/RM/ABC</wsrm:identifier>
  <wsrm:acknowledgementrange lower="1" upper="1" />
  <wsrm:acknowledgementrange lower="3" upper="3" />
 </wsrm:sequenceacknowledgement>
</soap:header>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.