flock experience

Robin Becker robin at jessikat.fsnet.co.uk
Tue Jan 14 05:20:47 EST 2003


In message <20030114092127.C349 at prim.han.de>, holger krekel
<pyth at devel.trillke.net> writes
>Robin Becker wrote:
.......
>8 machines?  are you using nfs? then i don't think you should try
>to do locking.  It's been a problem with smtp+mailprogramms forever
>and in the end the mailbox format (each message a file) appears to be
>the simplest working solution.  
>
unfortunately I don't know the architecture very well, it's some solaris
webserver front end, the web people hate putting our (non-java) stuff
there so they're giving us a standalone document production system.
>Anyway, couldn't you create a file for each message/process?  another 
>process could gather it so you wouldn't have to care for locking at all. 
>you may need an end marker so that the gathering process doesn't
>assume a message is complete too early. 
>
The processes are all cgi-scripts. Currently we have a log file for each
machine/script. The scripts take about two seconds to complete and the
(short I hope) log entry is written at termination using

        f = open(logfile, "a")
        f.write(text)
        f.close()

As I said, so far we appear to have been 'lucky', but that can't go on
as we're now starting to use the collected statistics and I have seen
some 'broken' log entries. Moving to the new single document server will
only make things worse so we need to get this right.

A database solution was considered, but is a bit slow and involves some
politics. A bespoke solution using a socket server is also possible, but
it seems like overkill to me.
>HTH,
>
>    holger
>

-- 
Robin Becker





More information about the Python-list mailing list