VNC Server

Lex Spoon lex at cc.gatech.edu
Tue Apr 4 22:19:39 UTC 2000


"Stephen Pair" <spair at advantive.com> wrote:
> My project for this weekend was to start implementing a VNC server for
> Squeak ( see http://www.uk.research.att.com/vnc/ ).  This will enable a
> headless squeak to rear a head through a VNC client.
> I've got it mostly working (at a macro level).


Stephen knows this, but the list in general might be interested.
I've been working on a different approach to remote interaction. 
Instead of copying bitmaps from Squeak to the terminal, my system
copies Squeak canvas commands.  Of course, this means it is Morphic-specific,
and that you have to have to implement your own client as well.

But there are benefits.  First, it should be much faster in the long
run.  Commands like "draw a line from A to B" can be represented very
concisely.  XWindows on Unix uses such a protocol, and if you have seen emacs
or Netscape running of XWindows over a network, then you have an idea of
how snappy such a system can be.  As another benefit, since the
*client* is written in Squeak, we can do fun things like drag a morph
out of the shared world and drop it on the local desktop.


I'll try and clean up what I've got and post a system that people can play
with this weekend (which is the first chance I'll really have to clean it up!).
If you want the raw code, you can download it from:

	http://chaos.resnet.gatech.edu:8000/~lex/nebraska/


Philosophically, either Stephen or my system form a different way to
collaborate than sharing morphs around does.  In a nutshell, you bring
users to the morphs, instead of bringing morphs to the users.  Each approach
has its own tradeoffs.  With "bring users to the morphs", you
can immediately watch what other users are doing.  This should be
fabulous for teaching!  On the other hand, with "bring the morphs to the
user", interactions are very fast even when the network is slow.  Furthermore,
it is much easier to get privacy.


Less philosophically, there are some things in there that techies might be
interested in:

	1. Squeak definately assumes a single World and a single user right
now.  For example, currently there is only one active SystemWindow
anywhere, which makes it hard for two users to edit text in different
windows.  :)  As another example, FillInTheBlank's pop up wherever Sensor
is, which is not necessarily where the current Hand is located.  The upshot
of things like this, is that adding multiple hands
isn't going to come for free.  If multiple users becomes a standard mode
of operation in Squeak, there will be a significant cleanup period where
the one-user assumptions are all stamped out.


	2. While most Canvas commands are easy to implement,
#paragraph:bounds:color: is a notable exception.  I notice that the
Postscript guys had to implement some sizable code for this.  :)  I
extended their work into a more general "CanvasCharacterScanner" class. 
Instances of this class can be used to transfarm a "draw paragraph"
command into a sequence of simpler "draw text" commands.   This single
bit of code ought to be able to replace all other implementations of the
"draw paragraph" command,  In fact, I've been using it as a replacement
for FormCanvas's default implementation for a while, and it works just
fine.  Surely it would work for Postscript as well.  If you ever find
yourself implementing yet another kind of canvas (PDFCanvas,
LaTeXCanvas, CurlCanvas, ...), this code might be able to save you some
effort.



Lex





More information about the Squeak-dev mailing list