From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <200110011610.SAA14444@copernicus.cs.utwente.nl> To: 9fans@cse.psu.edu From: Axel Belinfante Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [9fans] 'stacking' user-level fileservers to add 'attributes'? Date: Mon, 1 Oct 2001 18:10:32 +0200 Topicbox-Message-UUID: f9579bdc-eac9-11e9-9e20-41e7f4b1d025 Question in short: how to easily 'lift' the idea of: producer | filter | consumer to something equivalent on/using fileserver programs? The idea is that the producer produces a file tree which is 'butchered' by intermediate filters that implement succesive stages of an algorithm, by adding (and maybe also filtering (hiding?)) files, and the resulting file tree is presented to the consumer (which might be the next filter in the chain). Context: I have a fileserver program that gives me (demand-driven) access to a dag-like data structure (a labelled transition system); each dag node is represented by a numbered directory containing files for (e.g.) the label, the parent node number, and for the succesor node numbers. Reading the successor file yields the successor numbers - if necessary it expands the tree, creating new numbered directories. Removing a numbered directory removes a node of the dag. The program that uses this needs for each node (i.e. for each numbered directory) some information that can be derived from the label. Because the computation of this information does concern neither the dag-server nor the user program I was thinking about having a second fileserver that extends the file tree procduced by the dag-server with a new file in each numbered directory of the dag-server. Effectively, the exentension-server would be like a kind of 'filter' - but on a file tree, instead of on text. Does this sound like a reasonable approach? If so, what would be the best (easiest?) way to implement this? With the 'extender' between the user program and the dag-server a la iostats? Or could a union mount be used where the extender just offers the directories containing the 'extension' files - but still the 'extender' should (lazily) follow the creation and removal of the numbered directories, which probably breaks this idea. In a next step I might indeed not only extend the dag-server with new files, but also 'filter' some files offered by the dag-server, which seems to suggest an iostats like approach. I wrote the dag-server prototype using lib 9p. Could that be used here, or would it be better to use the structure of iostats? Are there other examples of this approach in the distribution? I'm sorry about the length; couldn't find a shorter way to present the idea. Axel.