persistent db conn
zdys at zdys.de
Sat Mar 22 12:41:23 CET 2003
i am new to python so please excuse me if the questions asked have
already been discussed, in this case just give a pointer.
i am playing around a bit with python(<50 lines of code 'til now).
found that it looks like a fairly readable and powerful scripting
it also looks like s.th. wonderful to do server side http processing. so
i built the typical hello world, then some nav. over file hierarchy
stuff that does configurable html inclusion etc.
so far so good. i found mod_python for apache² and think that speed now is
actualy i am trying to understand how to build a fast db conn¹. basically
this means having a thread running with an existant conn to db, listening
for requests. at least this is what i would expect it to be - right?
so my question is:
 is there a different and/ or faster way to do db conns for mass
 would i launch a thread in the apache python handler, or better start
the thread before starting apache - how would i use this in the fastest
way? would i use sock - and then how? would i try to import the thread
and do method calls? ...
 how would i have to implement this, keeping in mind that i want to use
different db for different named virtual hosts?
 do i have to think about coherent access? if yes: how would i have to
build a short atomic lock or should i rely soley on mysql to do this?
probably this questions have been asked a lot of times. sufficient code has
been written. where?
thanks for your attention
¹ in my case using mysql
More information about the Python-list