From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <1244567653.9958.1733.camel@work> References: <1244567653.9958.1733.camel@work> Date: Tue, 9 Jun 2009 11:27:26 -0600 Message-ID: <14ec7b180906091027g4c060b5egf0e15265289e5ee6@mail.gmail.com> From: andrey mirtchovski To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Different representations of the same file/resource in a synthetic FS Topicbox-Message-UUID: 07dcb326-ead5-11e9-9d60-3106f5b1d025 I think I've mentioned this before, but on a few of my synthetic file systems here I'm using what you describe to slice a database by specific orderings. For example, I have a (long) list of resources which I'm managing in a particular environment each has an owner, type, status and a few static data containers. It's all backed by a relational database, but the file server presents different "slices" of that to external users, where the directory structure is rigidly defined as: / available/ by-type/ by-owner/ inuse/ ... with all data to fill the directories being dynamically pulled from the database. in this particular case it saves me having to implement a generic SQL query mechanism, which is unsafe, as well as pushing the complexity of knowing the underlying database structure onto the clients. in the end, clients only know how to navigate to a particular resource and 'reserve' or 'release' it. this scheme could potentially be extended (at least in my case) to match your "user-defined sets" by simply enumerating every unique column in the database as subdirectories. a user defines a "subset" of all available nodes of a particular type foo which have owner bar by cd-ing to /available/by-type/foo/by-owner/bar. (I admit this is a bit hasty, so perhaps not what you're really after)... the reason i'm sticking with a file system is that if i have to do this for many different resources which can't be easily stuck in the same database, I'd have to design a protocol in order to avoid replicating everything, and if I'm going to design a protocol I may as well use 9p, something that's simple and I'm familiar with.