Hello Michael,

I don't think trying to write the results out over a period a few minutes is 
best. You'll run into server timeouts, clients not receiving enough of the page 
to render and more.

I think your best approach to do the following:
    * client calls mason page
    * mason page spawns child to do the slow processing
    * mason page returns page with key and refresh header
    * child writes results to a cache with key
    * client calls new/same mason page with key that reads the current results 
from the cache. Then renders pages with refresh if child is still processing.

You may want to read the following articles:
   * http://www.stonehenge.com/merlyn/LinuxMag/col39.html
   * 
http://modperlbook.org/html/10-2-Forking-and-Executing-Subprocessesfrom-mod_perl.html#pmodperl-CHP-10-ITERM-4837
   * 
http://modperlbook.org/html/18-1-Sharing-the-Read-Only-Data-in-and-Between-Processes.html
 
Randal's article covers this approach with CGI. The next couple detail how to 
share data and fork a process under mod_perl, since they are different than 
doing the same thing with a CGI.

Good Luck,

Lee






----- Original Message ----
From: Michael Jensen <[EMAIL PROTECTED]>
To: Mason List <mason-users@lists.sourceforge.net>
Sent: Tuesday, July 8, 2008 1:07:41 PM
Subject: [Mason] Print results in real-time with Mason?

I have a tool that returns over 200 results over the course of a few  
minutes, and so I would like to start printing out results to the  
browser immediately as it processes it. Is this possible in Mason?

-Michael

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to