----------------------------------------------------- RSESSION - Session Management for Clusters That Support Failover with Allaire Cold Fusion ----------------------------------------------------- Updated: 8/4/2007 Added CFC version, see ChangeLog Updated: 2/2/2001 Added Custom Tag version, see ChangeLog Updated: 9/13/2000 See THEORY for details and the ChangeLog Updated: 9/8/2000 See ChangeLog for details. For Installation/conversion directions, see INSTALL. ----------- What Is It? ----------- RSESSION state management by Brian Ghidinelli @ vFive Digital Services This is a custom outside-the-box state management system that we built to ward off the demons of CFLOCK and anti-cluster-safe state management solutions found in Allaire's ColdFusion 4.x. It uses a new scope called request.session instead of session. This system mirrors the functionality of the SESSION scope but uses WDDX and a database to provide cluster-safe failover and more reliable variable access in larger environments. Use this code free of charge - I would love to hear from eveone who implements this to hear how it did (or did not) solve your problem and how you're using it. Please check out http://www.vfive.com/rsession for background information and updates. Have a nice day (without using CFLOCK ever again in your RAD platform). --------------------- What Does It Contain? --------------------- README - this file INSTALL - how to install and convert your application THEORY - discussion on how we use it and what you can use it for ChangeLog - Log of all changes made via CVS to this project /code/* - all code templates necessary to run the session management framework /customtags/* - the current version of Rsession wrapped in the familiar format /cfc/* - Rsession converted to CFCs and donated by Jason Baker (therippa@gmail.com) /example/* - versions of /code/ with helpful example applications /sql/* - sample SQL script to create the single necessary database table /presentation/* - HTML presentation from BACFUG in August 2000. Unfortunately a little terse without my commentary. ------------------------ Why It Supports Failover ------------------------ If you're using hardware load balancing and session management with CF, you're likely using "sticky sessions" in your balancer. This ties a single user to a single machine for the duration of their session since the session variables are stored in that particular servers' RAM. If that machine crashes however, your user is completely stranded. Some people are willing to accept that risk - we're not. By storing session state in a central database, state information is available from ANY machine and ALL machines. Once your load balancer detects (usually ~instantly) that a machine has died, that user will be rerouted to another machine (need not be same platform, same OS, etc) transparently and the session will continue with zero interruption. Client variables stored in a database support this to some degree as well although you have less control and no reliable OnSessionEnd capability. For our requirements, this code works very well. ----------------- BIG BROTHER BONUS ----------------- Included in this package is a Big Brother demo application. It allows you to browse active users on the site and view what pages they are currently viewing. Very simple, but illustrates what database access to session data is capable of. Just load /rsession/session_spy.cfm in your browser. ------- Contact ------- Feel free to drop me a line - especially if you're using RSESSION somewhere. We love to hear what other developers are doing with ColdFusion. Cheers, Brian Ghidinelli brian@vfive.com http://www.vfive.com