Private Namespaces for Linux
webword writes: "Dr. Dobbs is running a story by Ron Minnich on implementing private namespaces for Linux to solve problems in both distributed and cluster computing. This topic hasn't received as much attention as it should. I'm glad that someone published something intelligent and worth reading."
The private namespace is just one of the features of the plan9 operating system but it is by no means the most powerful.
/n/ftp
/mnt/sql/ctrl
/mnt/psql/recordset
The 9p protocol is a universal protocol for file based operations and there is little distinction between local and networked machines but that is not the end of the story. plan9 has pushed the boundaries of "everything is a file".
The cornerstone of this is the file server. A daemon that presents it's control and data as files in your namespace. The introductory fileserver in most texts is ftpfs.
when you run it
%ftpfs -a ftp.uk.freebsd.org
it logs into the remote ftp server and then presents the file system there in your local namespace
%ls
/n/ftp/HEADER
/n/ftp/bin
/n/ftp/etc
/n/ftp/pub
%
To access the files one uses the standard file manipulation tools.
I'm sure you can see the power and potential of this.
Once running ftpfs permits ANY program on your machine the ability to use files through the ftp protocol, and they don't have to know ANYTHING about ftp themselves, they just open, close, read & write files like they've always done.
it means that to use tools like sed, grep, & awk on your remote files is a doddle, there's no shuffling the files around & risking sync trouble.
Of course if it was just ftpfs then I'm sure you'd say "so what" but of course, it doesn't stop there. Writing a file server is fairly painless. All you need to do is implement the 9p protocol in your program. There's no mucking about with the kernel or fiddling with fstab.
The network, like everything else, is presented as straight files.
which means that even shell script can open network connections and process the results.
I wrote a shell irc bot to prove the point
http://www.proweb.co.uk/~matt/chugly.rc
My next project is a fileserver for mounting a Postgres database connection as a file server. Once (if:) complete it will mean that ANY application will have the ability to access data in postgres DB's and manipulate the data using open, create, read & write.
through an interface no more complex than :
echo 'select * from webhits where date=''24-11-01'';' >
cat
there's even more to plan9 and it's definately worth checking out
http://plan9.bell-labs.com/plan9
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter