On Wed, Oct 04, 2000 at 02:42:50PM -0700, David E. Wheeler wrote:
> Yeah, I was thinking something along these lines. Don't know if I need
> something as complex as IPC. I was thinking of perhaps a second Apache
> server set up just to handle long-term processing. Then the first server
> could send a request to the second with the commands it needs to execute
> in a header. The second server processes those commands independantly of
> the first server, which then returns data to the browser.

In a pinch, I'd just use something like a 'queue' directory. In other
words, when your mod_perl code gets some info to process, it writes
this into a file in a certain directory (name it with a timestamp /
cksum to ensure the filename is unique). Every X seconds, have a
daemon poll the directory; if it finds a file, it processes it.
If not, it goes back to sleep for X seconds. I guess it's poor
man's IPC. But it runs over NFS nicely, it's *very* simple, it's
portable, and I've never needed anything more complex. You also
don't need to fork the daemon or startup a new script every
processing request. But if you need to do the processing in realtime,
waiting up to X seconds for the results might be unacceptable.

How does this sound?

HTH,

Neil

-- 
Neil Conway <[EMAIL PROTECTED]>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

It is dangerous to be right when the government is wrong.
        -- Voltaire

PGP signature

Reply via email to