This post originated from an RSS feed registered with Ruby Buzz
by Trans Onoma.
Original Post: Is Resier4 a Bust?
Feed Title: TRANSONOMA
Feed URL: http://feeds.feedburner.com/transonoma
Feed Description: A Light Green Agile Programming and SciTech Blog
There is no doubt that Reiser4 is a super filesystem. Perhaps the best there is all-in-all. But I realized something about it the other day that just made me want to weep.
You see what we've all been craving for, for way too long now I might add, is a taggable filesystem. The term "taggable" is relatively new of course, but the idea itself has been around for a long time. Quite simply it is a way to annotate any file or directory with arbitrary metadata.
Now all filesystems offer a little metadata via file attributes. With these you can designate permissions or last-modified date and so on, but they are limited to just a few pieces of specific file-as-file info. What amazes me most is there's not even an attribute for file type, which is why we end up using all those ".rb", or what have you, at the end of every file name. With the advent of copious media files the situation has become desperate. How do you annotate an mp3 file with artist, album, year, etc? You end up having to use an external database of some sort that isn't compatible from one system or application to another.
Take for instance Gnome's emblems. For those who don't use Gnome, you can put a little emblem icon on any file or directory in the Nautilis file browser. You have many emblems to pick from like Urgent or Special, etc. Its a great taggable feature. But rename a parent directory and you loose them all! Files being moved about is a fundemental and unsolvable problem for any tag system not inheritent in the filesystem itself. Interestingly, the closest I've seen to solving the issue is Amiga's system. Nothing fancy about it though, they just added a second file ending in .info for every other file around. So if you copied a file it's .info file would be copied too. Of course that means you have twice the files everywhere, but hey at least it works and made sense (they even stored a files icon in this file!). Amazingly Mac, Unix and Windows hasen't even gotten that far, and its been 20 years since Amiga hit the scene! I sometimes wonder if we actually ever learn.
Okay, so what does this all have to do with Reiser4? Well, the thing about Reiser4 is that it has two really snazzy new features. First, it can handle small files really fast and without wasting a lot of disk space. So having 1,000 files all with a single piece of information in them is a-okay --something that would be a terrible strain on any other filesystem. Secondly in Reiser4 files and directories need no longer be distinct. A file can contain other files in its "directory" and a directory can have data in its "file". They just become one kind of thing with the nature of both. That may seem odd, but it actually works fine. The only thing that changes is that you have to sometimes be sure to use '/' at the end of a pathname to indicate you mean the directory. The big idea behind all this is that we can now "tag" files by simply putting little infomatation files right into a files directory. For example here's an example of a rubyscript with attribute files in its directory; file contents are in parenthesis:
This is pretty cool. You have to admit. And it can grow hiearchically --filetype could have its own attribute files too, and so on.
You may not realize it at first, but what Reiser has done is turn your filesytem into XML!!! The little files are the tag attributes and the file's content is the tag body. I'm not sure if this was his plan. I haven't heard of anyone else mentioning this fact. Nonetheless, there it is as clear as day.
So why do I wonder if Reiser4 is a bust? It's not so much that these new fancy features are so radical that pople won't accept them. I think people can adjust, especially when they see it's correlation to XML. BUT... people won't accept them if they do not fully do the taggable job. While it looks like Reiser4 does so (after all isn't XML inherently "tag-able"?), Resier4's downfall may just be that it "missed a spot" in its taggable solution: