[plt-scheme] Make multiple attempts to open DrScheme join running process?

From: Todd O'Bryan (toddobryan at mac.com)
Date: Sun Feb 25 02:20:32 EST 2007

On Sun, 2007-02-25 at 01:33 -0500, Eli Barzilay wrote:
> On Feb 24, Todd O'Bryan wrote:
> > As I've mentioned before, I'm running DrScheme in a thin terminal
> > lab and have 30 students sharing one server.
> On a single machine?  I don't think that it's possible.
It really is: http://www.ltsp.org/

I have one $2000 machine (dual dual-core Opterons with 4GB of RAM)
serving 30 stations that each cost $130 (not including monitor,
keyboard, and mouse). If you do the math, that's 30 stations for about
$200 each. The set-up usually works pretty well, even when I have 20
students all using Eclipse at once. Unfortunately, the whole thing
breaks down when the system starts to thrash, and it's only been doing
that, so far, in my intro classes where I use DrScheme.

I've already used the PLT_ONLY (or similar, not at school to check)
environment variable that Robby (I think) suggested to reduce the memory
footprint required for a single student, but students can still bring
down the machine. I don't know much about system administration, but I
think one of the foundational principles is that users should not be
able to, whether through malice or stupidity, be able to screw up the
system for everybody else. :-)

> > Students seem to be in the very bad habit of double-clicking files
> > to open them, not realizing that (I think) this spawns a new
> > DrScheme process and eats up lots of memory.
> > 
> > Is there any way to have subsequent calls to DrScheme (well, the
> > drscheme binary) check for a running version for the given user and
> > open a new tab with the file if there is one, or open a new instance
> > if not.
> It should do this on Windows.  I'm not sure about OSX, but on Unix
> it's very difficult to arrange such things (and not even desirable in
> many cases).

Isn't this what Firefox does? From the man page:
firefox is a simple shell script that will set up the  environment  for
the  actual  executable,  firefox-bin.   If  there is a Firefox browser
already running, firefox will arrange for it to create  a  new  browser
window; otherwise it will start the Firefox application.

Ubuntu (http://www.ubuntu.com) and Edubuntu (http://www.edubuntu.com)are
starting to get a lot of mindshare: Google recently announced that, in
sheer number of searches, Ubuntu had overtaken Mac OS X. Edubuntu, by
default, is designed to run an LTSP server out of the box and to create
a thin-client lab, so my guess is that this question is going to start
coming up more and more.

Plus, it's just embarrassing that a whole class can run a Java program
like BlueJ without making the server thrash while a relatively
Linux/Unix native program like DrScheme seems to have problems in a
multi-user environment. (Okay, that last part was gratuitous needling
meant entirely in fun; I won't trade in my first year of HtDP no matter
how much smoother the Java goes down.)

All help appreciated,

Posted on the users mailing list.