RE: How to determine if an operation is synchronous

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:14:32 UTC