I've just read the Guide's advice on fork and system calls, but it
doesn't really seem to offer a resolution to the problems it raises.

I'm trying to set up an SMS gateway for my webmail users. The gateway
just uses LWP to contact a web->SMS provider and sends a POST request
(following some redirects in the process). This can be a lengthy process,
so rather than have my mod_perl process waiting, I'd like to pass on the
request to another process. Here are the potential solutions I can think
of and their problems:
* fork(): Memory hog, since it copies the entire Apache process (is this
right--does it share the memory for all the modules etc...?)
* system(): Slow--would have to start up a new Perl process
* Create a simple preforking server and have mod_perl just pass a request
to it through a socket: Seems like overkill.

The most hopeful possibility seems to be fork(), but the Guide says to
avoid it. Isn't almost all the memory shared though?

The other place I'd like to avoid holding up my mod_perl processes is in
waiting for file uploads to finish (which is a common situation as people
upload attachments for their emails). Is there a any way to do this...
perhaps by using some kind of 'gateway' server?

-- 
  Jeremy Howard
  [EMAIL PROTECTED]
  FastMail--Sign up at http://fastmail.fm

Reply via email to