RE: How to deliver up the page and continuing processing?
Shawn, Since asking the original question I can't claim to be the expert here. Based on the response from Jim and some additional research the idea, at least in our case, is to place the CFFLUSH immediately after the tag. This will cause the page to be shipped off to the site visitor while we have the server continue on with some housekeeping. This is exactly what I was looking for. However, for the purposes of discussion, taking this a step further I suppose one could do some processing. Ship the interim results off to the visitor. Do some additional processing. Ship these additional results off to the visitor. And, so on. This brings up a question in my mind -- how does the server know when to terminate processing a template for good? When it finds and end of file or there is on more code? Nick At 03:16 PM 10/14/2003 -0500, you wrote: >Won't the cf engine finish the entire requested template regardless of >whether or not the browser/user is still there waiting for it? How does >it know to stop? > >-Original Message- >From: Shawn Grover [mailto:[EMAIL PROTECTED] >Sent: Tuesday, October 14, 2003 2:24 PM >To: CF-Talk >Subject: RE: How to deliver up the page and continuing processing? > > >Set an IFrame on your page, with a source pointing at the main processing >file. So your page get's rendered, but then loads another page into the >IFrame. >The downside with this is that if the page is long running, and the user >closes their browser or navigates off the page, the processing won't get >completed properly. > >Failing that, you can use CFFlush to push the current client side elements >to the browser, but continue server side processing. > >Shawn > > >-- >[ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: How to deliver up the page and continuing processing?
Thanks for both the info and sparing me the lecture. CFFLUSH looks like the trick. Nick At 02:18 PM 10/14/2003 -0500, you wrote: >No lecture, but CFFLUSH might do the job for you. Build your page to >flush the display content as it's available, and though the last >tag is written, it can still to all sorts of stuff in the background >after the page has been painted. > >- Jim > >Nick Baker wrote: > > > How do you (can you) make a CFM template deliver up the current Web page > > (template) then move on to process other info, e.g., update DB, sends > > some > > emails, etc? This is not parallel processing. More like finish and > > deliver > > up the current page then proceed on to another template. In this case the > > info the Web page visitors will be served up is not dependent on > > completion > > of all process. Some of the follow on processing could get delayed, > > and we > > want to avoid delaying viewing by the user. > > > > I know -- a question like this often solicits a ton of responses such as > > that shouldn't be a concern with good programming, on a good server, etc. > > Please spare me that lecture :-) > > > > Thanks, > > > > Nick > > > >-- >[ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: How to deliver up the page and continuing processing?
Won't the cf engine finish the entire requested template regardless of whether or not the browser/user is still there waiting for it? How does it know to stop? -Original Message- From: Shawn Grover [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 2:24 PM To: CF-Talk Subject: RE: How to deliver up the page and continuing processing? Set an IFrame on your page, with a source pointing at the main processing file. So your page get's rendered, but then loads another page into the IFrame. The downside with this is that if the page is long running, and the user closes their browser or navigates off the page, the processing won't get completed properly. Failing that, you can use CFFlush to push the current client side elements to the browser, but continue server side processing. Shawn [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
RE: How to deliver up the page and continuing processing?
Set an IFrame on your page, with a source pointing at the main processing file. So your page get's rendered, but then loads another page into the IFrame. The downside with this is that if the page is long running, and the user closes their browser or navigates off the page, the processing won't get completed properly. Failing that, you can use CFFlush to push the current client side elements to the browser, but continue server side processing. Shawn -Original Message- From: Nick Baker [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 14, 2003 1:10 PM To: CF-Talk Subject: How to deliver up the page and continuing processing? How do you (can you) make a CFM template deliver up the current Web page (template) then move on to process other info, e.g., update DB, sends some emails, etc? This is not parallel processing. More like finish and deliver up the current page then proceed on to another template. In this case the info the Web page visitors will be served up is not dependent on completion of all process. Some of the follow on processing could get delayed, and we want to avoid delaying viewing by the user. I know -- a question like this often solicits a ton of responses such as that shouldn't be a concern with good programming, on a good server, etc. Please spare me that lecture :-) Thanks, Nick _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: How to deliver up the page and continuing processing?
No lecture, but CFFLUSH might do the job for you. Build your page to flush the display content as it's available, and though the last tag is written, it can still to all sorts of stuff in the background after the page has been painted. - Jim Nick Baker wrote: > How do you (can you) make a CFM template deliver up the current Web page > (template) then move on to process other info, e.g., update DB, sends > some > emails, etc? This is not parallel processing. More like finish and > deliver > up the current page then proceed on to another template. In this case the > info the Web page visitors will be served up is not dependent on > completion > of all process. Some of the follow on processing could get delayed, > and we > want to avoid delaying viewing by the user. > > I know -- a question like this often solicits a ton of responses such as > that shouldn't be a concern with good programming, on a good server, etc. > Please spare me that lecture :-) > > Thanks, > > Nick > [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]