A method that you can use instead of this is to run a scheduled process
every minute or so. Use the GetMetricData() function to detect server load,
and if load is low, run the process for a set number of rows / timeframe.
Then record the status of the process and exit. Future requests can carry on
from the previous request.

This makes more sense and it is what CF is made to do. Putting in a sleep
function sounds like a tricky short cut that may cause problems in the
future.

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Mark Stanton
Sent: Thursday, 31 August 2006 10:28 AM
To: [email protected]
Subject: [cfaussie] Re: Why bother



Hi Joel

We have made good use of thread.sleep() in a case where we had a very
long and CPU intensive process. This process made the rest of the site
crawl when it was being run and so it was scheduled for just after
midnight.

It doesn't really matter how long it takes for the process to run so
we added in some logic to force the process to sleep for a couple of
seconds after every few iterations through a loop. This allowed other
threads to use the CPU.

The end result is we can now run this process at any time without any
significant impact on users.

Just one example..

On 8/31/06, Joel Cass <[EMAIL PROTECTED]> wrote:
>
> Why are you using "sleep functionality"? All it does is lock up valuable
> threads. I would seriously consider leaving the CF realm if adobe ever
went
> down the path of creating such tags to please the community.. What's next?
> <CFCrashServer restart="tomorrow"> or <CFClogMemory until="serverdown">? I
> guess these would be useful for load testing, but they can be done in Java
> anyhow. Well except the restart=tomorrow part, which would have to be
> scheduled externally.
>
> ModelGlue is nothing like RonR. At webDU I remember someone once said that
> RonR is like an MVC for designers. ModelGlue is fully XML powered and is
> powered by events. ModelGlue on the other hand is more directed at
> programmers, being XML powered and using an events subsystem for the whole
> basis of an application. There are a lot more steps to building an app
with
> modelglue.
>
> I agree with all the positives of CF and none of the negatives mentioned
> here. My own negatives for CF are:
> - Web Services support could be better
> - The Licensing needs to be fixed up so that CF applications can be sold
as
> WAR files without the need to apply a full CF server license to the end
> price.
>
> But these are so minor that there really is no point in moving on to
another
> language. The only thing I would like (and this makes sense) is for a
basic
> version of the CF server to be open sourced (with any core changes
> controlled by adobe). This would take the pressure off Adobe (lets face it
> CF has moved under 3 different vendors, two of which no longer exist) and
> would allow the application to evolve to meet standards and needs. But
it's
> really out there.
>
> Think of it. Adobe could leverage the open sourcedness of CF to integrate
> all their publishing applications, which is what they are really known for
> (and are probably a lot better at).
>
> Joel
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED]
> Behalf Of <cfgroupie>
> Sent: Thursday, 31 August 2006 8:16 AM
> To: cfaussie
> Subject: [cfaussie] Re: Why buy into CF?
>
>
>
> Hey Andrew,
>
> SIde note. I think there is a sleep functionality coming out. We are
> calling the java code directly at the moment.
>
> J.
>
>
>
>
>
>
>
> >
>


--
Mark Stanton
Gruden Pty Ltd
http://www.gruden.com






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to