Tweak Islands (was: Re: BabyUML overview posted)

Bert Freudenberg bert at impara.de
Fri Sep 23 16:07:37 UTC 2005


Am 23.09.2005 um 14:53 schrieb Trygve Reenskaug:

> My reverse engineering of Islands may be of interest to others. I  
> found the objects, their links, and their interaction pattern for a  
> few interesting operations. The report is at
>   http://heim.ifi.uio.no/~trygver/2005/babyuml/tweakComponents.pdf

Note, however, that this is not a conclusive analysis of Tweak  
Islands. In particular, this statement is false  (as I explained in a  
private message before):

     "The objects themselves are floating freely and their island  
property depends on the island of the
observer. The two last print it statements in figure 3 on page2  show  
that the same object appear to reside
on two different islands simultaneously."

This is wrong. Objects live on one and only one island (unless there  
are bugs etc.).

By using the #instVarAt: method you are actively circumventing the  
Island encapsulation. This method was implemented in FarRef in  
particular to aid debugging.

In your test, innerObject is a FarRef to an IslandServerInner:

     innerObject "Far serverIsland:[an IslandServerInner]"
     innerObject island "Far serverIsland:[an Island(serverIsland)]"
     innerObject asString  'an IslandServerInner'

By calling

     innerObject instVarAt: 2 "an IslandServerInner"
     (innerObject instVarAt: 2) island "an Island(Squeak)"

you directly extract the value of the FarRef and thereby "tunnel" the  
far object onto the current Island. When asking it for its #island  
later, it of course answers the calling island.

Without the debugging aids it would be impossible to directly access  
objects on another island. Which would make debugging itself next to  
impossible.

- Bert -




More information about the Squeak-dev mailing list