* Russ Cox <r...@swtch.com> 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/<site>
    * set cookies by writing "<site>: 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: weig...@metux.de
 mobile: +49 174 7066481   icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------

Reply via email to