[kepler-dev] downloadable actors

Edward A Lee eal at eecs.berkeley.edu
Wed Mar 31 16:06:31 PST 2004


I suspect there are elegant ways to use WebStart to do this...
WebStart has the very nice feature
of being able to add signed jar files to a distribution that
is already out there without having to download and reinstall
everything...

There is already built-in a partial mechanism for this, however.
One of the "quick tour" demos (labeled "Network Integration")
shows use of a composite actor
that is defined in an XML file that is remote, specified by a URL.
The "source" attribute of the MoML specification is used to give
the URL.  This is one mechanism that might work.

However, we have deliberately not supported this mechanism for
actors defined in Java because it would make it all that much more
urgent to address security concerns.  I would want to, for example,
insist on running in a sandbox if I were executing remotely
defined Java code.  At the time, we didn't have an easy way to
do this... Now we do...  If you say:

   vergil -sandbox

you get vergil running in a sandbox...  Given this, I would support
updating the mechanism above to be able to load class files from
the web...

As for downloading tarballs, the MoML parser will find anything
in your classpath when you give a class name.  So all you need
is to put things in your classpath.  There is no need to search
some special directory like ~/.ptolemy.

Edward

At 01:09 PM 3/31/2004 -0800, Xiaowen Xin wrote:
>Hi Everyone,
>
>Something that we'd like to implement as part of SPA/Kepler is an Actor
>Repository with some actors that we don't include as part of the normal
>distribution.  So people can go there, and download additional actors.
>
>What do you all think is a good mechanism for doing this?
>
>More specifically, we could simply distribute a tarball that includes
>the actor source code, class file, and xml configuration file, ask the
>user to unpackage it in a certain directory that's in her classpath.
>Then, ask the user to import that configuration file.  After doing this,
>the actor will get inserted into "~/.ptolemyII/user library.xml", so the
>next time the user runs SPA/Kepler, the system will automatically load
>the actor.
>
>However, this method seems to be quite complicated from a user
>perspective.  It would be ideal to simply have the users download one
>file, put it in a certain directory, and the system automatically loads
>it at startup.
>
>Dave and I have been thinking that we could potentially distribute these
>actors as .jar files, that have the source, class file, and
>configuration file all within.  The user could put this jar file in
>~/.ptolemyII/ and the system should automatically load it at startup.
>
>On the downside, the implementation of this might be somewhat involved.
>We would need to execute something that finds all jar files in
>~/.ptolemyII/ and create our own classloader that has the jar files in
>its classpath.  Then we would need to somehow add the newly found actors
>to the treeview at the lefthand side.
>
>Do you all know of any built-in mechanisms that can help do this?
>
>Thanks,
>Xiaowen
>
>_______________________________________________
>kepler-dev mailing list
>kepler-dev at ecoinformatics.org
>http://www.ecoinformatics.org/mailman/listinfo/kepler-dev

------------
Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal




More information about the Kepler-dev mailing list