Application-scoped instances are a wonderful thing.  And having a
clustered environment makes them easier to deal with, not harder,
because you can take a server out of the cluster, let it rebuild it's
in-memory instances without load, and then reinject it.  Repeat for
the rest of the cluster, and you've got a zero-downtime upgrade.  If
you've got a large cluster, best to take half the servers down,
upgrade them, then switch halves.  As long as you don't need more than
half your servers to deal with the load (which you shouldn't, because
you should do upgrade under non-peak load, and most load cycles are
more than 50% deltas), you can do it all in two steps.

Particularly with larger applications, instantiating a large number of
CFC instances on every request (rather than leaving them in the
application scope across requests) can be a real bottleneck.  Hundreds
or thousands of milliseconds per request, if the instances need to do
complex initialization.  Almost always better to cache the instances. 
Just watch out for potential race conditions as multiple requests can
be accessing the shared instances at any given time.

cheers,
barneyb

On 6/9/05, Douglas Knudsen <[EMAIL PROTECTED]> wrote:
> I'd suggest keeping gateways with objects or purposes, having a site-wide
> one will certainly tend to grow to immense porpotions. This from a bad
> experience following me around where I work. Also, IMHO, stay away from
> application scoped cfc instances unless you really really need them. They
> are a PITA when you need to update the code, most notably when you are in a
> clustered environment.
> 
> DK

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209152
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to