From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 10 Aug 2007 11:13:54 -0400 From: Kris Maglione To: 9fans@cse.psu.edu Subject: Re: [9fans] synthetic filesystems and changing data Message-ID: <20070810151354.GB12549@kris.home> References: <46BBC396.9040009@ec.gc.ca> <46BC0A6D.9060404@proweb.co.uk> <46BC5AD2.8090109@ec.gc.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <46BC5AD2.8090109@ec.gc.ca> User-Agent: Mutt/1.5.15 (2007-04-06) Topicbox-Message-UUID: a429c28a-ead2-11e9-9d60-3106f5b1d025 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.