mod_python hackers...

nicc777

Well-Known Member
Joined
Aug 25, 2006
Messages
121
Reaction score
10
Hi all,

I have forced myself to move from Perl to Python over the last couple of months. I'm not 100% there yet, but I am now in the "final" phase - moving from mod_perl to mod_python. Still early days, but perhaps there are one or two things some others here will be interested in.

My experience is documented on my blog: http://4j.blogspot.com/

Now a question. In mod_perl database pooling was simple. In mod_python everything I read suggests some middle layer - like SQL Relay. Is this really the only option? Are there not a more "native" DB pooling solution for mod_python?

Cheers all!
 
RTFM. http://www.modpython.org/FAQ/faqw.py?req=show&file=faq03.003.htp

What they don't mention in the FAQ is that you will need to be very careful if you are using proper transactions (commit/rollback).

To be honest if you are building apps that are complicated or large enough to benefit from connection pooling you might want to forget the mod_python route and use twisted or zope.,
 
Yes - I looked at that FAQ but I found it not working as advertised and hence the second part part of your comment is a bit more interesting for me.

It seems the moment you put some load on the pool it goes into a funny state and everything just grinds to a halt - but it could also be me doing something wrong at this stage ;) Going the SQL Relay route solved this problem, but now I have something in between. I guess it's not that bad - performance is stable under heavy loads and all.

As far as twisted and zope are concerned - I was never really fond of application servers and frame works etc as they each come with their own problems. I guess I will have to at least play with them in Python to see if my concerns are justified...

Thanks for your input.
 
Top
Sign up to the MyBroadband newsletter
X