From the vice president and chief technologist for SOA at Oracle Corporation

Dave Chappell

Subscribe to Dave Chappell: eMailAlertsEmail Alerts
Get Dave Chappell: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Article

Reliable SOAP for Web Services Messaging Has Finally Arrived! Leading IT Vendors Join Forces to Create Web Services Reliability

Reliable SOAP for Web Services Messaging Has Finally Arrived! Leading IT Vendors Join Forces to Create Web Services Reliability

(January 14, 2003) - On Thursday January 9, Sonic Software and a number of other leading IT vendors, including Fujitsu Limited, Hitachi, Ltd., NEC Corp, Oracle Corp., and Sun Microsystems, announced a proposal for a new Web services specification for reliable messaging: Web Services Reliability (WS-Reliability). The companies plan to submit WS-Reliability to a standards body on a royalty-free basis in the near future.

Along with security, reliable asynchronous communications has been one of the gaping holes in today's Web services architecture. Lack of reliability, due to the inherent nature of using SOAP over protocols such as HTTP, is one of the biggest obstacles to the adoption of Web services for mission-critical communications between applications and services, such as complex business-to-business transactions or real-time enterprise integration.

WS-Reliability is a standalone specification for reliable SOAP that can provide the missing link to bridge the gap between organizations and help make Web services a truly enterprise-capable technology for standards-based systems integration. As one of the WS-Reliability specification authors, I thought I would drop a quick note and give a description of it, and my viewpoint on where it is headed.

SOAP-Based Reliability

WS-Reliability is a specification for an open, reliable SOAP-based asynchronous messaging protocol, which enables reliable communication between Web services. WS-Reliability includes well-known characteristics of reliable messaging such as guaranteed delivery, duplicate message elimination, and message ordering. Delivery options such as at-least-once, at-most-once, and exactly-once are available. Message expiration and delivery retries are also possible.

I use the term SOAP-based reliability to mean that the reliability capabilities are defined in the SOAP envelope. The spec defines a set of SOAP envelope headers that govern the behavior of the senders and the receivers. This means that even while an HTTP binding is provided, WS-Reliability is a level above, or independent of, the underlying protocol.

Listing 1 shows a partial listing of a WS-Reliability SOAP header.

<SOAP:Envelope
?
<SOAP:Header>
<rm:MessageHeader xmlns:rm="http://schemas.fujitsu.com/rm"
SOAP:mustUnderstand="1">
?
<rm:MessageId>[email protected]</rm:MessageId>
<rm:Timestamp>2002-09-07T10:19:07</rm:Timestamp>
</rm:MessageHeader>
<rm:ReliableMessage xmlns:rm="http://schemas.fujitsu.com/rm"
SOAP:mustUnderstand="1">
<rm:ReplyTo>http://server1.anyuri.com/service/</rm:ReplyTo>
<rm:TimeToLive>2002-09-14T10:19:00</rm:TimeToLive>
<rm:AckRequested SOAP:mustUnderstand="1" synchronous="false" />
<rm:DuplicateElimination/>
?
</rm:ReliableMessage>
?
</SOAP:Header>
?
</SOAP:Envelope>

Listing 1: A sample WS-Reliability SOAP Header

Guaranteed Delivery

The guaranteed delivery is accomplished using concepts such as message persistence, acknowledgement of receipt, and error reporting via SOAP Fault handling. If a message is tagged as being a <ReliableMessage> with a <AckRequested> element in the header, this is a signal to the ultimate receiver that it must send back an acknowledgement message to the sender--or a Fault message if something fails. While WS-Reliability is an asynchronous protocol, the acknowledgement or Fault may be sent either synchronously or asynchronously. Acknowledgements and Faults are correlated with the originally sent message using the <RefToMessageId> element.

A full section on Fault handling, including a substantial list of Fault codes, and some sample Fault envelopes are provided.

Duplicate Elimination

The duplicate elimination is accomplished in part by the use of globally unique message identifiers in accordance with [RFC2822] http://www.ietf.org/rfc/rfc2822.txt. In case you're wondering, they look like this: <rm:MessageId>[email protected]</rm:MessageId>. It is the responsibility of the receiving Reliable Messaging Processor (RMP) to detect duplicates and only deliver one message to the receiving application, discarding the rest. Now, you may notice I didn't say keep the first and discard all subsequent messages. We left it open for now because who is to say whether the first message is to be kept, or the last one. That's an example of an application specific requirement and something that perhaps could be configurable in an implementation specific RMP.Message Ordering Message ordering is accomplished using a <MessageOrder> element, which contains both a <GroupId> and a <SequenceNumber> element. The receiving RMP is responsible detecting out of sequence messages, and either waiting for them to arrive, or generating a Fault back to the sender.

Message Persistence

Both the sending and receiving RMPs are required to persist the messages under certain conditions. The sending RMP is required to persist a message until it receives an acknowledgement message, the time span as indicated by the <TimeToLive> element has expired, or a configurable number of retry attempts have failed. The receiving RMP is required to persist a message until a receipt has been delivered back to the sender, and all ordering and duplicate elimination requirements have been satisfied.

Say It Isn't So!

Many of you may know me as an active proponent of JMS reliable message delivery semantics, and you may be asking "What's this all about"? Well, the short answer is that this is very complementary technology. Reliable messaging comes in many forms, and is a key part of Sonic's core competencies. WS-Reliability should become a natural fit into any environment that supports JMS, HTTP, SOAP, and Web services.

Where the Specification is Headed

The intent of this draft is to act as the basis for input into the formation of a working group or technical committee in a standards body. We are in the process of working through that right now. I don't want to publicly say which organization until it actually happens, but stay tuned. We welcome the addition of any and all companies that wish to join in with us once we get it to a standards body. We're already being contacted by numerous companies who are excited about joining in.

The intent of WS-Reliability is to provide a simple yet robust specification for reliable messaging that can work well within existing parts of the Web services stack, and be capable of fitting in with other complementary efforts as they progress.

We realize that the specification is in its early stages and we still have a great deal of work ahead of us, and look forward to the input from the other companies as they come on board with the effort. I encourage you to go download the specification and have a read through it. It is pretty easy reading, and has plenty of interaction diagrams and many more sample SOAP envelopes to help you understand these concepts in more detail.

At the moment the specification is published at each of the participating vendors' respective Web sites. You can get a current copy of it at http://www.sonicsoftware.com/wsreliability. A full list of locations is provided at the end of this article.

By providing an open standard for a SOAP-based reliable transport, WS-Reliability will help accelerate adoption of asynchronous Web services, making them relevant for an even wider range of standards-based integration across the extended enterprise, and cross-company collaboration challenges.

Alphabetical list of sites to download the WS-Reliability specification from:

Fujitsu
http://xml.fujitsu.com/en/about/ws_r.html

Hitachi
http://www.hitachi.co.jp/soft/wsrm/

NEC
http://www.nec.co.jp/press/ja/0301/WS-ReliabilityV1.0Public.zip

Oracle
http://otn.oracle.com/tech/webservices/htdocs/spec/ws-reliability.html

Sonic Software
http://www.sonicsoftware.com/wsreliability

Sun Microsystems
http://sunonedev.sun.com/platform/technologies/technologies_mv.html

More Stories By Dave Chappell

David Chappell is vice president and chief technologist for SOA at Oracle Corporation, and is driving the vision for Oracle’s SOA on App Grid initiative.

Comments (3)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.