[Sussex] INSIDE: A daemons story

Steve Dobson SDobson at manh.com
Fri Aug 23 13:23:01 UTC 2002


INSIDErs

Had some thoughts while driving in this morning and I would
like to run them by you.  Sort of gets team buy-in.

Thinking about the similarities between the tasks of the INSIDE
server daemon and Apache they appear to be pretty similar to me.

Therefore, it would be much better, at least for the first few
releases, to have the daemon only run from inetd(1).  This makes
the input/output much easier as all one has to do it read(2) from
file descriptor 0 and write(2) to file descriptor 1 (or 2 - same 
stream).

This would mean:
 * inetd(1) will take care of the multi-requests aspects.
    The second, third, fourth... connections get a new 
    process each.
 * The server can exit(2) when it's work is complete.
 * The HUP signal wouldn't need to be caught.
    Normally daemons catch HUP and re-read their config files.
    Short lived daemons run with that config until complete
     - then exit
 * The KILL signal will be much simpler in its design.
 * Daemon design should be very much simpler (no multi-
    threading logic - this stuff can get hairy).
 * Daemon has to make more use of file locks to coordinate
    it's manipulation of the document files.  We can thus
    make local admin commands not run through the daemon.

Your thoughts and comments please.

Steve




More information about the Sussex mailing list