- From: Assaf Arkin <arkin@intalio.com>
- Date: Tue, 22 Oct 2002 17:47:01 -0700
- To: "Ugo Corda" <UCorda@SeeBeyond.com>
- Cc: <www-ws-arch@w3.org>
WSDL 1.1 does not define the perspective of the client, only that of the server. The document you are referencing does a better job of explaining how a client would logically behave. From the perspective of the client, if you are doing a one-way operation (as defined by the server) then you are putting a message out there that would be sent and received by the server. The latency between the client actually sending the message and the server receiving it is an aspect of the protocol binding. The protocol can have no latency, or it may have some latency. For example, if you're sending using SMTP, the client can tell when the message was sent, not when it was received. If you are sending using HTTP you can tell when it was received. However, by looking only at the operation definition without the protocol binding, you can only tell that the operation is asynchronous. If you are doing a request-response operation (as defined by the server) then you are putting a message out there and you may or may not wait for the response. You are guaranteed that if the operation was performed by the server, then the message was received and a response was generated (that's what WSDL 1.1 says about request-response). It would be logical of you to wait for the response to come back, if nothing else, then to know that the operation was performed. It does not make sense to design a client that does not wait for the response, and the IBM document is just written given that assumption. From a WSDL operation definition you can determine that it is: - asynchronous The operation involves a single message (one-way and notification in WSDL 1.1) - synchronous The operation involves two messages in opposite directions, and indicates that it completes after receiving one and sending the other (request-response and solicit-response in WSDL 1.1) arkin Arkin, Your definition of synchronous/asynchronous does not seem to be the same as the commonly used one for Web services operations (see for example [1]). This commonly used definition is basically about the client blocking or not after submitting a SOAP request (and such behavior is not described by WSDL, as far as I can see). Assuming we adopt your definition, could you please explain how WSDL provides the information that would allow me to tell a synchronous operation from an asynchronous one (according to your definition)? Thank you, Ugo [1] http://www-106.ibm.com/developerworks/webservices/library/ws-asynch1/ -----Original Message----- From: Assaf Arkin [mailto:arkin@intalio.com] Sent: Tuesday, October 22, 2002 4:20 PM To: Ugo Corda Cc: www-ws-arch@w3.org Subject: How to determine if an operation is synchronous Let's assume two nodes, A and B, that exchange a message through some protocol(s) of unknown latency L. Asynchronous: A sends a message M1 at time T1, B receives the message M1 at time T2. T2 = T1+L. Since neither A nor B know what L is, A cannot determine when B received the message, nor can B determine when A sent the message. (The message may contain a time stamp equal to T1, but it's possible that A's clock is off compared to B's clock, and so the time reading is not reliable) Synchronous: A sends a message M1 at time T1, B receives the message M1 at time T2. Again T2 = T1+L. B processes the message, the processing time P is unknown as well. B sends back the message M2 at time T3. T3 = T2+P = T1+L+P. A receives the message M2 at time T4. T4 = T3+L = T1+2*L+P. Since A and B do not know L, A cannot determine when B received M1 or sent M2, nor can B determine when A send M1 or received M2. A knows that its operation occurred around the time instant Ta. Ta is calculated from the mean time of the operation. Ta = (T1+T4)/2. B knows that its operation occurred around the time instant Tb. Tb is calculated from the mean time of the operation. Tb = (T2+T3)/2. Ta = (T1+T4)/2 = (T1+T1+2*L+P)/2 = T1+L+P/2 =(T1+L+T1+L+P)/2 = (T2+T3)/2 = Tb So, whatever L and P are, both operations occur at the same time instant. We say that A and B are synchronized. Now, if A included a time stamp in the message M1 (T1), and B included two time stamps in the message M2 (T2, T3), then A could synchronize it's clock against B. A can't just use the values T2 or T3, because A's clock can be off compared to B's. But A knows that it's operation occurred at Ta (it's clock), and knows that Ta=Tb+offset, and knows that Tb=(T2+T3)/2 (T2,T3 given from B's clock), so it knows the offset is Ta-(T2+T3)/2. A can now synchronize it's clock with B's. arkin
Received on Tuesday, 22 October 2002 20:46:03 UTC