advice on infrastructure for porting an application

Eugene Leitl Eugene.Leitl at lrz.uni-muenchen.de
Wed Mar 7 08:47:49 EST 2001


I'm porting a legacy cheminformatics application (currently available in
two incarnations: a pure Windows and a cgi-bin (Perl and C) under
Solaris). It lets you paint a target molecule in an editor, and offers you
several synthesis paths to it (taken from a proprietary database
containing millions of reactions). User-driven iteration of above on
educts (synthetic precursors) results in a synthesis tree.

Here's a mockup of a session, in case you're interested:

	http://www.lrz.de/~ui22204/mockup.gif

The new architecture has the following features:

* crossplatform (at the very least *nix, Windows), GNU gcc as target
* should be able to run both stand-alone and over network
* should be driven via a browser

What I would like is to deliver a (single or several) binary with a
system-dependent installer script. It would be of course nice if it itself
would be written in Python, and frozen into standard C.

I've looked at CGIHTTPServer, which was trivially easy to freeze. The
performance and functionality is sufficient to be run over localhost or
network, as the query will be the bottleneck. I'm looking at
CGIHTTPServer.py right now, but don't quite understand how it handles
cgi-bin scripts which are written in Python. If I freeze the http server,
it already contains a complete Python interpreter, so presumably it would
be able to fork (on architectures which support that, that is) and execute
the script natively. But all it seems to do is a os.execve(scriptfile,
args, env). If I'm getting this right, has anybody a version which doesn't
involve the overhead of calling a large frozen binary (for obviously I
can't contaminate customer's machine with random Python installations).
Btw, I rather liked the discussion of how to package stuff you want to
ship to your customer found here http://www.mcmillan-inc.com/install1.html

The parts of the legacy app which written in C (which I would want later
to rewrite in Python) could be incorporated by extending Python, right?

I'll be probably needing a number of other applications, such as Gadfly
for the session list manager, which will probably reside in several
independent instances, each burdened with it's own Python interpreter and
whatever else freeze will see fit to include. This is not pretty, but I 
guess it will do as long the redundancy will remain tolerable. Plus,
calling a binary each time afresh gets rid of memory leaks, if any.

I'd welcome your comments to above thoughts. Yes, I have no practical
experience with developing nontrivial under Python.

TIA,

-- Eugene

______________________________________________________________
ICBMTO  : N48 10'07'' E011 33'53'' http://www.lrz.de/~ui22204 
57F9CFD3: ED90 0433 EB74 E4A9 537F CFF5 86E7 629B 57F9 CFD3





More information about the Python-list mailing list