Replacing changed/update experiment..

Peter Smet peter_smet at hotmail.com
Wed Jun 16 03:21:13 UTC 1999


Bob -

I'm on a library terminal with no access to anything,
so I can't file in your code to have a good look at it now.
But I can see you have addressed the main issue, which
is that of eventSymbols hanging onto to empty
Weak collections of subscribers. I was mucking around
last night with the idea of such empty collections
triggering events to get themselves removed!

I did a very rough implementation along the lines'
you did - putting the events IdentityDictionary as
the second index. The sad thing was that
100 timesRepeat: PostOffice testAll did not run any
faster.... :-(
The code also seemed to become more complex, since
extracting subscribers is now buried in deeper layers.

I suspect that most publishers in most programs will
only have small numbers of subscribers. If that is
the case, then maybe the first version was the simpler.
If things ever need to be scaled up to 100's or
thousands of subscribers for a particular publisher,
using the events as the second key is the only way to go.
The good thing is that the particular implementation
of PostOffice is completely transparent to the
objects communicating via it.

The other thing I am finding is that the garbage
collection works brilliantly with newly created
unreferenced objects, but Browser windows,
Prompt windows, Morphic projects etc all hang
around even after their windows have been closed.
'Smalltalk garbageCollect' does not remove these
guys either. Why are they not garbage - how long
are these closed windows meant to hang around?

If you go to a higher level window and delete the
project windows only then do things seem to get
collected.

Andreas, is this behaviour correct, or is my
finalization mechanism in error?

>It's looking real good! I will do some poking around and see if I can break 
>it.

One thing you can't do is get the transcript to display the messaging.
It sends itself a #changed when it does so, putting it into an
infinite loop. However, this is the correct behaviour.

> >The other challenge, which is well beyond me, is how to
> >deal with distributed events....
>
>I'm not sure what you mean here.

Well, say there are two virtual machines, connected via the
internet. MachineA has an object called 'Harry' that subscribes
to event #callMe from publisher 'Sally' on MachineB.
on MachineB, 'Sally' now triggers: #callMe. The challenge is
for the PostOffice to get the message to 'Harry'.
I think we need a ProxyObject class on machineB, that
stands in for 'Harry' and forwards the events to him.

I havent dug deeply into the networking code yet to
see if there is anything like a RemoteObject class.
There is some very interesting stuff with remote
Cursors, however. Any more experienced people know
how difficult it would be to make a RemoteObject?

I think Stephen Pope already has a remote server
that's capable of evaluating smalltalk expressions.
Could this be extended to return the result of a
message forwarded to an Object on the server?

This area probably gets very complex - you have
data marshalling and unmarshalling etc etc. What's
more, many of the issues are already taken care of
by CORBA. A long time ago I started at thread about
using CORBA - I will continue this in a later post.

Peter





______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com





More information about the Squeak-dev mailing list