[Zope] replicating stand-alone applications

Jerry McRae Jerry McRae <jerry@usd1.com>
Wed, 31 Oct 2001 14:54:18 -0800


I have three question about moving stand-alone apps into Zope.  If anyone
has answers or suggestions, it would save hours of experimenting.  My
description might seem a bit vague, I am trying to keep the actual
complexity out of this message.

What I have now is a pure Python application that allows sets of users
to define many parameters, kept in lists of tables, and more complex
structures. They then specify a input and output file (simple case,
10-10,000 lines of a CSV text file). When they press the calculate
button, it adds the input file to the existing data (in a permanent
non-SQL file), processes lot and lots of calculations on the date, out
creates the output file.  All the parameters are currently stored in
multiple attributes in a single class, which uses Pickle to save and
load one copy for each client.

1) Are the good, easy, or best way of moving or accessing a Python
container class from a stand alone program?  The class has several
attributes which are containers for any number of sets of complex
structures.  Example of accessing a specific row/ column element
directly (which I don't really do) would be:
 Myclass.payRates['normal']['level']['table'][1,1]
and with the Myclass.operators array, the list of objects it would
contain would have a different format.

My idea was just to read the class in an External Method from the pickle
file it is stored in, then have some Zope scripting to pass parameters
to the method telling it which array to return.  But would this cause a
re-un-pickle each time the External Method is called?

I have not found any products, messages, or how-to's that address these
next two questions that I have.  Are they even *possible* from a web
application, even if the client is assured of having Python?

2) I would like the option of reading the input file and permanent files
from the *users* local hard drive, and the same for writing the output
and permanent (modified) file.

3) The calculation process is intense and could be long (1-10 hours).
The *ideal* solution would be to have the calculation program running on
the clients computer.  That way it isn't dependent on nor bogging down
the server.  I would just have to pass the complex structure of
parameters and arrays to the browser's computer.  Any ideas?

If you made it this far, thanks for reading!

--Jerry