High performance Python on NT
dick.wall at usa.net
Mon Jun 14 09:12:07 EDT 1999
R Wentworth <rhww at erols.com> writes:
> Tres Seaver wrote:
> > Run, don't walk, to http://www.zope.org. You'll think you've died and gone to
> > heaven.
Agreed, I just used Zope for a project here to replace some java servlet code
which was under-performing. After convincing my bosses to let me demo it,
I got the go ahead. A month later I am running a web based administration
system that is nice and fast, and pretty bullet proof to boot. I actually
used the ZPublisher part of the system and pretty much ignored the templates
and IDE just because I like the hands on approach, and also I wanted to use
the existing Java Servlet templates, which used a different mark-up to the
DTML stuff in Zope.
It was a dream to develop in.
> I looked at Zope a little while ago, and it did seem rather exciting.
> Depends a little bit on your constraints, though, whether it's the
> right solution. I had a project that needed to be hosted via a commercial
> hosting provider, and nobody was willing to run Zope unless I rented
> a dedicated server. (Actually, not really nobody, but with web hosting
> providers it can be devastatingly bad to become dependent on a single
> hosting service unless you've got a lot of prior positive experience
> with them.)
Zope can run in a number of ways though. We use it as a back end to an
existing web-server (in fact website pro since we are using NT as the
OS, the work I did was developed in Linux though because I prefer the
taste of it :-). You do need to run it has a process (UNIX) or a
service (NT) but apart from this and a suitable re-direct on an existing
web server, it has fairly minimal impact.
> I chose instead to go with a solution using the Java "servlet" interface
> (instead of CGI), and writing JPython (http://www.jpython.org/) servlets
> instead of Java servlets. Don't know if this could be considered a
> "high-performance" solution; it avoids the process creation and
> DB connection overhead of CGI solutions, but JPython is inherently
> slower than Python. So, depends what sort of performance matters.
> I expect JPython to be fine as long as I'm not too compute-intensive;
> we'll see. In this model, if I run into performance bottlenecks
> I can improve things by selectively rewriting code into Java.
Well, the Java servlet stuff did not perform as we wanted it too which was
why we started this in the first place. In fairness it was not the servlet
framework itself that was the problem, but rather some of the support
libraries which would not perform quickly or reliably enough.
> (I did have a few other concerns about Zope: I wanted to do some
> non-hierarchical design, and found that the limited documentation
> made attempting such a thing difficult. Still, I hope to have
> an excuse to learn/use Zope someday in the future.)
Agreed, it took me about a week of playing to really "get it" but after
I did, it was smooth sailing from there. I would recommend looking into
using ZPublisher directly, as it helps with understanding the rest of
the system better (at least it did for me).
> Robert Wentworth
More information about the Python-list