Over the years, I've rarely used cflock for anything.  I still don't
fully understand when I should use it.

Anyway, I'm concerned about scaling CFMBB... lots of application scoped stuff.

For example, there are many places where I do this:

       <cfset application.forum.updateForumData()>

Application.forum is an instance of forum.cfc ... all the
updateForumData() does is run a bunch of queries to make sure the
denormalized columns in the forums table (msgcount and lastpost) and
in the threads table (lastpost) are up to date.  This method is called
each time a message or topic is posted or deleted, and each time a
forum or conference is created or deleted.

And everywhere I run it, I do this immediately after:

       <cfset application.qryForums = application.forum.getForums()>
       <cfset application.qryThreads = application.thread.getThreads()>

This seems like a place where I might need locking ... but I'm really
not sure =)

In a very busy environment, this code could run a lot... imagine
thousands of active users on a baseball team web site during the world
series.. all posting new resposnes to the "official game thread"...
where you might get 2000 responses or more during a 3 hour game.

And yet your list of threads might get viewed 100 times per second
during that time (which is why I'm putting the data - a relatively
small amount of data.. just list of forums and list of threads) into
the application scope.

Comments?


-- 
Rick Root
Check out CFMBB, BlogCFM, ImageCFC, ImapCFC, CFFM, and more at
www.opensourcecf.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:286908
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to