[Tutor] Zope/Python web devel

Luis N tegmine at gmail.com
Wed Aug 3 22:52:43 CEST 2005


On 8/3/05, Jay Loden <python at jayloden.com> wrote:
> I've been considering some web projects recently, but I have some concerns
> about selecting the tools I plan to use. I like Python, and I was immediately
> thinking of using Zope to build on.
> 
> However, I am concerned about performance, resource usage, and scalability.
> Does anyone here have any experience with Zope or any other application
> frameworks like CherryPy used in a large/enterprise environment? Is Zope
> overly memory hungry or slow? If performance is a key point, am I better off
> growing my own solution from the ground up?
> 
> Second, and more specific to Python itself - does anyone here have first hand
> knowledge of how Python compares with other solutions for server side web
> development? I'm specifically interested in comparisons to PHP, but Ruby,
> Perl, Java, C/C++ and Lisp, etc. observations would be welcome. Basically,
> I'm trying to get a feel for what kind of performance and resource usage I'd
> see out of Python versus other options. I realize this is heavily dependent
> on what exactly I end up doing, but just as a general observation, I'd like
> to know what others have experienced. I know that some large web applications
> are built on Python (Yahoo Mail, Google), but there's certainly less being
> done in Python on the web than in Perl or PHP. I just want to make sure this
> isn't because of Python disadvantages as opposed to simple market share.
> 
> All responses are welcome. If anyone has links to some benchmarking studies
> comparing the two for web development I'd be grateful for those as well.
> 
> -Jay

I don't have any particular experience with the various web
frameworks, but have experimented with most of them. Benchmarks are
more or less useless in this arena (it depends on what you are doing,
and how you intend to do it), and as they say there exists three kinds
of lies: lies, damn lies, and statistics!

Zope2.x is a bit of a bear IMO, but has a great number of packages to
use. The most compelling reasons to use Zope2 might be Plone or Silva.
I didn't pay much attention to CPU usage (usually 0 anyway, unless a
request is firing), but ram for Zope2 from my VPS on a FreeBSD box,
basic functionality, no additional packages, was approximately 24mb;
with Silva, 30mb; and with Plone+Psyco, 50mb. This is just the
beginning of course.

If you want a community site, use Plone, if you want to grok Zope use
Silva. Zope scales http://www.enfoldsystems.com/About/News/oxfam

Zope3 is interesting, but is fairly fresh. Ram usage tends towards
30mb with no additional packages.

Twisted is an excellent framework, with the downside that your code
becomes somewhat tied to Twisted (although this is true with any
framework), and single thread methodology. Nevow+Livepage looks
interesting, but I've never really experimented. Livepage seems to
fail if Twisted is proxied by another server, such as Apache. Ram
usage begins at 10mb, with a fully loaded site, including database
access via an adapter such as pgasync, requiring about 20mb. The most
compelling feature of Twisted is its breadth of protocols i.e. http
server, with xmlrpc and soap, in almost 0 lines of code (provided you
understand the libraries :^)

CherryPy2 is the most interesting in my opinion, the builtin server
tends towards 16mb of ram out of the box. Your code is pure python,
without requiring you to learn many cherrpyism's, which also means
your code will be more portable, say if you wished to create a tk/wx
gui front, in addition to the web. I beleive that the builtin cherry
server is to be depracated in some future release, in favor of WSGI.

I have been writing a rather long CGI, and am intending to port the
code to cherrypy. Not certain about cherrypy's enterprise
applicability, and starting/stopping the server when your code changes
can be annoying, however, it seems to work...

As to the rest of your question, coffee's waiting, and my fingers are tired...

You may get a greater response on the comp.lang.python newsgroup.

Luis.


More information about the Tutor mailing list