[Isolate-interest] Does anybody else write Swing apps?

Curt Cox ccox@tripos.com
Mon, 19 Apr 2004 10:53:41 -0500


Greg,

Here are some of the uses that I see for
isolates in desktop applications.  In all of
the use cases, an isolate would be used to
limit the scope of a problem.

1) A sacrificial isolate.  Let's say you are using
some code (usually via JNI) that has the potential
to take down the entire JVM.  You can currently use
Runtime.exec() to create a new JVM and execute the
code there indirectly via RMI.  The main application
can then do something more helpful than crash.

2) A destructible thread.  Let's say that you want
to be able to abort the calculation on a long running
thread.  Currently, you have to write the calculation
code with this in mind, or execute the thread via
Runtime.exec(), which is awkward.

3) Plug-ins.  Any program that supports some sort of
extensibility mechanism may want to limit the harm
that a plug-in can do.  Putting that plug-in in its
own isolate with its own security manager seems like
the only possible way to do that.  The main program
will certainly want a clean way to destroy everything
relegated with the plug-in if resources become tight.
This is especially true now that there are APIs to
identify JVMs causing resource problems.

4) Graphical plug-ins.  Of course this is just a special
case of the previous item.  It is worth special mention
because of all the extra problems it poses.  If the
graphical plug-in has its own top-level window, then
things are relatively simple.  In the more common case,
however, an application will want to supply a plug-in
with screen real estate to manage.

Thanks,
Curt

-----Original Message-----
From: Grzegorz Czajkowski [mailto:Grzegorz.Czajkowski@Sun.COM]
Sent: Friday, April 16, 2004 6:55 PM
To: ccox@tripos.com
Subject: Re: [Isolate-interest] Does anybody else write Swing apps?



Hi Curt,

I ran a bunch of Swing apps on our experimental implementation
of isolates (MVM). The results are described in our USENIX'03
paper ("A Multi-User Virtual Machine"), available from
http://research.sun.com/projects/barcelona. However, I am not
a Swing expert and did not go beyond just putting various GUI
apps in separate apps and then writing a simple app manager.
If you have use cases different from that I'll be happy to learn
about it.

Regards,
Greg