[mod_python] Re: forks, daemons and other beasts

Daniel J. Popowich dpopowich at comcast.net
Tue Feb 14 10:31:56 EST 2006


Daniel J. Popowich writes:
> 
> Mike Looijmans writes:
> > Forking off processes from a HTTP deamon just does not sound "right" to 
> > me. 
> 
> A hypothetical: the upload takes a minute or so, but post processing
> of the content takes (allow me to exaggerate to make a point) one
> hour...what user is not going to hit cancel and try again...and
> again...and again...then give up and that !@#$ website?  Forking off a
> process from apache is no different than, say, spooling the content in
> a directory and post processing with a polling cron job.  I contend
> forking is cleaner and more intuitive, but it may come down to with
> what the programmer is more comfortable.

I would like to retract that last comment.  Depending on the
application it may be better to spool the uploads and have a cron job
poll the spooling directory for requests: imagine an application that
gets hundreds, even thousands of requests in spurts...in such an
environment, if you're not *very careful* in your programming, forking
processes per request could starve your server of resources.  So, let
me rewrite that last sentence: I contend forking is cleaner and more
intuitive, but it really depends on application needs, system design,
etc., etc., blah, comfort, blah, blah, style, blah, phase of the moon,
blah...

Daniel Popowich
---------------
http://home.comcast.net/~d.popowich/mpservlets/


More information about the Mod_python mailing list