On Sat, 2007-03-31 at 15:12 +0800, Grahame Bowland wrote: > I can easily enough start running a public monotone server, but > there's one catch - can anyone think of a solution? > > I've got viewmtn running, and a number of long-lived mtn processes > reading from the database. I've recently modified viewmtn to notice > when the db file mtime changes and restart the mtn processes. > > The trouble is updates; these lock the database, and the readers can't > access it. People start getting error pages when accessing the web > page. What I'm currently doing is: > - copy the database file to a temporary file > - pull into that file > - do a atomic rename() to replace the old database file > > This is quite transparent to any running mtn processes, as they just > keep using the old database until stopped. However, it's slow and more > than a little crude - and it will suck horribly when trying to deal > with regular updates. > > I can't think of a better solution short of some sort of union > filesystem that allows me to have the temporrary db file be based upon > the original, removing the slowness of the copy. That could work, but > it's still pretty horrible for anyone else wanting to run a viewmtn > server..
I can't think of any other immediate solutions, but a longer-term solution (that I've been kinda-sorta working on for a while now) would be to have 'mtn serve' also serve automate stdio over network connections. -- Timothy Free (experimental) public monotone hosting: http://mtn-host.prjek.net _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel