On Thu, Feb 2, 2012 at 10:22 AM, Raymond Camden <raymondcam...@gmail.com>
 wrote:

> I'd also argue that sometimes race conditions may not matter.
>

On project I've worked on, this is true 99.9% of the time.


> Consider a session variable that tracks the # of pages you have viewed
> in your session. If I pop open a new tab and start reloading them both
> like crazy, it's possible the values may end up borked. But do we
> care? No. If it's just a simple stat and it's not perfect, then I'd
> ignore the hassle of locking the write/reads.


...and this is a pretty unusual use case with all the analytics packages
out there. Really, I have a pretty hard time thinking of a good use case
with race conditions that goes beyond a contrived impractical example.

Banking maybe?  Though in most cases I'd going to be doing much of that
type of work in the DB and even if I'm not, it's probably going to be in a
scope that doesn't live past a single request.

Most of the examples I see are things that shouldn't be using the Session
scope at all anyway.

Of course, folks are free write their apps any way they want, but I just
don't see it as a problem.  I very very very rarely lock (or have need to
lock) session vars. I don't think I've  personally found reason in any
project I've worked on since CF5.

-Cameron

-- 
Cameron Childress
--
p:   678.637.5072
im: cameroncf
facebook <http://www.facebook.com/cameroncf> |
twitter<http://twitter.com/cameronc> |
google+ <https://profiles.google.com/u/0/117829379451708140985>

...


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:349765
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to