I've utilized this method for one of my clients who does real-time indexing
and is on MX 6.1.  We are in an environment with 3 production servers and
the clients wants collections on each server.  However, there is only one
database....so in the content management system, when an admin makes a
change to some data that is indexed, say they are on server A.....well,
server A does the database, update, and then server A fires off a CFHTTP
with a timeout of 1 second on servers A, B, and C....this module that is
called does the indexing update in the collections on each individual
server, but now the admin doesn't have to wait for the indexing to finish
taking place before they can continue.  After 3 seconds of timeouts (1 for
each CFHTTP call), their process continues and their next page loads.  
 
To answer the question below, no you cannot control that process after it's
released from CFHTTP, but you can't control it anyway 'during' a CFHTTP
call.  What we do is have error handling features on these jobs so that if
one fails, a log is written properly, or someone is notified via e-mail,
since no one will ever see the output of the task anyway.
 
I think this is a great way to 'fake' asynchronous processing in MX 6.1.
This client is a fortune 500 company and we've had this in production for
nearly a year now and it works great.  I actually discovered it on accident
one day when it dawned on me that every CF process continues running to
completion or timeout, even if you press the STOP button on your browser.
Setting a 1 second timeout on CFHTTP is just like hitting STOP on your
browser after 1 second.  You get the same result.
 
Sincerely,
 
Dave Phillips
President
WebTech Staffing, LLC
(817) 473-2119

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Christopher Jordan
Sent: Tuesday, March 06, 2007 8:49 AM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: Re: [DFW CFUG] CFHTTP for quasi-asynchrony


Hmm.... I'd never heard of that before, and while it sounds cool, it also
sounds a bit flaky. Do you ever get control of that child process again, or
does it just go off into never-never land? Meaning, if there's ever an error
with that child process, will you ever be notified? Can you ever have that
child process return data to the main application? I don't think I would use
it, but I'm interested in the opinion of some of the more experienced guru's
out there. :o)

Cheers,
Chris

Daniel Eben Elmore wrote: 

It appears that CFHTTP can be used to send off a request asynchronously by

setting the timeout value to 1 sec. CF will return connection time data to

the parent page but the child request will still run up until the CF admin

timeout value.



The question: Am I crazy for building on top of such a "feature"? Anyone

used this before?





-Daniel Elmore







_______________________________________________

Reply to DFWCFUG: 

  [email protected]

Subscribe/Unsubscribe: 

  http://lists1.safesecureweb.com/mailman/listinfo/list

List Archives: 

    http://www.mail-archive.com/list%40list.dfwcfug.org/             

  http://www.mail-archive.com/list%40dfwcfug.org/

DFWCFUG Sponsors: 

  www.instantspot.com/

  www.teksystems.com/





  


-- 

http://www.cjordan.us

_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.instantspot.com/
  www.teksystems.com/

Reply via email to