Squid plan

Anthony Hannan ajh18 at cornell.edu
Sat May 17 17:31:20 UTC 2003


Jecel Assumpcao Jr <jecel at merlintec.com> wrote:
> On Friday 16 May 2003 14:35, Anthony Hannan wrote:
> > Each segment resides on a specific machine.  Instead of segments
> > being magically distributed/replicated, objects are. 
> 
> So I can get a replica of an object while its segment officially resides 
> in another node? Where would it live in my node? It seems I would have 
> to create a local segment just for it.

The replica would be added to your segment that called for it.  If you
want you can create a new segment and move objects to it.  Segments are
like disk partitions, while objects are like files.  Objects can be
moved or replicated between segments.

> > This allows us
> > to implement the magic in the object domain instead of at a
> > lower-level (another example of moving thing out of the VM and into
> > the image). 
> 
> You could also consider a proper reflective architecture. Then these 
> things would be both in (meta-)objects and a lower-level.

I still want to model disk partitions.  We can then model object-groups
(your verions of segments) on top of that, if desired.  Although,
replicating at the object level may be sufficient.  I'm not saying to only
transfer one object at a time, a group of them can be replicated and
transfered at once.  But I am saying that each object replica would
have a remote pointer to its original.

To minimize replica overhead, I would declare certain classes as "value"
classes.  Instances of these classes are immutable and have no object
identity.  They would just be copied when replicated with no reference
to its original.  Only #= should be sent to these objects.  Along with
Strings and other primitive objects, I would declare Methods as value
objects.  This way a class can be replicated with only a few replica
pointers.  Notice a class could be immutable as well but it would not
be a "value" object.  Classes would still have object identity.  This is
necessary to recognize the same class on different machines.  This way
when an instance is transferred to another machine its class can be
found on the target machine using identity test.

If we still want to group objects without adding a parent field we can try
to group them by relative position within the segment heap.  The gabage
collector will have to maintain this relative position.

And yes, I want to use a proper reflective architecture, where all
entities, including physical entities such as disk-partitions,
processor, memory, disk, display, keyboard, mouse, printer, etc. are
objects.  Obviously, objects representing physical entities can not be
replicated or moved to other segments/disk-partitions.

> > Instead of a single roots array, there is one per outside segment
> > that references it.  So each segment knows every other segment that
> > has references to its objects.  When an object is no longer
> > referenced locally but is still referenced from the outside it is
> > moved to one of these segments and the others are updated to point to
> > it.  If there are no more outside references then it is simply
> > garbage collected.  Hence we have distributed garbage collection.
> 
> What if someone has a reference to segment A, which has a reference to 
> segment B. Can they use that to get a reference to B without B knowing 
> about it? Or will A create an indirect reference to B and pass that on, 
> so that all accesses have to go through A? See 
> http://www-sor.inria.fr/projects/sspc/

Stub Scion Pair Chains (SSPC) is identical to what I had in mind (thanks
for the reference).  I.e. an indirect reference is created through A,
which can be short-cutted later.

Cheers,
Anthony



More information about the Squeak-dev mailing list