> I hope you guys can help me, because I'm a newbie to
> multi-server clustered environment and I'm getting more
> confused every day as I try to wrestle with client variables,
> only to find every turn I take leads me to a dead end street.
>
> I have no access to the administrator, the registry or anything
> at all central. In fact it takes a week or more to get a response
> from the system administrator (which is another story that's
> giving me food for thought about where I host my sites!) I have
> to implement an authentication system on a site where I have to
> use client variables, because it's a cluster environment, and I
> am not allowed to rely on any central variable storage.
>
> So that means I have to use cookies, and a table in my SQLServer7
> datasource to keep track of all the CFIDs and CFTOKENS. (Is that
> correct? If not I'm barking up the wrong tree entirely!)
>
> Therefore, I have to create a table in my datasource to keep hold
> of all the sessions. What fields should I have in my table if all
> I want to do is just identify one user session from another? If I
> want to hold the levels of access data too, should I keep that in
> there or go back to the users table every page looking for that info?
>
> And how do I maintain this table so it doesn't just get bigger and
> bigger forever?
You're putting too much thought into this. When you use Client variables,
and they're stored in a database, you automatically create the necessary
tables (CDATA and CGLOBAL, if I recall correctly) in the database you choose
to use. Just like with Session variables, you need to have the browser
return a CFID and CFTOKEN on each subsequent page request; this can be done
most easily with cookies, or you can pass them as URL attributes or form
fields. The tables will hold any data that you put into Client variables.
You don't have to worry about any of that.
Of course, using Client variables will require a database query for each
page within the application, so if you're already using a database to
retrieve user information on each page request, you could simply use your
existing mechanism, and track the user with an identifier of your choice.
In addition, when you create your Client variable repository in the CF
Administrator, it has an option for how long these variables are kept. CF
will delete them after that period has passed.
Since you don't have access to the CF Administrator in your server
environment, it would probably be a good idea for you to install a
single-user version of CF 4.5.x (which comes on your CF Studio CD) or CF 5.0
(the single-user version of which will be available when CF Studio 5.0 comes
out. This way, you can see locally what exactly happens when you use Client
variables, and you can then tell your tardy system administrator exactly
what you need.
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
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists