Re: Database Connections

Sebastien Bigaret <[email protected]> 06 Aug 2004 21:44:51 +0200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
[email protected] wrote:
> Take caution to one thing:
> Modeling heavly cache objects. So to be sure to have it working you have 2 
> options:
> - use a single python interpeter (using the ad-hoc apache2 config)
> - or disable Editing Context caches .. 
>
> In this too approach the main drawnback is performance. I think the best
> way to solve this is to use something that give you a finer gain.  I think
> quixote for example can fix that. I mean: You have a 1 process that fork
> and re-use process. By this way you can have Modeling caches (perhaps
> need extra lock to avoid crash) and don't bother w/ the forking needed 
> at every request. (import Modeling is time consumming ..) 

I'm not sure this is exact --I've read your post there, and I do not
agree w/ your analysis: I can be wrong of course since my experience w/
mod_python is really thin, but to my understanding there is a global
namespace available w/ mod-python, the global namespace that exists
within the subinterpreter dedicated to an application.

  And since the sub-interpreter is created once and never destroyed
  (unless apache is restarted :) time needed for imports should not be
  a problem.

[Note: I have only experimented w/ mod_python 3.1.3 for Apache 2.0,
 maybe it's different from v2.7.10 for Apache 1.x?]

> Look at http://www.larsen-b.com/Article/130.html for little deeper explain of
> the problem. 
> 
> I haven't do this kind of stuff for a while.. but i think Modeling need 
> something like Durus do .. a server process.. :) 

Interesting indeed, I'll have a look at that. Do you have experience
with this?  How do they serialize objects that are transmitted between
the server and its client?

-- Sébastien.



-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com