Dear Mr. WNPP, I have been thinking about Mr. Zhaoway's request for a Perl based filesystem. I think the idea is intriguing and would have some applications. Context dependent filesystems would be one. The only issue is how to make it safe. Clearly it would be quite impossible to embed the perl interpreter inside the kernel. Well at least I would not think of attempting that. I suspect that the correct approach would be based on the notion of a "user space NFS daemon", one of which I believe is currently in the debian 'netstd' package. That is we would have a perlfsd emulating the nfsd protocol. Inside it would be calling perl callback functions. These callback functions should be handling very intuitive objects -- not data blocks. Ideally we would like some sort of hieararchy along the following lines: 1.) C/C++ hooks and callbacks.Code could be based on this to produce all sorts of user-mode filesystems. 2.) Building on 1.) the C/C++ hooks would be translated into embedded perl hooks. The semantics of the filesystem are still completely open. However it fulfills Mr. Zhaoway's requirement in that one can now write a perl-based filesystem. 3.) The basic data model for the default implementation would base the filesystem upon some tree-like structure of Perl objects. These objects would probably be along the following lines: a) PerlFileBase class (abstract) b) PerlDirectoryBase class (derived from a but still abstract) c) PerlScalarFile (fully implemented class derived from a; The contents of the file would be those of a scalar value.) d) PerlHashDirectory (another fully implemented class based on a mapping from filenames to diretory members) These Perl classes would provide for a full filesystem but still leave room for files with dynamic and possibly bizarre semantics. The only other question I have is would there be any problem with an nfsd and a perlfsd coexisting on the same machine. Nicholas Bamber http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=75430&msg=1&repeatmerged=ye s
Attachment:
Debian Bug report logs - #75430.url
Description: Binary data