At 06:36 PM 8/8/2001 +0200, you wrote:
>"David N. Welton" wrote:
...
>I wanted to check and see how opinions run regarding this?  Concerns?
>>Things you'd like to see?
>My only wish (and concern, too) is that mod_dtcl won't trade off speed for
>new features. Remember that most potential mod_dtcl users are people with
>a large base of Tcl scripts and applications that run as CGI and, as a first
>approach, they will try a 'quick port' with a minimal rewrite of their code.

Hey, it sounds like you're talking about me!
I did a 'quick port' of numerous Tcl CGIs over to mod_dtcl.  My main 
objective was to conserve system resources by sharing interpreters, as some 
of the CGIs were pretty hefty search engines.

I have since attempted to optimize the code a little bit.  One of the major 
things I did was to load the database from a file and store it in an array 
in my own namespace.  eg:  ::myspace.  With this method, I only have to 
load the large database once from file.  For subsequent queries, I can 
access it directly from the array if it exists.

This is all fine and good, except that each httpd child appears to running 
its own interpreter.  So each child has to load a copy of each of the 
databases.  This in and of itself isn't that big of a deal.  Yes, it uses 
resources unnecessarily a little, but I can live with it.

What bothers me is when someone clicks on 'stop' or 'back' in the middle of 
a database search.  If they then start a new search, it often ends up on a 
different httpd child.  Because of this, one abusive user could very easily 
tie up many system resources.  I'd like to be able to use a 
one-search-at-a-time method, disallowing additional searches from that user 
until the results from that user's first search were returned.  But to do 
this, each httpd child must know what every other child is doing.

Admittedly, this could be done by maintaining a current-activity log 
file.  But I'd prefer to keep the file read-writes down to a minimum.  It 
would be easier if I could keep track of current activity in an array in 
memory that every child could access.

Is it possible to access the environment of the other httpd children?  If 
so, it has eluded me so far, and I haven't seen a solution in the 
documentation, either.

As a side discussion, I would appreciate hearing others' opinions on the 
benefits of using compiled Tcl (outside of mod_dtcl) to speed up a search 
engine and lower system overhead.  I was considering both, and I ended up 
going with mod_dtcl.  A typical search query takes 5-15 seconds on the very 
low-end machine.  To be honest, I haven't seen too much of a speed increase 
on searches by using mod_dtcl.  I *think* the system load is a little bit 
better, though.

Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to