[Mailman-Developers] Re: Extraordinary locking mechanisms...
Wed, 10 May 2000 12:36:04 -0400 (EDT)
[Dan A. Dickey wrote:]
>Well, I figure its finally time for me to aska stupid question.
>Why do people use filesystems for locking?
>Why not use IPC semaphores instead?
>It seems that people are going through extraordinary
>trouble and grief to get the filesystem locking correct.
>Like I said - it may be a stupid question, and I'm
>just not getting something. What is that something?
Chris pointed at that mailman runs as a distributed system, so IPC
won't work. The idea, though, of using something other than the
filesystem for locking makes good sense. The locking could be based
on a server that communication with other mailman components over a
socket. It would look basically like the Javaspaces leasing service.
(Leases are basically locks that timeout.) The only worry I would
have is about crashes of the lease service. For a single machine, it
could run under init; for multiple machines, a leader election
protocol would be necessary to guard against machine crashes.