On Fri, Aug 10, 2007 at 08:32:18AM -0400, John Marshall wrote:
Although I was not immediately convinced that a versioning approach was
all that useful, I can now see that it roughly matches what I've always
done for servicing web requests for dynamically generated data: each
connection keeps a version...

Using lib9p, each open Fid gives you a void* pointer to store whatever fid-specific data you need. Whether that's just a copy of the file's contents, or you implement some copy-on-write scheme, it's not so different. You can even timeout connections fairly easily, if you want to. Just keep a list of open Fids, with pointers to structs containing the time they were opened. Periodically check the list for timed out Fids, free the resources they occupy, and return Rerror when the next read comes in.

--
Kris Maglione

Any given program will expand to fill all available memory.

Reply via email to