[OpenAFS] Zero Install & AFS similiarities, servlets?

Ryan Underwood nemesis-lists@icequake.net
Mon, 30 Jun 2003 05:51:04 -0500


Hi folks,

Take a look at how this program operates:
http://zero-install.sourceforge.net/install.html

Essentially it creates a namespace for HTTP retrievals similar to the
existing HTTP and FTP filesystems.  The difference is that the HTTP and
FTP filesystems connect to a URI at mount time, where in this package,
the connection is made depending on where the user goes in the
filesystem.

Which spawned a half baked idea.  What if it were possible to create a
servlet program and attach it to an AFS fileserver, such that when a
request is made for a particular file or anything under a certain
branch in the filesystem, (such as
/afs/icequake.net/uri/http/host.foo.com/file or
/afs/icequake.net/uri/ftp/host.foo.com/file), instead of looking in
/vicepa for the actual file data, the fileserver thread runs a script
that does some processing.  In the case of Zero Install, if you were a
crude and hackish sysadmin, you might attach a script to that tree that
runs `wget -q -O- "$AFS_REQUESTED_PATH"`.  When the script is finished
(or at least when it begins writing to standard output) the fileserver
sends the file data to the user.  The AFS cache would come in really
handy here, in that you could deal with the file as a normal file
instead of a TCP stream (i.e. seek in it).  Perhaps you could even write
to it and have a script handle uploading to the server, if allowed by
the ACL on the filesystem and the remote server.

The ACL database could be used to restrict access to the
existing-physically part of the tree (the /afs/icequake.net/uri
directory where the script is attached).  Similar to your .htaccess on
apache, but way cooler.

AFS embedded scripting.  Is it potentially do-able?  Seems to me that it
could make all the other various pseudo-filesystems irrelevant, you just
need to write a handler program for each of the various filesystem
functions, like ls, stat, cp, unlink, etc;  obviously some functions
make no sense depending on what sort of storage is on the back-end, so
you could just return -1 or stub them out.

Let me know how crazy this is. :D

Later,
-- 
Ryan Underwood, <nemesis at icequake.net>, icq=10317253