What I'm really wondering if there's a way to get something like J2EE session replication for the application scope. Storing data which doesn't vary between users in session variables would not only needlessly soak up memory, but it also has the potential to leave some (many) users with old or bad data in the session scope if the shared information changes.
So the problem occurs (and this is why I need something like session replication) when I'm cacheing data in the application scope which was pulled from a db which is shared amongst several coppies of an application installed on different servers in a cluster. Because the data changes infrequently (and requires some massaging after being retreived from the db), it's stored in the application scope, but when it's updated in the db it then has to be refreshed in the application scope. If I'm using the standard application scope for the server then the problem is that if I delete the data or refresh the data on the machine from which the update was made, any of the remaining servers in the cluster which have cached the data now have outdated data and no way of knowing it's outdated. I know that there are ways I can force the data to be refreshed on the other machines even without being able to replicate the application scope, by storing a list of the servers in the cluster in the db and using cfhttp to send information to each of the clustered servers, but this is rather obtrusive and probably slow, so I'm really hoping for a graceful alternative. Even with something like cached queries, I normally use code like (pseudocode): <cflock scope="application" type="exclusive" timeout="30"> <cfparam name="application.qc.myq" type="date" default="#now()#"> <cfset variables.cachedafter = application.qc.myq> </cflock> <cfquery name="myq" cachedafter="#variables.cachedafter#" ...> ... </cfquery> This way when I know that the data has changed and I need to refresh the query I simply set the value of the application variable to Now() as in: <cflock scope="application" type="exclusive" timeout="30"> <cfset application.qc.myq = now()> </cflock> And viola -- the cached query is refreshed. The problem is that if this application is in a cluster, again, the only way to update the cachedafter value on all of the servers in the cluster without something similar to J2EE session replication is to write a rather complex and probably slow sub-application to handle application data across the cluster. > On Monday, Mar 24, 2003, at 18:58 US/Pacific, Jim Davis > wrote: >>> Yes, since you can use J2EE session variables and >>> leverage the >>> scalability of the underlying J2EE system. >> So how does this actually work across a cluster? > See my blog: > http://www.corfield.org/blog/archives/2003_01.html#000055 > and the immediately preceding few articles on how to set > it all up! > Sean A Corfield -- http://www.corfield.org/blog/ > "If you're not annoying somebody, you're not really > alive." > -- Margaret Atwood > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~~~~| > Archives: > http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 > Subscription: http://www.houseoffusion.com/cf_lists/index. > cfm?method=subscribe&forumid=4 > FAQ: http://www.thenetprofits.co.uk/coldfusion/faq > 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 > Unsubscribe: http://www.houseoffusion.com/cf_lists/uns > ubscribe.cfm?user=633.558.4 s. isaac dealey 954-776-0046 new epoch http://www.turnkey.to lead architect, tapestry cms http://products.turnkey.to tapestry api is opensource http://www.turnkey.to/tapi certified advanced coldfusion 5 developer http://www.macromedia.com/v1/handlers/index.cfm?ID=21816 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq 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 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4