[PEAK] A taxonomy of event sources: designing the events API

Phillip J. Eby pje at telecommunity.com
Wed Jan 7 18:50:10 EST 2004


At 03:49 PM 1/7/04 -0500, Bob Ippolito wrote:

>Well, here's an idea.. I'm not an expert on Communicating Sequential 
>Processes, but maybe you should be before writing the events API.

I don't know what you'd define as 'expert', but I can certainly map CSP to 
Linda and vice versa, and both of those to the model used by peak.events.

In rough terms, the peak.events core is a subset of the CSP model that 
prevents livelock (but not deadlock), and a subset of Linda/JavaSpaces that 
does not guarantee that tuples are preserved in tuplespace if there are no 
immediate readers or takers, and does not provide pattern matching.

events.AnyOf maps to an ALT construct (unprioritized and unfair).  Most of 
the other 'IEventSource' types can be compared to combination 
channels/guards, but are more accurately viewed in terms of tuplespace 
concepts.

Personally, I find the Linda model of ensemble computation to be much 
simpler and far more practical than the CSP model.  All of the CSP concepts 
can be implemented in terms of tuplespace concepts, and tuplespaces have 
far fewer fundamental concepts and constructs.  The CSP concepts are 
buildable from peak.events, too, with some being easier than others.

Following "practicality beats purity", though, peak.events emphasizes 
commonly used constructs and allows you to create others as needed.  It 
does not build up from trivial CSP objects like Skip and Stop, but jumps 
directly to a handful of useful guard/channel types.


>   It's the model that Christian Tismer has settled on for the next 
> version of Stackless.  There's been a lot of discussion about it on the 
> stackless list lately.  There's books and papers on CSP that are 
> available free online, but I have not had time to read and absorb enough 
> of it yet to talk confidently about it.

"""Two things I learned for sure during a particularly intense acid trip
in my own lost youth: (1) everything is a trivial special case of
something else; and, (2) death is a bunch of blue spheres.
                                       --- Tim Peters, 1 May 1998"""

By that, I mean that CSP, Linda, peak.events, and at least half a dozen 
other things in this space are trivial special cases of each other, and not 
entirely unlike a bunch of blue spheres.  :)




More information about the PEAK mailing list