MOO-cows Mailing List Archive
Re: [SERVER] NIS password checking.
On Tue, 23 Apr 1996, Thomas Wouters wrote:
> Unfortnately, in the current implementation, the NIS check is
> done in a single builtin, so if the NIS server is a tad slow (or worse,
> the server went down) the entire MOO hangs. So I want to use a
> master/slave setup like the Name-lookup mechanism, both to keep the MOO
> from lagging and to keep the MOO from crashing :-)
> Has anyone done anything like this ? Is this a stupid idea and
> should I look into non-blocking I/O ? Or 'simply' fork a new process for
> every NIS lookup, using SIGCLD/SIGCHLD to signal completion of lookup ?
> Which would be /least/ likely to crash the whole MOO ?
I'm not too familiar with NIS, so it's possible what I'm about to suggest
is entirely unworkable.
You could set up a (TCP) daemon to act as an intermediary for requests.
Keep a connection open to it, and communicate with normal connection I/O.
(A timeout can be in-DB -- just fork a task off to handle the read(), then
suspend(timeout). When the read in the forked function returns, it checks
if the suspend()ed task is still running, and if it is, resume()s it,
passing back the relevant value.)
This probably has security issues associated with it, and I don't know
what you'd do if the daemon intermediary went down--but it won't crash
your MOO because you wouldn't need any server mods, and it won't hang your
MOO either except possibly when opening the connection (which is to the
local machine and presumably won't take a long time) because read()
This scheme could also be modified relatively easily to permit multiple
Hope this helps.
ResComp Network Support Technician, Bursley Hall
"Invisibility is in the eye of the beholder."
Home Page: http://www-personal.engin.umich.edu/~cunkel/
Subject Index |