At 01:19 10/07/2000 +0000, Jeremy Howard wrote:
>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.

It may only overkill if you have to write it in it's entirety just for that
:) There's plenty of example code and modules to build one such tool
easily. If you don't need all this to be done in real time you might want
to try a simple cron based system. Write your requests to a database, and
have them be sent every now and then.



-- robin b.
Suicidal twin kills sister by mistake! 

Reply via email to