-----Original Message-----
From: Zachary Bedell <[EMAIL PROTECTED]>
To: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Date: Thursday, August 31, 2000 11:28 AM
Subject: RE: CFLOCK on Session Variables
>Okay...
>Last time now...
>This is your server [holds up egg].
>This is your server with out locking [*sizzle*].
>Any questions?....
>
>But seriously... Please allow me to clear up a couple of
>misconceptions in this post.
>
>>> Does a CFLOCK with name="#session.sesionid#" only lock the
>>> variables in
>>> memory for that particular session, or does it lock all session
>>> variables for the application?
>>-- Quoting someone else's thread too:
>>It locks all of the CFLOCK blocks where name="#session.sessionid#".
>>Practically speaking, it locks all of the session variables for that
>>particular session.
>
>That's not 100% true. In practice, IF YOU DO ALL OF YOUR LOCKING
>PROPERLY, then a CFLOCK with name="#Session.SessionID#" will lock all
>of your session vars. Doing your locking properly means you need
>CFLOCKS around every single access to a session var, whether it's for
>reading or writing. In actuality, all CFLOCK does is prevent other
>sections of code from entering a block with the same name as another
>currently executing lock. (See below for more clarity.)
Zac,
Thanks for the extensive explanation. A couple finer points still
aren't quite clear to me. When you say "will lock all of your session
vars", from the rest of your explanation, I gather you don't mean all of
the session variables from all sessions in all applications running on
the server, just all of the variables from one particular user's session
within that particular application.
When you talk about thousands of users hammering an application, I can
certainly envision this. But it would seem to me that session (and
client) variables are the least endangered shared data, since each user
has his/her own set. It's of course possible for a user to have
multiple windows open, or you might have an application using framesets
that reference the same session variables, but the chances for
contention would still seem to be pretty low. I'm not arguing against
locking, just trying to understand "who" is contending for these shared
variables.
The CF docs state: "For session variables, you must assign the session
ID for the lock name." Is that "must" as in "required by the server",
or "must" as in "this is what we recommend". Could a developer gain in
locking granularity by extending the lock name as in
name="#session.sessionid#_variablename"?
Thanks,
Jim
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.