From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 5 Jan 2010 16:03:41 +0100 From: Enrico Weigelt To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20100105150340.GF21460@nibiru.local> References: <635018e058076d45e5d6bcf01860138a@ladd.quanstro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Subject: Re: [9fans] Design of webfs and webcookies Topicbox-Message-UUID: b7c14c48-ead5-11e9-9d60-3106f5b1d025 * Russ Cox wrote: > > what's really wanted here is an atomic create/write/close so that > > one process (we don't care which one) is responsible for the whole > > file. i think you could get this behavior by creating a temporary > > keyfile and then an rename (wstat), which is atomic. > > what's really wanted here (and i wrote the code) > is an atomic open/read/write/close, so that different > processes can update the file in sequence without > stepping on or losing each others changes. > DMEXCL provides that; create+(remove+)wstat does not. Just curious: can an 9P server cleanly differenciate between clients ? This would be a great help for transaction isolation, IMHO. w/o having looked at cookiefs yet, but I would do it like that: * get cookies by reading /site-cookies/ * set cookies by writing ": foo=bar" to /set pipe (which can stay open for as long as you want) This should minimize the amount of messages/roundtrips required in normal operation and make the client-side really trivial. An non- blocking write to the "set" file should also reduce latency (especially when having remote profiles) cu -- ---------------------------------------------------------------------- Enrico Weigelt, metux IT service -- http://www.metux.de/ phone: +49 36207 519931 email: weigelt@metux.de mobile: +49 174 7066481 icq: 210169427 skype: nekrad666 ---------------------------------------------------------------------- Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme ----------------------------------------------------------------------