[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: OO vs. CSP - Papers, Arguments?
quite an interesting read, thank you! (And by the way thanks to all on the list who responded to my initial question.) In the past weeks I digged a little deeper into the field of concurrent OO languages, and here is what I found out myself :-)
As you and others (namely Allan McInnes) have pointed out, OO and CSP are not a contradiction, as OO has no notion of parallelism in itself. There are (at least) two different approaches in concurrent OO languages regarding control parallelism: Active Objects, which typically allow synchronous as well as asynchronous method calls, and control structures which are orthogonal to the (still passive) objects, e.g. by using fork and join. There are of course also OO languages which support data parallelism ...
It was also shown in the discussion that having several concurrent threads in one object can have unexpected side effects. This is why there are languages that only allow one thread in each (otherwise passive) object in any point in time, buffering incoming calls. Others furthermore specify a certain protocol for each active object that controls which messages can be send to the object in which order. This sounds to me already pretty much like CSP :-)
Regarding inheritance, most OO languages do not enforce that the dynamic behaviour of an object of the extended class in any way extends the behaviour of an object of the base class. For me it is still unclear how a "correct" extension of a dynamic behaviour should be defined, anyway ...
From: F.R.M.Barnes [mailto:F.R.M.Barnes@xxxxxxxxxx]
Sent: Thursday, October 13, 2005 2:26 PM
To: Koehne Kai
Subject: Re: OO vs. CSP - Papers, Arguments?
On Wed, Sep 21, 2005 at 10:46:47AM +0200, Koehne Kai wrote:
> I am just starting to work on my master thesis that aims to extend
> Occam to become a useful coordination language for Grid Computing.
> I already read a lot about CSP, Occam and diverse extensions of it.
> However, I think that I am still missing answers to an important
> question: What are the main advantages/disadvantages of the CSP
> approach in contrast to concurrent object oriented aproaches?
> My perception is that CSP just feels more "natural" when it comes
> to concurrent programming, but I am sure that there are a lot more
> sound and sophisticated opinions on this topic 'out there'. The
> only reasoning I am aware of is in a presentation of Peter Welch
> called "Communicating Processes, Components and Scaleable Systems"
> where he states that OO is not providing "real" data encapsulation.
> I would be very grateful if you could provide me hints on further
> comparisons ...
I had a waffle in my blog the other night about OO and CSP (had been
brewing for a while). It's not official or particularly formal, but
might be intersting/useful: http://frmb.org/lifestuff.html