Jorey Bump
list at joreybump.com
Mon Nov 7 09:03:00 EST 2005
Anthony L. wrote: > code since I already am expecting a hard time finding low- cost > dedicated hosting with Apache 2 and mod_python 3 support. You'll really need to know how to configure and administer your own server to get the most out of mod_python. The most you could expect from a hosting provider is a good colocation or virtual server environment. I doubt if I'd be happy with any preconfigured mod_python setup. > 1. I want to use CGI through Publisher handler, instead of CGI handler > or PSP. Despite the speed increase mod_python gives me, there is a > problem of persistence that can be a problem when dealing with a site > that will hosts potentially hundreds of simultaneous users. Not sure what you mean. mod_python isn't CGI. Since it embeds the interpreter, it's *more* persistent. Could you be more specific? > 2. I have found nothing to quantify the stability and reliability of > mod_python 3, and in the absence of a list of major commercial sites > that use mod_python, I am left feeling as is there might be technical > (read as stability/security) reasons to favor mod_perl over mod_python. mod_perl shares many similarities with mod_python, and really big sites that use mod_perl encounter the same issues that are often discussed on this list. The difference is that mod_perl beginners typically use the mode where a script is run once then unloaded, like CGI, but without the overhead of starting an interpreter every time (this may be what mod_python's CGI handler does, but I've never used it). Since there are many, many CGI scripts already written in perl, it's easy to run these under mod_perl without modification. But I don't see any stability or security advantages to mod_perl at all. > 3. I am not very attracted to PSP because I want to separate the logic > from the presentation as completely as possible, and PHP and other > template languages including PSP seem difficult to do that in. Learning This is the main reason I use mod_python.publisher. > template systems like PyMeld is an unattractive option for me since I > don't understand their benefit. Why can't I just use req.write() to > output my markup, relying completely on external CSS after the fact? My > thought is that HTML templates provide a minimum set of static code > that doesn't require extra processing, thus keeping performance up. > However, if I minimize my use of req.write() will it make a difference? I never use req.write() with Publisher, I return the final page as a string (Publisher adds the headers). Arguably, req.write() can reduce memory overhead if you're generating huge pages for a large number of connections, but I haven't needed to deal with that, yet. > 4 A final question, is mod_python 2.7 suitable for use in a commercial > production system? All I'm doing is text processing, string > manipulation, database calls, and some very minor mathematics. If the > Apache 1.3 series mod works fine, can I relieve myself of some stress > and go with that combo? I use it in production, but I don't recommend it. It's not developed anymore, and you need to take some additional precautions. There are enough advantages to using Apache 2/mod_python 3 that it's well worth moving on to recent versions. Fortunately, they are both fairly easy to compile and install if your platform only packages the old versions. > I'd appreciate some practical advise on this. I am funding this myself > on a small budget with no hard deadline, so it is critical to me that I > choose a language that will minimize my costs. Are my assumptions > correct, or am I falling prey to FUD? Language choice is personal, so you'll have to determine that yourself. I find that I'm more productive using Python, but I also need a lot more control over the environment than I do with PHP, which has fewer portability issues. Short of making a recommendation, I agree with many of your points and use mod_python for most of my projects, so it might also be a good choice for you.
|