the last project I was on (diff employers), the boss got me to make up
a server-scoped CFC that did "pre-emptive record locking"

that is, any edit request put an entry into the locking CFC ( a simple
queryAddRow() ) so if someone else made the same request they were
told it was already locked for editing (what, when and by who), and to
"come back later". When the first person finished editing (or a set
time-out happened) the lock was "released"

I hated the idea. but I did it and it seemed to do what the boss
wanted .... if you only had one server.

these ppl are making turn-key solutions for a specialised market.
Shortly after this, they announced they wanted to expand into an ASP
model to "deliver solutions" to all the smaller clients.

regarding CFC replication across servers: they're up poo creek with
this record-locking idea, yes?

(that's why I was asking about CFC replication across machines - using
my previous employers as an example to see what can/can't be done)

but the questions about sessions are my immediate concern.

thanx for the suggestions, ppl.

last question: anyone still using ClusterCats?

cheers
barry.b



On 9/20/06, RADEMAKERS Tanguy <[EMAIL PROTECTED]> wrote:
>Just an idea. If the session is created but not the instance, couldn't
>you use something like the IsCFC UDF from cflib.org
>(http://www.cflib.org/udf.cfm?ID=743) to check if the CFC has been
>instantiated. If is not, then instantiate the component as in:
>
><cfif IsDefined("session.FOO")>
>     <cfif not isCFC(session.FOO)>
>          <cfset session.FOO = createObject("component",
>"pathToFoo").init(whatever)>
>     </cfif>
>     <cfset session.FOO.sendMessage("hello world")>
></cfif>
>
Yes, you could do that.

>You still wouldn't have the data that was associated with the
>CFC in the
>first place, but this may work. Either that or switch to Blue Dragon,
>which does full session replication.

An idea would be to implement the memento pattern using structs and put
THAT in the session. Think of it as a way to replicate a cfc instance's
data without behavior. You would use the same code as your example,
except:

<cfset session.FOO =
createObject("component","pathToFoo").init(whatever)>
becomes
<cfset session.FOO =
createObject("component","pathToFoo").setMemento(session.FOODATA)>


/t


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]

Reply via email to