Re: Pi-Calculus Model question.

Assaf, thanks again !  More questions embedded ...


>>Lets introduce two more roles, "Airplane Shipper" and "Truck Shipper", 
>>each has its own process flow.
>>
>>There are two cases here.
>>
>>1) Queue scenario
>>The seller send a "shipment request" to a channel.  Can both Shippers 
>>listening on this same channel but only one of them will successfully 
>>receive it ?  Lets say the seller doesn't care and both shippers are 
>>competing to get the shipment request.
>
>This is a different issue. In this case the channel is the queue and you 
>can have multiple consumers for the queue without changing the semantics 
>of the channel. In this particular case I assume that the shipper is the 
>process you communicate with. Whether it ends up being the airline shipper 
>implementation or the truck shipper implementation is immaterial, you view 
>both implementations as being equivalent and so you in fact have only one 
>"process" listening to that channel.
>
>This does require some level of abstraction, e.g. as David suggested by 
>defining message families. So the interaction is based on some abstract 
>specification that is equivalent for both implementations allowing for one 
>process to be defined, but there's enough flexibility to use different 
>messages depending on whether you end up talking to an airline 
>implementation of a truck implementation of the shipper process.

In this example, lets say the "Airplane Shipper" has a completely different 
flow from the "Truck Shipper" to handle the shipment.  In other words, it 
cannot be abstract out to a common process.  The seller needs to be aware 
of which one has got the shipment request and deal with the shipper 
differently.  Now, can both Shippers listening on this same channel but 
only one of them will successfully receive it ?


>>2) Broadcast scenario
>>The seller send a "shipment request" to a channel.  Can both Shippers 
>>listening on this same channel and both receive it ?
>
>Yes. The broadcast scenario is based on message duplication. Both shippers 
>listen on different channels specific to their processes, which may even 
>be different processes (e.g. one doing the shipment and one tracking a 
>shipment request or auditing the business commitment). The message is 
>actually sent to both channels, but technically you will simplify it by 
>using a broadcast medium and so in the language you can express that with 
>a single send operation.

Are you saying that there are some forwarding mechanism between different 
channel.  So that senderA sends a messageX to channel1 will cause receiverB 
receive messageX from channel2 as well as receiverC receive messageX from 
channel3.  In other words, channel can form some forwarding relationship 
among themselves ?

Or are you saying the sender is actually sending messageX to channel2 and 
channel3, and by using a broadcast channel is just an abbreviated form to 
say it ?




>>I mean multiple different steps but from the same process (party).
>>For example, lets say the seller in parallel send one shipment request to 
>>the airplane shipper and another shipment request to the truck 
>>shipper.  And then he wait for both respond and then select one with a 
>>cheaper price before proceed to next step.  How do you represent the 
>>"synchronization" after two parallel steps ?
>
>How about:
>
>receive:response(one).recieve:response(two).doSomething(one,two).0

But I don't want to force that response(one) has to occur before 
response(two).  Lets say each of them can happen at any time.
Basically, I want to see how pi-calculus represent the "fork/join" in UML 
activity diagram.


Rgds, Ricky

Received on Tuesday, 15 April 2003 03:14:17 UTC