W3C home > Mailing lists > Public > public-ws-chor@w3.org > October 2004

RE: CDL collision resolution

From: Furniss, Peter <Peter.Furniss@choreology.com>
Date: Thu, 7 Oct 2004 23:25:07 +0100
Message-ID: <221369570DEDF346AE42821041345E89730976@imap.choreology.com>
To: "Monica J. Martin" <Monica.Martin@Sun.COM>
Cc: "Gary Brown" <gary@enigmatec.net>, <public-ws-chor@w3.org>
It isn't exactly a matter of precedence of the message exchange, but
what the effects
are on the states of the parties - state which is indirectly visible by
its subsequent
effects. (the subsequent effects may only be in an outer choreography
rather than 
this one)

So a "winning" message exchange is one that changes that state of the
receiver, a losing
one doesn't - but would have changed it's receiver if it had arrived
when that receiver
was itself in a different state.

I didn't include the revised sequence diagram with the buyer states,
which perhaps makes
this clearer (or perhaps not).

The case a request/accept exchange, but the requester can attempt to
cancel the request.
If the request arrives in time, it cancels the request, otherwise it is
ignored.


This works out that there are three distinguishable traces:


a) request is accepted

buyer_state:=REQUESTING
                         --- request --->
	
seller_state:=REQUESTED
	
seller_state:=ACCEPTED
                         <--- accept ---
buyer_state:=ACCEPTED


b) request is cancelled, cancel arrives in time

buyer_state:=REQUESTING
                         --- request --->
	
seller_state:=REQUESTED
buyer_state:=CANCELLING
                         --- cancel ---->
                                           seller_state:=CANCELLED
                         <-- cancelled --
buyer_state:=CANCELLED

c) cancel arrives too late and "loses" the collision

buyer_state:=REQUESTING
                         --- request --->
	
seller_state:=REQUESTED
	
seller_state:=ACCEPTED
buyer_state:=CANCELLING
                         --- cancel ---->
                         <--- accept ---
buyer_state:=ACCEPTED

The "ascii art" has some limitations here - the state changes in c) are
in
parallel, and could occur in either order, and the cancel and accept
interactions can overlap as well (i.e. the messages representing them
may cross on the wire, in buffers or in threads)


The race is actually resolved by whether the arriving cancel or the 
transition to ACCEPTED occurs first at the seller's central point. (One
thing to be aware of is that the central point may not actually be 
observable externally - but somewhere in there, there is logically
a single state.

Peter

> -----Original Message-----
> From: Monica J. Martin [mailto:Monica.Martin@Sun.COM] 
> Sent: 07 October 2004 20:01
> To: Furniss, Peter
> Cc: Gary Brown; public-ws-chor@w3.org
> Subject: Re: CDL collision resolution
> 
> 
> Peter,
> On the examples and to Gary's questions, do you differentiate what 
> message exchange has precedence by priority, time [1] or both? Thanks.
> 
> [1] May infer the sequence is enforced so messages must arrive in a 
> specific order under specific constraint.
> 
> 


Choreology Anti virus scan completed
Received on Thursday, 7 October 2004 22:25:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 01:01:06 GMT