The principles I spoke of in my post still apply, but CFLOCKs with
SCOPE=Session only key to the one user's session now. ?
Named locks on code that access the Server or Application
scopes, or that try to safeguard non-threadsafe CFX tags by
single-threading access to them via named exclusive
You're mixing your words now
How true - I was falling into the trap of not being very careful how I
described something.
You're still misunderstanding
I've been trying to understand why cflock is misunderstood (as well as
confirming my thoughts about what it really did). I'm a real time
The way cflock worked with session locks in 6.0 did mean that you got
locking contention when you weren't even thinking you should. Module A in
session 1 would lock out module B in session 93, when there was no need at
all to do that (aasuming that they both had exclusive session locks).
Yes,
If you're not having any contention issues *under load*, then don't
mess with it
I am having problems under load, but I'm not convinced that they are locking
problems. Early this morning I upgraded the live server to 6.1, and 6.1
reacts very differently to 6.0. The performance curves are
On Tuesday, Aug 19, 2003, at 05:13 US/Pacific, Alan Ford wrote:
Early this morning I upgraded the live server to 6.1, and 6.1
reacts very differently to 6.0. The performance curves are different,
when
it goes wrong it goes wrong differently, so I'm reassessing what
problem I
have and how
As the size of your codebase that accesses shared resources grows
linearly, the speed with which that code may safely execute slows
exponentially if you use scoped locks rather than named locks
That's very interesting. Do they say why? And do they say this applies to
session scope, application
Scoped vs Named locks - CFMX Bible (Wiley - Arehart et al.):
Authors recommended approach is to plan a set of named locks for
accessing shared resources.
I know you say it comes from the cfmx bible (is that worth buying, by the
way? Charlie told me it was, but then he would, wouldn't he? :-))
No it doesn't because the documentation is talking about a *specific*
fragment of code which *by definition* must have the same
name/scope value.
I think that is far from clear in the documentation (and I've been around CF
for more than 3 years). I am certain it is far from clear if you are a
You are very welcome. It's a topic that many have tried to explain to me and
your explanation was by far the best I've heard so far.
I'm not sure if there has been a CFDJ article on this topic (I suspect that
there has been at least one), but I think another would be very welcome,
especially
they're run concurrently. But I think he postulated an interesting theorem.
/charlie
-Original Message-
From: Alan Ford [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003 8:51 AM
To: CF-Talk
Subject: Re: cflock - what does it do? Exactly?
As the size of your codebase
for the 6.1 release.
/charlie
-Original Message-
From: Alan Ford [mailto:[EMAIL PROTECTED]
Sent: Monday, August 18, 2003 9:19 AM
To: CF-Talk
Subject: Re: cflock - what does it do? Exactly?
Scoped vs Named locks - CFMX Bible (Wiley - Arehart et al.):
Authors recommended
I've been careful not to offer an opinion on the book based on my own
opinion
You are quite correct - I misquoted you (sorry). I heard you mention the
book at the CF get together in London and all you did say was what others
had said about it.
Regards,
Alan Ford
On Monday, Aug 18, 2003, at 09:32 US/Pacific, Adam Churvis wrote:
Think of a SCOPE lock as being kind of like a NAME lock uses the name
of the
scope as its value, so that lots and lots of code uses the same
synchronization key, then imagine how much more locking contention
you are
likely
Note that the following has changed meaning between CFMX and CFMX 6.1:
cflock scope=session type=exclusive
...
/cflock
In CFMX (6.0) this would behave as you say, i.e., as if it were a named
lock, and so it would single-thread for every user.
In CFMX 6.1, this only locks per-session so
Scoped vs Named locks - CFMX Bible (Wiley - Arehart et al.):
Authors recommended approach is to plan a set of named locks for
accessing shared resources.
I know you say it comes from the cfmx bible (is that worth buying, by the
way? Charlie told me it was, but then he would, wouldn't he?
On Monday, Aug 18, 2003, at 07:13 US/Pacific, Alan Ford wrote:
What it does affect are other threads running
concurrently, so it's a nonsense to deal with the documentatuion as if
the
only thread that exists is this one.
You're still misunderstanding: the documentation specifically
PROTECTED]
Sent: Tuesday, August 19, 2003 5:02 AM
Subject: Re: cflock - what does it do? Exactly?
On Monday, Aug 18, 2003, at 09:32 US/Pacific, Adam Churvis wrote:
Think of a SCOPE lock as being kind of like a NAME lock uses the name
of the
scope as its value, so that lots and lots of code
Sean - so if I understand correctly this means that performance benefits
of
named locks over scoped locks (as noted in the cflock postings on your
blog) are no longer huge?
So in summary for shared scope vars scoped locks are not going to result
in
the app taking a performance hit. Named
Thanks Adam
Great job on the book :-)
regards
Johan
- Original Message -
From: Adam Churvis [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 8:26 AM
Subject: Re: cflock - what does it do? Exactly?
Sean - so if I understand correctly this means
Message -
From: charlie [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Saturday, August 16, 2003 11:12 PM
Subject: RE: cflock - what does it do? Exactly?
Alan, this is a source of frequent confusion. First let's restate that in
both CFMX and BlueDragon, because they're built atop Java
You should only require a CFLOCK when setting a Session level
variable. It should not be required when reading from this scope.
I disagree with this. Prior to MX, you would need the lock for both
setting AND getting. You can get away with both in MX, however you were
speaking of being
Hey all,
The rules for Locking session variables on each set and get have changed
for MX?
If code is meant for MX and MX only, there is now no need to Lock each
session set/get?
-Gel
-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]
You should only require a CFLOCK
AM
To: CF-Talk
Subject: RE: cflock - what does it do? Exactly?
Hey all,
The rules for Locking session variables on each set and get
have changed for MX? If code is meant for MX and MX only,
there is now no need to Lock each session set/get?
-Gel
-Original Message-
From
0_0
Oh...s..umm..I should use my best judgement...
Sometimes it is ok not to, but other times I should.
If it makes sense.
Logically.
...
...
...
Okies.
*makes note to self to lock EVERY session variable read and write*
-Gel
Better to be safe than sorry =)
-Original Message-
From:
of the same name.
Jim Davis
-Original Message-
From: Alan Ford [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 16, 2003 4:21 AM
To: CF-Talk
Subject: cflock - what does it do? Exactly?
I've seen cflock scope = session type = exclusive described in
two
ways in the documentation (and I
Alan, this is a source of frequent confusion.
Darned tootin!
I have to say that a lot of the confusion has been caused by Allaire / MM
themselves. The definition here
http://livedocs.macromedia.com/coldfusion/5.0/CFML_Reference/T
ags57.htm
is just downright wrong, and a lot of other sites
Which is often helped by using an include/custom tag/component/function
scenario for these resources.
Agreed. Especially components.
Regards,
Alan Ford
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Obviously this would need to be locked since a framed site might set
began twice.
But what if the site is not framed? Yes, the same code could be run twice if
a user pressed F5, but should we worry about that as a matter of course?
In short, what's the agreed best practice about locking
: cflock - what does it do? Exactly?
Alan, this is a source of frequent confusion.
Darned tootin!
I have to say that a lot of the confusion has been caused by Allaire / MM
themselves. The definition here
http://livedocs.macromedia.com/coldfusion/5.0/CFML_Reference/T
ags57.htm
is just downright
I've collected everything I culd about locking in Pre-MX here, you may
want to check it out
I did, and it is very interesting. Would you make the same locking
recommendations in cfmx?
Regards,
Alan Ford
~|
Archives:
Chris,
I find this (from the 6.1 docs you gave the url for) to be incredibly
unclear and potentially misleading -
a.. Exclusive allows single-thread access to the CFML constructs in its
body. The tag body can be executed by one request at a time. No other
requests can start executing code within
Just to go back to the 6.1 docs -
The definition of the scope attribute is wrong - it ignores the difference
between read-only and exclusive locks. Same comment about the name
attribute.
The definition of the type attribute is poor - it simply does not convey the
full meaning. It does not say
Charlie,
One cflock topic you didn't mention is named locking of non-variables - such
as the file system. Under what circumstances should file accesses be locked,
and, conversely, when is it ok to let them go unlocked? If I simply want to
write, read or delete a disk file, and there is no
Johan Steenkamp
www.assetnow.com
- Original Message -
From: Alan Ford [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, August 18, 2003 8:22 AM
Subject: Re: cflock - what does it do? Exactly?
Charlie,
One cflock topic you
, 2003 8:22 AM
Subject: Re: cflock - what does it do? Exactly?
Charlie,
One cflock topic you didn't mention is named locking of non-variables -
such
as the file system. Under what circumstances should file accesses be
locked,
and, conversely, when is it ok to let them go unlocked? If I simply
On Sunday, Aug 17, 2003, at 13:42 US/Pacific, Johan Steenkamp wrote:
Named locks are preferable to scoped locks - see details from Sean
Corfields
site here
http://www.corfield.org/
index.php?fuseaction=blog.archivemonth=2003_01 (Jan
6 entry - halfway down page)
This URL goes straight to
problems.
In effect with MX locking has gone from being a life-or-death thing to a
very useful tool (just as it should be, I think).
Jim Davis
-Original Message-
From: Alan Ford [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 17, 2003 3:48 PM
To: CF-Talk
Subject: Re: cflock - what does
On Sunday, Aug 17, 2003, at 12:33 US/Pacific, Alan Ford wrote:
But what if the site is not framed? Yes, the same code could be run
twice if
a user pressed F5, but should we worry about that as a matter of
course?
Answer: it depends.
If repeated execution of the same code just reinitializes
On Sunday, Aug 17, 2003, at 13:02 US/Pacific, Alan Ford wrote:
'single-thread access to the CFML constructs...' - what does that
mean? 'The
tag body can be executed by one request at a time' - not true; it
depends on
the name given or the scope given.
No it doesn't because the
- Original Message -
From: Sean A Corfield [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, August 18, 2003 9:03 AM
Subject: Re: cflock - what does it do? Exactly?
On Sunday, Aug 17, 2003, at 13:42 US/Pacific, Johan Steenkamp wrote:
Named locks
:[EMAIL PROTECTED]
Sent: Sunday, August 17, 2003 3:02 PM
To: CF-Talk
Subject: Re: cflock - what does it do? Exactly?
The words used here are nothing like as simple and clear as
the ones Charlie used on this thread. And given the confusion
that has existed in the entire CF community ever
On Sunday, Aug 17, 2003, at 14:31 US/Pacific, Johan Steenkamp wrote:
Sean - actually I the cflock posting preceeding the Jan 6 is also
relevant.
I could not find it however. Is the search on your site working? Did
not
return anything for cflock or locking.
I had a bit of a catastrophe in
I've seen cflock scope = session type = exclusive described in two
ways in the documentation (and I have my own, different, understanding of
it) - I'd be interested to know which one is true.
a) It holds the only exclusive lock for that session. Any other code for the
session can run; the only
The SESSION type should only be used for the setting or updating of Session
variables. Later versions of CF are not as unforgiving for the lack of using
CFLOCK but you would be a better programmer, particularly in a hosted
environment, to continue to lock crucial elements of your code.
You should
August 2003 6:21 PM
To: CF-Talk
Subject: cflock - what does it do? Exactly?
I've seen cflock scope = session type = exclusive described in two
ways in the documentation (and I have my own, different, understanding of
it) - I'd be interested to know which one is true.
a) It holds the only
, August 16, 2003 3:21 AM
To: CF-Talk
Subject: cflock - what does it do? Exactly?
I've seen cflock scope = session type = exclusive
described in two ways in the documentation (and I have my
own, different, understanding of
it) - I'd be interested to know which one is true.
a) It holds
46 matches
Mail list logo