bert at freudenbergs.de
Mon Oct 16 11:23:01 UTC 2006
Am 16.10.2006 um 10:32 schrieb Michael van der Gulik:
> Bert Freudenberg wrote:
>> Am 15.10.2006 um 08:56 schrieb Michael van der Gulik:
>>> I've been using a class called "MessageCapture" which lets you
>>> receive messages sent to an object. It's caused me no end of
>>> agony trying to get it working, so I thought I'd share my agony
>>> with the community :-P.
>>> Source code here: http://www.squeaksource.com/DPON.html - click
>>> on "latest", MessageCapture-mvdg.2.mcz.
>>> It's released under the.. umm... MIT license.
>>> Also included is a Future class, which lets you do things like:
>>> result := Future doing: [ some long computation ].
>>> This will return immediately, forking off a process to do the
>>> computation and replacing "result" with the result when it's
>>> Some of the tests fail. Any hints / tips / guidance is very
>>> welcome! Especially as to how to capture #== and #class. Those
>>> two messages are sent by the interpreter even before doing a
>>> message lookup.
>> You might want to look at how this is handled in Croquet (MIT
>> licensed, too). As you know (or maybe not) Croquet is not
>> foremost about 3D but about distributed computing with capability-
>> based security. The messaging infrastructure with future sends,
>> returned promises etc. is independent of the UI.
>> Now the current implementation does not yet provide water-tight
>> security, but the principles are there and it's surely worth
>> having a look.
> Correct me if I'm wrong, but I think Croquet uses pretty normal
> objects for what it does. Objects are grouped together, and inter-
> group references are done using FarRef objects. I think it
> completely avoids the problem of capturing references - arguably a
> more stable approach than what I'm doing.
> Can anybody confirm this?
In the current implementation, yes. An earlier version used many
automagic tricks to work transparently. But Magic Is Hard To Debug
(TM). So I think the plan is to do it with normal objects first, do
everything explicitly, get it right, and when the system really
works, then you can add back the magic to make it easier to use. But
broken magic does more harm than good.
- Bert -
More information about the Squeak-dev