atom feed7 messages in org.apache.tcl.rivet-devRe: globals
FromSent OnAttachments
Massimo ManghiApr 7, 2006 9:59 am 
David N. WeltonApr 8, 2006 4:00 am 
Massimo ManghiApr 8, 2006 7:09 am 
David N. WeltonApr 9, 2006 12:33 pm 
Massimo ManghiApr 9, 2006 2:59 pm 
David N. WeltonApr 10, 2006 2:51 pm 
Massimo ManghiApr 10, 2006 4:12 pm 
Subject:Re: globals
From:David N. Welton (dav@dedasys.com)
Date:Apr 9, 2006 12:33:13 pm
List:org.apache.tcl.rivet-dev

Massimo Manghi wrote:

Quoting "David N. Welton" <dav@dedasys.com>:

Remember that they are persistent *within the particular instance of Apache* - and since Apache usually runs with several child processes, you can't count on something like a counter working reliably.

child processess? No shared memory that can be handled by a module? I don't know a bit about apache internals. How the word 'persistent' is meant for in this context?

Persistent in the case of globals in Rivet means that, in one particular child process, a variable will not be deleted between requests. Since it's tied to a system process and not a user, it's not useful for user information. On the other hand, it is useful for things like database handles - you can define a proc to check if it exists, create it if it doesn't, and return it in either case.

<? global visits #or ::request::global visits or ::global visits

set visits([clock seconds]) [env REMOTE_ADDR] foreach {t ip} [array get vists] { puts "-> $t $ip <br />" } ?>

My comprehension of the docs is maybe unadequate, but I suggest to reformulate the paragraph in a more schematic form.

Such as...? Want to have a try?:-)

I think this paragraf is too convoluted. It is in a 'conversation style' (I don't have a dictionary at reach, what is the english word for 'colloquiale'?)

'conversational'. Colloquial is something else in english.

but I had to read it twice in order to squeeze out the message (clearly I don't speak or understand english as a native speaker does)

Something more 'brutal' but effective would be a simple statement of the shift in the meaning of the keyword in connection with the issue of persistence. But what is 'persistence' in Rivet anyway?

As described above - at least with regards to 'global'.

Writing manuals for software you know intimately is often difficult, because it's hard to imagine what it's like to not know everything about it:-)

-- David N. Welton - http://www.dedasys.com/davidw/

Linux, Open Source Consulting - http://www.dedasys.com/