NetTalk Central

Author Topic: Batch Processing in a NetTalk server  (Read 3316 times)

Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Batch Processing in a NetTalk server
« on: August 23, 2012, 05:43:36 PM »
I have a long process to add to a Nettalk web server application. The process will search many tables and  generate a list to display the results to the users. I am looking for the preferred method to do this. I have inspected the timers (web46) example. In this example the long process runs in a NetWebPage procedure in a clarion loop with yield statements that is disconnected from the webhandler.  This is any easy solution, however I would think that if the  procedure used a hidden window and the process looped off the timer event of the accept loop that this would be better for the overall performance of the web server. Am I correct or does the OS do just as good a job of allocating time to the other threads and thus take the easy solution.  Also I noticed that if the user leaves the page where the process is running on the web46 program, the process procedure thread keeps on running. Any suggestions on how to communicate with process procedure to stop processing because the user has left.

Thanks
Rob Kolanko

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Batch Processing in a NetTalk server
« Reply #1 on: August 23, 2012, 09:55:01 PM »
Hi Rob,

I think  there's probably a better way than the web 46 example.
I'd lean towards something like this;

a) make a form with a Start button and Progress Bar - as described here;
http://www.capesoft.com/docs/NetTalk6/NetTalk6Upgrade.htm#ProgressBars

b) Make the procedure that does all the work - presumably priming an in-memory table, or something the user can browse off.

c) when the process is complete, the user is presented with a link  - this can take him to a browse (on the memory table) so he can see the results.

It's a little more complicated than the "regular" setup, so you need to do each step carefully, but I think the resultant UI will be the best one.

cheers
Bruce


Rob Kolanko

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: Batch Processing in a NetTalk server
« Reply #2 on: August 28, 2012, 07:14:05 PM »
Bruce,
I worked with the progress templates that you suggested. The progress bar worked great with a background task. My issue with the template is that the link that is displayed to the user at the end of the process goes to a new frame/tab of the browser. Since I wish to display another page, the last the last thing, I wish to do is split the user thread into two tabs. The templates are currently too specific for serving a PDF of a report or file, rather than a process delay and then continuing. I suggest an option for the frame of the link shown after the process has completed on the template .

Thanks
Rob
« Last Edit: August 29, 2012, 07:39:31 AM by Rob Kolanko »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11244
    • View Profile
Re: Batch Processing in a NetTalk server
« Reply #3 on: September 04, 2012, 02:51:39 AM »
hi Rob,

In 6.43 I've added the ability to set the "target" of the link.
the default is '_blank' (which means "new tab") - if you want it on the same tab set it to '_self'.

cheers
Bruce