[Pipet Devel] Random thoughts on application wrapping

Brad Chapman chapmanb at arches.uga.edu
Sat Dec 18 01:58:34 EST 1999

Hello all!
	I was messing around with CORBA and trying to make myself a little
piped program that called an already existing program when I got hard into
thinking about how to wrap applications so that they can be run within the
python framework of Loci. So I was just wondering, what is the proposed
mechanism for taking an existing program (say the dnacomp program of
phylip, written in c) and allowing it to be called from a loci script. I
could come up with two possible ways to do this:

1. The Applab way: Applab, a java application wrapper for CORBA (which has
been mentioned on the list several times) does the following to incorporate
a program:
  a. has an IDL interface for controlling and running outside apps (ie.
  our dnacomp program)
  b. requires the construction of a meta-data file describing the interface.
  c. parses (using a perl script) the meta-data file into java code which fits
  into the server side implementation and wraps the program.

2. The other way I could think of: This way would be to generate a wrapper
for each individual program based on its language and the methods that are
avaiable to do that. For instance:
  a. we could wrap C and C++ programs using SWIG (http://www.swig.org)
  b. we could deal with Java programs by using JPython to input their classes
  and then do scripting between them.
  c. we could deal with Perl/Tcl programs by using Minotaur
  (http://mini.net/pub/ts2/minotaur.html) to imbed perl and tcl scripts into
  python classes and then run them from there.

Either way has pluses and minuses. I think the first way is nice because it
allows a consistent method to "port" a program to Loci. However, unless we
decided to use the applab language and/or parser, we would have to describe
our own input language and then design a parser to deal with it. The second
way uses already exciting programs, but it a lot uglier because it is
different for every app ported and thus makes the porting process very
difficult for a non-programming-user of Loci.
	Is any of these two ways I mentioned about something anyone else
was thinking for wrapping programs so they can run in Loci? Or have I
completely forgotten an obvious way. Thanks in advance for any help anyone
can provide on this dillemna of mine!


More information about the Pipet-Devel mailing list