On that note i have another idea i'd like to discuss before i even start
coding a prototype. There is thread on aolserver mailing list about
upload prgoress, so i thought would it be a good idea to have global
url-specific cache of all uploads, let's say, all requestes with
content-length > 0. It will have only 2 alues, current size and total
length and will last only for the time of upload. It will belong to Sock
structure of the Request, so on close it will be freed as well.
Making it url-specific will give Web developer ability to generate
uniaue urls for upload and then request statistics, requests with the
same url will not override each other, server will update statistics for
the first created cache only, subsequent uploads with the same url
will not show anything or show old values which is fine for security
reasons.
Overhead is minimal and it will add one new commmand like
ns_upload_stats url. SockRead will handle it all, so no other places are
affected.
Is it worth trying?
Zoran Vasiljevic wrote:
Am 30.12.2005 um 15:46 schrieb Vlad Seryakov:
I have web applications and server applications running on our server
and in my experience so far i always prefer global caches over
per-thread cache. If you need something local in long running thread,
you can use Tcl global variables to keep state during the processing,
even namespace variables. It is just one Tcl interpreter anyway.
True. But the state can be accumulating over time, though,
leading to extensive memory usage. Hence the cache, as it
can selecively expire things.
But...
I haven't any code needing per-thread caches, yet.
As a tool in the toolbox, OK, but I will not press
on that. I'm perfectly happy with global caches.
Zoran
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/