We skipped session variables in favor of custom client variables and
traded session-scoped CFCs for something akin to a flyweight pattern
implementation.  Our client variables setup is almost identical to
what CF provides, except that it allows complex values (because it's
serialized using WDDX, rather than the lists that CF uses).  What that
lets us do is have a given client variable structure that would take
the place of your session CFC.  Where you'd call a method on your
session-scoped CFC, we call a method on a shared CFC instance, passing
in the client variable structure, which represents the state that your
session CFC would have in instance variables.  The operation does what
it needs, possibly changing the "instance" data from the client
variables, and then exits.

Because the state and functionality are separate, we don't have to
worry about serialization of the CFCs, or even tying them to specific
users.  It's not really what the flyweight pattern was designed for,
but it works pretty well.

cheers,
barneyb

On Fri, 23 Jul 2004 13:42:18 -0500, Dawson, Michael <[EMAIL PROTECTED]> wrote:
> I have read that session-based CFCs cannot be clustered (according to a
> livedoc comment).
>
> Because of this, how many people have decided to stick with using
> session-based CFCs rather than deal with the issues related to
> clustering?
>
> If you decided to focus on clustering and not use session-bases CFCs,
> how did you implement your processes?
>
> I have been asked to support Windows 2003 Network Load Balancing, which
> CFMX 6.1 would support, however, I have my CFCs sitting in the session
> scope.  I thought that an alternative would be to store a session-based
> structure that would hold all the data I would normally store in my CFC
> instance.  Then, I would just call application-based functions that
> would normally be in the CFC instance as well.
>
> My fear is that I would then need to lock each call to the
> appliation-scope functions since many browser sessions could get
> mixed-up data.
>
> Any comments?
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to