Guarana (was: slate comments)

Alexandre Oliva oliva@lsd.ic.unicamp.br
22 Mar 2000 17:15:34 -0300


On Mar 21, 2000, "Jecel Assumpcao Jr." <jecel@tunes.org> wrote:

> Alexandre Oliva wrote:
>> > It seems to me, for example, that it would be easy to implement CodA
>> > *in* Guaranį (you just have to intercept message sending and
>> > method returns, right?).
>> 
>> It is indeed possible, but not without a lot of effort.  The main
>> problem is that Guaranį doesn't supply outgoing interception, which
>> you'd need to implement something like Send.

> Ok, in the papers I have read you didn't list what operations could be
> intercepted.

That's because Guaranį is a language-independent MOP, and the set of
operations is defined in a per-language basis.  For example, in C++,
one would talk about calling member functions and getting or setting
data members.  In Java, it would be invoking methods, loading or
writing fields, entering and leaving monitors.  In object-oriented
flavors of lisp, we'd be talking about slots, etc.  I had attempted to
do cover the whole range of operations in previous draft versions of
the papers, but I ended up deciding not to give much detail, and
simply using the generic abstraction of `operation', and leaving the
mapping of operation to particular languages as something to be
decided by the implementor.

>> More details at http://www.egroups.com/group/guarana/81.html?

> That seems like too much of an effort to do something the system
> wasn't created to do in the first place.

Indeed.  But it's really useful in some particular cases.  It has come
up often enough that I believe it would be useful to have it
implemented once, instead of forcing anybody that wants something like
that implement their own version.  It's a matter of reuse :-)

> As long as you intercept message reception and returned results, you
> can implement most of CodA (6 out of 7 meta-objects; just the send
> meta-object would be missing) in Guaranį as it is now.

Yep

> Only the interaction between the meta-objects would have to be in a
> different style since a strict emulation of CodA would result in a
> lot of broadcast messages (which I imagine isn't too efficient).

Correct.  It would be better if meta-objects held references to each
other, so as to be able to invoke each other directly.  So you'd only
need messages to notify reconfigurations, should they be at all
necessary.

-- 
Alexandre Oliva    Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company        aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist    CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org}   Write to mailing lists, not to me