file locking

Adrian Otto aotto at aotto.com
Thu Sep 19 04:18:44 CEST 2002


David,

I think that using a client/server model is perfect for this. In it's
current stage of maturity, I think it's best for bogofilter to remain as
simple as possible. We should put energy into developing the client/server
functionality when we have users that start to suffer from performance
problems.

In the mean time, focusing development efforts on things that will improve
the accuracy of the outcome is probably our best bet. Thanks for your
feedback!

Adrian

> -----Original Message-----
> From: David DeSimone [mailto:fox at rsn.hp.com]
> Sent: Wednesday, September 18, 2002 4:51 PM
> To: bogofilter at aotto.com
> Subject: Re: file locking
>
>
> Adrian Otto <aotto at aotto.com> wrote:
> >
> > Note that some systems implement flock() using fcntl locks underneath.
> > If you are using one of these systems, then locking over NFS is safe,
> > even when the lock is set using flock().
>
> There are so many permutations here, as locking is very system- and
> environment-specific.  Tools that handle mail must go through mighty
> contortions to make sure they are doing the "right" thing to lock
> mailboxes, and many of them still get it slightly wrong on some systems.
>
> A further wrinkle that hasn't been mentioned here is that fcntl-locks
> can bring performance problems.  Some systems will force all file
> operations to be non-buffered when files are locked via fcntl.  The
> assumption is that the locking could possibly be for the purpose of
> sharing data across multiple machines via NFS, so all reads and writes
> are performed synchronously with no caching of data, to avoid stale
> information being used.
>
> I have no real solution to offer, except perhaps ESR's original
> autodaemon code, in which a server is set up to handle all the accesses
> of the list information, and could handle the conflicts of multiple
> programs trying to read and update the same information.
>
> Of course, ESR's autodaemon never worked at all on my systems, but
> that's for me to figure out.  :)
>
> --
>  David DeSimone   | "The doctrine of human equality reposes on this:
> <fox at rsn.hp.com>  |  that there is no man really clever who has not
>  Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
>
> ---------------------------------------------------------------------
> FAQ: http://bogofilter.sourceforge.net/bogofilter-faq.html
> To unsubscribe, e-mail: bogofilter-unsubscribe at aotto.com
> For summay digest subscription: bogofilter-digest-subscribe at aotto.com
> For more commands, e-mail: bogofilter-help at aotto.com
>
>


For summay digest subscription: bogofilter-digest-subscribe at aotto.com



More information about the Bogofilter mailing list