[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronous Communication = Swap



----- Original Message -----
From: "M_Boosten" <mboosten@xxxxxxxxxxxxxxxxxxx>
To: <java-threads@xxxxxxxxx>; <occam-com@xxxxxxxxx>
Sent: Tuesday, 26 September, 2000 12:01 AM
Subject: Synchronous Communication = Swap


> Hi,
>
> Synchronous communication is an essential concept with CSP.
> In case of synchronous communication, two processes synchronise.
> I.e., during a certain moment in time they are both engaged in
> communication.
>
> During such a moment of sync, the two Processes can in principle
> EXCHANGE (BIDIRECTIONAL COMMUNICATION) data.  However, in Occam
> and most other CSP-based languages/libraries, data is only TRANSFERED
> (UNIDIRECTIONAL COMMUNICATION).
>
> I think it would be much more natural to implement bidirectional
> communication.

I find it hard to visual this as a more natural form for the following:
- because the two processes would often be forced to be SYNCHRONOUS (more
synchronous?) whereas many of the machines I'm interested in are largely
asynchronous and SYNCHRONISED by the communications.
- because many communications between processes are VERY asymetric in
several dimensions.
- I can only successfully talk and listen to multiple threads of
conversation. There are often temporal dependencies of the form <data> ->
<process> -> <action> such that I don't know what to swap in advance.
(Perhaps Adrian can introduce wormholes with his relativistic
CSP...........)

> As a first approximation, I would expect:
>
> class SwapChannel
> (object) swap(object)
>
> However, when implementing an Alt, people sometimes differentiate between
> the input and the output side.  In order to be able to implement the Alt
> efficiently, one needs to distinguish the INITATOR side from the OBSERVER
> side.  The initiator-process cannot perform an Alt; the observer-process
> can.
>
> The result would be:
>
> class SwapChannel
> (object) initiate(object)
> (object) observe(object)
>
> Note: the "swap" looks much more natural like a method call.
>       I think this mail is an important step toward the union
>       of OO and CSP.
>
> Note: Claim: the "?" and "!" on top of core CSP are pretty much nonsense.
>
> Gerald's Channel_of_ObjectObject has been inspired by my remarks.
> (See CTJ 0.9 rev. 17)
> He has not yet fully implemented my view.
>
> What does the rest of this world think...
>
> Cheers,
> Marcel

--
-- Stephen Maudsley, Esgem Limited mailto:Stephen.Maudsley@xxxxxxxxx
-- http://www.esgem.com
-- Tel: +44-1453-521626 Mobile: +44-7770-810991
-- company registered in England 3372135, http://www.esgem.com/contact.htm