On Mon, Aug 10, 2009 at 11:18 AM, Michael Peters<[email protected]> wrote:
> I would actually suggest that you don't fork your web process to do
> background tasks. The problem is that your web processes are generally much
> heavier than you need which means wasted resources.

I would definitely second this.

Michael suggests using a separate daemon/queue -- that's definitely a
good option, but another possibility would be to do a fork+exec in
your code. With the exec, the existing process state is replaced with
a new process. I've actually done something like this recently, so
feel free to ask if you run into issues. The hard part is getting all
the state you need into the new process; IPC::Open3 can work for this.

-- Dan

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################

Reply via email to