[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-smalltalk] ObjectSpaces
From: |
Paolo Bonzini |
Subject: |
Re: [Help-smalltalk] ObjectSpaces |
Date: |
Thu, 21 Oct 2010 00:09:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100907 Fedora/3.1.3-1.fc13 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.3 |
On 10/20/2010 11:47 PM, Gwenaël Casaccio wrote:
Hi,
I would like to present a simple concept "ObjectSpaces":
grouping all objects inside an objectspace, each time
that we send a message to another OS each of the
OSes will intercept the message.
This will need to go for performance reasons. However, maybe it's
enough to have some _primitives_ redirected to the father ObjectSpace
when the child ObjectSpace causes them.
Also, an ObjectSpace should be able to create another OS from scratch
(you have an image loader written in Smalltalk, right?) rather than only
as a clone of itself. This is important for sandboxing, and allows the
child OS to have no references to objects in the parent (while the
parent can have arbitrary access).
On the other hand, it adds complexity for the VM because the classes
will have a different OOP for each ObjectSpace (and symbols too, but
maybe those could be shared if we decide that it's impossible to change
an object from read-only to read-write). Context switches don't have to
be extremely fast, however.
Alternatively, or in addition to this, ObjectSpaces could send events
between themselves. This allows to implement an actor model.
I guess we could use them as kind
of transactional worlds (i.e. Worlds: Controlling the Scope of Side Effects
http://lambda-the-ultimate.org/node/3040).
Yes, that makes for very easy atomic loading.
I've made several implementation of the OSes the most advanced
had multiple object tables
Multiple object tables are the way to go.
Paolo