Hi Chen,

Main difference in TCP and WS-RM is the layer in which these protocols operates 
in the communication stack. TCP is a transport layer protocol while the WS-RM 
is a message level protocol. TCP guarantees you the delivery of messages in a 
single TCP connection. However, if a web service requests needs to go through 
several transport connections and several software components, before it 
reaches its ultimate recipient then the transport level protocol can itself 
cannot guarantee the reliable delivery. Software components in between can fail 
and the message may not get delivered to the ultimate recipient. That is the 
main reason for incorporating a message level reliable delivery protocol for 
web service stack.

Q1:
WS-RM is almost not required in this case. However, WS-RM has a guaranteed 
delivery mechanism with the help of persistent database. So if the 
communication channel has any problems  or the web service is not and running 
when you call it, still the RM layer will relay your messages when they are up 
and running.

Q2:
You don't need to define a custom messaging protocol when you can use WS-RM, if 
you use it, then you can assume all three messages are going to be delivered in 
order. If there is a failure, then you will be notified at which point you can 
start your logic on rolling back transactions.

Q3: You can still use WS-RM to support message level reliable delivery of 
messages. Please see 
http://ws.apache.org/sandesha/sandesha2/userGuide.html#request_reply 
for how to use Sandesha for request/reply web service invocation over multiple 
channel communication.

HTH,
-jaliya

----- Original Message ----- 
  From: Xinjun Chen 
  To: [email protected] 
  Sent: Sunday, January 20, 2008 9:42 PM
  Subject: Is WS-RM required in these scenarios


  Dear Sandesha developers, 

  Thanks for making Sandesha2 a reality and providing WS-RM and WS-RX 
implementations for the WS community. 

  This is my first post in the sandesha mail list. 
  I have a question regarding the usage of WS-RM. 

  To me, WS-RM is amazingly similar to TCP protocol in TCP/IP model. But the 
difference is that the WS-RM (RM layer) is a sub-layer below Application layer 
in TCP/IP model. TCP itself is a transport layer protocol. TCP protocol ensures 
that all the data packets which belongs to the same application message are 
transmitted to the destination with the insurance that the delivery is 
in-order, once-and-only-once. The WS-RM ensures that all SOAP requests which 
belongs to the same sequence are sent to the WS destination with the insurance 
that the delivery is once-and-only-once and optionally in-order. 

  I have three scenarios: 
  1) My WS client invokes the WS using HTTP/SOAP, and the underlying transport 
is TCP. Every invocation is independent of each other. In this case, do I still 
need WS-RM? 
  From my understanding, WS-RM is totally unnecessary in this scenario because 
the TCP itself is reliable, so the single invocation (SOAP request) can be 
reliably sent to the destination. Is my understanding correct? 

  2) Again, in this scenario, the transport is TCP. In one session (or one 
sequence), there are three request-response message exchanges. The second 
request will not be sent out if the first response has not arrived. If the 
first request succeeds but the second request fails, there is no transaction 
issue (rollback) required. The application has the choice to either retry the 
second request or just abort the response of the first request. The web service 
provider will not know whether the client will retry the second web service. In 
this scenario, is WS-RM still necessary? If we use WS-RM, will the three 
message exchanges in one sequence? 
  From my understanding, we are not able to apply WS-RM in this 
request-response message exchanges. The messages in a sequence should be 
asynchronous request message, or non-blocking invocation. 

  3) Again, in this scenario, the transport is TCP. In this scenario, both 
application source and application destination may be web service provider and 
consumer. 
  In the first message exchange, the application source sends one request to 
the destination, only requiring an acknowledgment of receipt of the request. 
The actual business response is generated after the destination processes the 
request. The business response is sent back to the application source through 
another WS invocation. The application source exposes one web service to 
receives response from application destination. The processing time incurred at 
the application destination may be quite long, say 5 minutes. 
  In this scenario, do I need to use WS-RM? How can I use WS-RM? 

  Thanks for reading my long questions. I hope I have made my questions clear. 


  Regards, 
  Andrew

Reply via email to