Event System Design

Peter Smet peter.smet at flinders.edu.au
Mon Jun 21 05:37:02 UTC 1999


Bob,

This is a very interesting analysis. What I found particularly interesting
is the support for remote events:

[Sensor keyboardPressed] whileTrue: [
evt _ MorphicEvent new
setKeyValue: Sensor keyboard asciiValue
mousePoint: griddedPoint
buttons: Sensor primMouseButtons
hand: self.
self handleEvent: evt.
remoteConnections size > 0 ifTrue: [self transmitEvent: evt]].

Do you remember I was wondering how to extend dependency
and events to support remote objects? With some further thought
and some preliminary ORB stuff, I can now instantiate
RemoteProxy objects. A Proxy represents an object that
lives on another VM. When this is working properly, it can
be incredibly transparent. What this should allow you to
do is make a new RemoteProxy representing the Sensor
in a distant image. With the new events framework, it would
then simply be a matter of saying
Sensor when: #event send: #handleEvent: to: remoteSensor with: evt.
The above code would simply need to be appended with
Sensor trigger: #event with: evt.
For things to work.

This looks to me simpler than having each object specifically
needing to track wether it has any remote connections. In theory
remote dependency should be able to be treated by the
local dependency mechanism.

Thoughts on this, anyone?

Anyway, I might try this idea out and see if it actually works.

Peter





More information about the Squeak-dev mailing list