If you go down the "java session variables and session replication"
route, don't forget that you can replicate "regular" variables stored in the
session (from strings and numbers to structs and arrays), but NOT cfc
instances. Not only that, but it fails in a bad way: if you put a cfc instance
FOO in the session on server one, replication will create a variable FOO on
server two, but that variable won't point to a cfc instance. In other
words:
<cfif IsDefined("session.FOO")> <--- you will get through here,
there is a variable called FOO in the session...
<cfset session.FOO.sendMessage("hello world")> <--
will fail because session.FOO does not point to a cfc instance on this
machine...
</cfif>
/t
If you are using CFMX under J2EE (enterprise) you can use java session variables and session replication. This way servers managed within the same cluster could share session. Another alternative would be to store keyed session structures in a database with code you could roll yourself - createUUID() at login, then cookie/pass around as a URL parameter, using it to reference session data persisted in the database.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eric Knipp
Sent: Wednesday, September 20, 2006 4:11 AM
To: [email protected]
Subject: Re: [CFCDEV] pls forgiv OT: layer7 switches and sessions - is this correct?
On 9/19/06, Brent Nicholas <[EMAIL PROTECTED]> wrote:I hate answering with "I thinks.." but I do recall in the Advanced CF Book for CF4.5 it had write up's on cluster cats in it for load balancing, I recall it talked about different techniques for making sessions portable. I'm guessing the new Advanced CF books might too.
If that's of help anyway.
Brent Nicholas - [EMAIL PROTECTED]
"I can't afford to make exceptions. Once word leaks out that a pirate has gone soft, people begin to disobey you, and then it's nothing but work, work, work, all the time."
-- Man in Black - Princess Bride
> Date: Wed, 20 Sep 2006 11:01:43 +1000
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: [CFCDEV] pls forgiv OT: layer7 switches and sessions - is this correct?
>
> I'm sorry to post this question here but my regular CF list doesn't
> seem to have had much experiance in this area and I'm hoping someone
> here has. my knowledge of load balancing regarding application
> archetecture is rudamentary (at best)
>
>
> we've got a series of apps on clusters of two servers (each) with load
> balancing using Layer 7 switches. works great if one machine get's
> flakey, etc. this has all been done before I arrived.
>
> one thing that I'm a bit puzzled over, though, is all the apps have
> been designed without the use of session scope. in fact great reams of
> code have been written to handle authorisation via custom ISAPI
> components and headers to get around this, and is done on every
> request.
>
> it also means that ideas of using application- or server-scoped
> collections of data (or singleton components with state) can't be used
> (they could exist on one server and not on the other).
>
> is this correct? using load balancing like this precludes the use of
> shared scopes when it's needed across machines?
>
> is there any easy way** around this?
>
> note: these boxes are all CF6.1, although I am always looking for good
> reasons to get the boss to upgrade.
>
> (**something simplier than, say, getting webservices and/or gateways
> to communicate between machines - I'm thinking of the server-scoped
> singletons holding data)
>
> thank for your help
> barry.b
>
>
> You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm
>
> CFCDev is supported by:
> Katapult Media, Inc.
> We are cool code geeks looking for fun projects to rock!
> www.katapultmedia.com
>
> An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
>
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm
CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm
CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm
CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
