RE: CFLOCK all the time?

2002-03-19 Thread Chris Norloff

Yes, it should be read-locked. CF tries to read the var to see if it exists.

Full checking doesn't really matter.  Good to have it on to help, but don't trust it.  
Don't trust "auto read locking" either.  

Chris Norloff


-- Original Message --
from: "Chuck McElwee" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
date: Mon, 18 Mar 2002 19:33:53 -0500

>Should the statement  be locked?  'Full
>Checking' in CF admin does not object.  I've almost convinced myself that
>it's OK because (I'm making this up) that it is ONLY referencing the pointer
>to, not the actual value of, the session variable.
>
>Chuck McElwee
>etech solutions inc
>www.etechsolutions.com
>
>
>-Original Message-
>From: Dave Watts [mailto:[EMAIL PROTECTED]]
>Sent: Monday, March 18, 2002 6:47 PM
>To: CF-Talk
>Subject: RE: CFLOCK all the time?
>
>
>> Should we CFLOCK every session and application variable
>> or just application variables?
>
>Yes, you should lock every Session, Application and Server variable, in
>every case in which you reference them.
>
>> I know that using CFLOCK can cause some performance
>> issues.
>
>Actually, it's not using CFLOCK that will cause the performance issues under
>load. Your server may very well crash.
>
>Dave Watts, CTO, Fig Leaf Software
>http://www.figleaf.com/
>voice: (202) 797-5496
>fax: (202) 797-5444
>
>
>
__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFLOCK all the time?

2002-03-19 Thread Chris Norloff

Lock all application, server, and session scope variables ANY time they are referenced 
- any read, write, or existence-check.

It's not a big performance hit at all - you can do your own basic timing tests to see 
this.

Not locking will kill your server.  Period.

Chris Norloff

-- Original Message --
From: "John Kivus" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Mon, 18 Mar 2002 18:29:05 -0500

>We're currently having a debate over programming standards at my
>company. Should we CFLOCK every session and application variable or just
>application variables? I know that using CFLOCK can cause some
>performances issues. What do other people think?
>
>John Kivus
>IQ Interactive
>
>FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-19 Thread Dave Watts

> Indeed it does. But in all the instances I just saw (quick 
> review), it was also doing a cfset, which absolutely MUST 
> be locked.
> 
> See, what I want to do is simply this:
> 
> 
>  
> 
>  
>  
> 
> 
> Session.isLoggedIn is set within a cflock (obviously) on a 
> valid login. After that, I include the above code in my 
> Application.cfm and (maybe) do not have to incur a lock 
> penalty. If defined, the session has not expired. I am not 
> referencing the session variable itself, neither reading 
> nor setting it. Just asking, 'Hey, are you defined?'. But 
> maybe not. Err on the side of safety, I suppose.

Let me start by saying that I don't understand the internal operations of
the CF server. However, it would appear to me that the variable that's
actually being locked here is "Session", not "Session.isLoggedIn". If you
want to check for the existence of "Session.isLoggedIn", you have to touch
the Session variable and enumerate the keys within it.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-19 Thread Dave Watts

> Should the statement  
> be locked?

Yes. It's a variable read, according to the CF Server product development
team.

> 'Full Checking' in CF admin does not object.

This is more a flaw with the Full Checking option than anything else. As far
as I can tell, Full Checking can miss several things which are clearly
references to memory variables.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFLOCK all the time?

2002-03-18 Thread Joseph Thompson

Gee.. I dunno.  I had a problem with a script of mine and when I removed the
unlocked read of IsDefined() the problem went away...

> Should the statement  be locked?
'Full
> Checking' in CF admin does not object.  I've almost convinced myself that
> it's OK because (I'm making this up) that it is ONLY referencing the
pointer
> to, not the actual value of, the session variable.
>
> Chuck McElwee
> etech solutions inc
> www.etechsolutions.com
>
>
> -Original Message-
> From: Dave Watts [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 18, 2002 6:47 PM
> To: CF-Talk
> Subject: RE: CFLOCK all the time?
>
>
> > Should we CFLOCK every session and application variable
> > or just application variables?
>
> Yes, you should lock every Session, Application and Server variable, in
> every case in which you reference them.
>
> > I know that using CFLOCK can cause some performance
> > issues.
>
> Actually, it's not using CFLOCK that will cause the performance issues
under
> load. Your server may very well crash.
>
> Dave Watts, CTO, Fig Leaf Software
> http://www.figleaf.com/
> voice: (202) 797-5496
> fax: (202) 797-5444
>
>
> 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Mark A. Kruger - CFG

Yes (sigh) - lock em all.  And as far as performance, unlocked variables may
initially cause your ap to run faster, but the random deadlocks are going to
hang it periodically - which makes your Server a sprinter (and you want a
marathon runner - trust me).

-Original Message-
From: John Kivus [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 5:29 PM
To: CF-Talk
Subject: CFLOCK all the time?


We're currently having a debate over programming standards at my
company. Should we CFLOCK every session and application variable or just
application variables? I know that using CFLOCK can cause some
performances issues. What do other people think?

John Kivus
IQ Interactive

FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Chuck McElwee

Indeed it does.  But in all the instances I just saw (quick review), it was
also doing a cfset, which absolutely MUST be locked.

See, what I want to do is simply this:


 

 
 


Session.isLoggedIn is set within a cflock (obviously) on a valid login.
After that, I include the above code in my Application.cfm and (maybe) do
not have to incur a lock penalty.  If defined, the session has not expired.
I am not referencing the session variable itself, neither reading nor
setting it.  Just asking, 'Hey, are you defined?'.  But maybe not.  Err on
the side of safety, I suppose.

Thoughts?

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:29 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


I just took another look at this article myself and noticed the same thing.
While isdefined isn't covered expressly, the CF manual pages it references
at bottom both use examples that lock session and application isdefined
cfifs.


---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---


-- Original Message --
from: "Chuck McElwee" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
date: Mon, 18 Mar 2002 20:23:00 -0500

Read it many times.  Great article, doesn't address this situation, IMHO.
Thanks.

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-Original Message-
From: Christine Lawson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:08 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Also take a look at the "ColdFusion Locking Best Practices" article by Jim
Schley: http://www.macromedia.com/v1/Handlers/index.cfm?ID=20370&Method=Full

Regards,
Christine Lawson
Macromedia
-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 7:54 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Chuck wrote:
> Should the statement 
> be locked?

You have to lock *everywhere* including here.  This is a hole in CF's CFLOCK
auto-handling, and one of many reasons to lock manually.

---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---






__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Matt Robertson

I just took another look at this article myself and noticed the same thing.  While 
isdefined isn't covered expressly, the CF manual pages it references at bottom both 
use examples that lock session and application isdefined cfifs.


---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---


-- Original Message --
from: "Chuck McElwee" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
date: Mon, 18 Mar 2002 20:23:00 -0500

Read it many times.  Great article, doesn't address this situation, IMHO.
Thanks.

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-Original Message-
From: Christine Lawson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:08 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Also take a look at the "ColdFusion Locking Best Practices" article by Jim
Schley: http://www.macromedia.com/v1/Handlers/index.cfm?ID=20370&Method=Full

Regards,
Christine Lawson
Macromedia
-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 7:54 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Chuck wrote:
> Should the statement 
> be locked?

You have to lock *everywhere* including here.  This is a hole in CF's CFLOCK
auto-handling, and one of many reasons to lock manually.

---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---





__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Chuck McElwee

Read it many times.  Great article, doesn't address this situation, IMHO.
Thanks.

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-Original Message-
From: Christine Lawson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 8:08 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Also take a look at the "ColdFusion Locking Best Practices" article by Jim
Schley: http://www.macromedia.com/v1/Handlers/index.cfm?ID=20370&Method=Full

Regards,
Christine Lawson
Macromedia
-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 7:54 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Chuck wrote:
> Should the statement 
> be locked?

You have to lock *everywhere* including here.  This is a hole in CF's CFLOCK
auto-handling, and one of many reasons to lock manually.

---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---




__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Chuck McElwee

Thanks for the feedback.  I suspect you're right.  Nice looking website!

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 7:54 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Chuck wrote:
> Should the statement 
> be locked?

You have to lock *everywhere* including here.  This is a hole in CF's CFLOCK
auto-handling, and one of many reasons to lock manually.

---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---



__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Christine Lawson

Also take a look at the "ColdFusion Locking Best Practices" article by Jim Schley: 
http://www.macromedia.com/v1/Handlers/index.cfm?ID=20370&Method=Full

Regards,
Christine Lawson
Macromedia
-Original Message-
From: Matt Robertson [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 7:54 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


Chuck wrote:
> Should the statement  
> be locked?

You have to lock *everywhere* including here.  This is a hole in CF's CFLOCK 
auto-handling, and one of many reasons to lock manually.
 
---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---
 
 

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Matt Robertson

Chuck wrote:
> Should the statement  
> be locked?

You have to lock *everywhere* including here.  This is a hole in CF's CFLOCK 
auto-handling, and one of many reasons to lock manually.
 
---
Matt Robertson[EMAIL PROTECTED]
MSB Designs, Inc., www.mysecretbase.com
---
 
 
__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Chuck McElwee

Should the statement  be locked?  'Full
Checking' in CF admin does not object.  I've almost convinced myself that
it's OK because (I'm making this up) that it is ONLY referencing the pointer
to, not the actual value of, the session variable.

Chuck McElwee
etech solutions inc
www.etechsolutions.com


-Original Message-
From: Dave Watts [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 6:47 PM
To: CF-Talk
Subject: RE: CFLOCK all the time?


> Should we CFLOCK every session and application variable
> or just application variables?

Yes, you should lock every Session, Application and Server variable, in
every case in which you reference them.

> I know that using CFLOCK can cause some performance
> issues.

Actually, it's not using CFLOCK that will cause the performance issues under
load. Your server may very well crash.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444


__
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Dave Watts

> Should we CFLOCK every session and application variable 
> or just application variables?

Yes, you should lock every Session, Application and Server variable, in
every case in which you reference them.

> I know that using CFLOCK can cause some performance
> issues.

Actually, it's not using CFLOCK that will cause the performance issues under
load. Your server may very well crash.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFLOCK all the time?

2002-03-18 Thread Shawn Grover

read through the thread "UDF Question".  It is directly related (although,
kinda long winded) to this topic, and can offer some insights.

-Original Message-
From: John Kivus [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 4:29 PM
To: CF-Talk
Subject: CFLOCK all the time?


We're currently having a debate over programming standards at my
company. Should we CFLOCK every session and application variable or just
application variables? I know that using CFLOCK can cause some
performances issues. What do other people think?

John Kivus
IQ Interactive

FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists