Article View: uk.comp.os.linux
Article #917PenguinMorph
From: Phil Hunt
Date: Sun, 06 Dec 1998 00:00
Date: Sun, 06 Dec 1998 00:00
84 lines
4119 bytes
4119 bytes
I had an idea the other day for an application that allows data/input
from various formats to look like it is a normal filesystem.
The sort of thing I have in mind would be a shared object or
executable which translates between the format and the filesystem
when the user is doing command-line functions such as ls, cp, cd
etc, and saving and loading files.
For example, there could be a translator for ftp linked to an /ftp
directory, so one could say at the prompt:
$ cd /ftp/ftp.demon.co.uk/pub
(which goes into the /pub directory on ftp://ftp.demon.co.uk/)
$ ls
(which lists all the files in that directory, in nomal Unix format)
$ cp q* ~/download
(which copies all files whocse names start with q into ~/download. The
way this works is that cp thinks it is copying files as normal, but
the ftp-translator translates the request to read files into ftp get
requests (binary mode).)
Other applications this could be useful for include:
- http urls. For example I could grab a html file from the net by:
$ cp /http/www.linux.org/index.html ~/mine.html
- encrypted filesystems. Files in the encrypted FS are transparently
decrypted when they are read, and transparently encrypted when they
are written to.
- version control systems. Reading a file returns the latest version.
writing to it (if you have permission)
- easier access to non-Linux filessystems. At the moment, if you
want to access (for example) a FAT32 filesystem, you need a kernel
that will do so. With this method, the ability to access new
filesystems can be plugged into the system without having to
recompile the kernel.
At the moment there are some applications that do something like what
I am proposing, e.g. KDE handles ftp: and http: fetches almost like
files (in kfm, etc). However what I am proposing does more than this:
Firstly, it means that *all* Linux application programs which deal
with files can automatically access ftp/http data as if they were
files -- the KDE solution only applies to KDE programs and not other
programs such as the command-line utilities
Some questions:
(1) does anything like this already exist?
(2) is it feasible to do?
(3) is it worthwhile to do?
(4) what could we call it? At the moment I'm thinking of "PenguinMorph"
because it allows data sources to "change shape" so they look like
filesystems, but I'm sure others could think of better names.
(5) how could it be implemented? What I'm thinking of is an API, and
an extension to the mount command so it understands this API, eg:
# mount -morph /usr/lib/ftpTranslator.so /ftp
(where ftpTranslator.so is a binary which implements the API for ftp
devices.)
Presumably changes to the kernel would also be necessary.
--
@@--Phil Hunt-----------------------------Don't fear the penguins(*)--@@
@@ [*] Disclaimer: this is FREE ADVICE, and is distributed in the @@
@@ hope that it will be useful, but WITHOUT ANY WARRANTY; note also @@
@@ that this advice may not apply if your name is Gates or Ballmer. @@
Technical Details
Message-ID:
<912951012snz@vision25.demon.co.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5392,2aaff871cf9eb87a,start X-Google-Attributes: gidf5392,public X-Google-Thread: f72b0,2aaff871cf9eb87a,start X-Google-Attributes: gidf72b0,public X-Google-Thread: 10baf0,2aaff871cf9eb87a,start X-Google-Attributes: gid10baf0,public X-Google-Thread: 1025b4,2aaff871cf9eb87a,start X-Google-Attributes: gid1025b4,public X-Google-Thread: 10d8ad,2aaff871cf9eb87a,start X-Google-Attributes: gid10d8ad,public From: philh@vision25.demon.co.uk (Phil Hunt) Subject: PenguinMorph Date: 1998/12/06 Message-ID: <912951012snz@vision25.demon.co.uk> X-Deja-AN: 419297648 X-Mail2News-Path: news.demon.net!vision25.demon.co.uk X-Trace: mail2news.demon.co.uk 912953235 mail2news:23250 mail2news mail2news.demon.co.uk Organization: here Reply-To: philh@vision25.demon.co.uk Newsgroups: uk.comp.os.linux,comp.os.linux.development.system,comp.unix.misc,gnu.misc.discuss,comp.windows.x.kde X-Complaints-To: abuse@demon.net