Check out Ray's cfthread / cfjoin proof of concept, I bet this would do
the trick perfect =)

http://ray.camdenfamily.com/index.cfm/2006/7/21/CFTHREADCFJOIN-Proof-of-
Concept

Chris

-----Original Message-----
From: Randy Johnson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 27, 2007 2:05 PM
To: CF-Talk
Subject: Queue Manager

Hello Everyone,

I need some advice.  I am working on a project.  The cfm page in my
project 
I call "TheBrain.cfm"  this is the page that gets called by my task 
scheduler every 4 hours.

TheBrain.cfm script then makes calls to a web service. I am allowed to
have 
15 simultaneous connections to the web service at any one given point.

This means I will have to create a "thread manager" or if you want to
call 
it a "queue manager" since I am not really using threads.

Currently TheBrain.cfm page uses cfexecute to launch curl commands at
the 
command line to launch the "simultaneous calls". Right now it launches 4

separate processes which means I have 4 simultaneous calls going on.

My first thought was to have a call variable in the database which would
be 
incremented when the execute calls the script and decremented when the 
called script is done making the call.   This seems to be a little
clunky 
and unreliable.  The first thought is: What happens if for some reason
the 
script does not decrement the call count... or if the call count doesn't
get 
incremented then I could have more than 15 calls going on at once.


I thought that an event gateway might be a way to handle this, but I do
not 
know enough yet about those.

I am not sure if I am going the right way about this or not that is why
I am 
emailing a group.

The main thing I need to accomplish is to make sure I do not have more
than 
15 simultaneous requests at 1 time.  I think I need a queue manager of
some 
sort.

 If you have any advice on how I should tackle this I would greatly 
appreciate it.

Thanks!

Randy 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:270844
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to