Questions about Haiku's file system/file manager

Hey! I’m excited about Haiku and have played around a bit with the VM a bit. The concept behind Haiku is very close to what I would envision for an operating system of choice.

One thing I’d like to know about, is how the file system works. I hear it is ‘database-like’. But, when looking at the file manager it doesn’t show me any of the fancy stuff I was hoping for to tag and sort my files. It appears just like any other tree system. So where is/how do I see that functionality?

I’ve long thought of a database file system that stores only one local copy of a file, and have some kind of system like SVN to keep your original files in tact while allowing you to go on and create new versions and alterations of it, as you would with picture files and other media. Getting to your files would be a snap, just select your files which are ‘pictures’, and are ‘user created’ and relate to subject ‘xyz’.

Then operating system files can just have a special tag reserved for them. Archived/original files can be read-only. Applications have an application tag, and all files relating to ‘application x’ can be found. So when i was reading the discussion about linux-like package manager, i’ve been wondering why can’t the power of a database-like system take care of it? it doesn’t matter where files go when they install, only that they are marked with who created them.

Thanks for all the great effort into producing Haiku. I think it has a ways to go yet but is fast turning into something usable and enjoyable to use. One of the things I really appreciate is the attempt to avoid duplicating effort. This is really important in open source software, where there are millions of programs to choose from but only a couple of the choices actually work!

The database like features are discussed in the Users Guide … look under attributes.

http://www.haiku-os.org/docs/userguide/en/attributes.html

Specifically the thing that gives BFS (often referred to as BeFS to distinguish it from other filesystems with unimaginative names) the description “database-like” is the default-but-optional built-in indexing of specific attributes.

In a hidden directory BFS maintains a bunch of index files that allow the OS to do certain fast indexed operations. File updates cause the index to be updated too which results in some performance degradation, but for most home desktop users this would be fairly painless, and if it’s a problem they can disable indexing of some or all attributes.

If the operation you want uses an index, it’s very fast, just as using the primary key in a database gets you results quickly. This is what happens if, for example, you ask a default BFS system to find you JPEG images. On the other hand, often users want to perform a search that’s not sped up by the indices, or not as much, e.g. full text search or case-insensitive filename search.

Early versions of BeOS apparently had a filesystem (also named BFS at the time) which had more features that could qualify it as “database-like” but the performance was judged not to be acceptable.

I have a fairly lengthy article on BFS to be published on arstechnica. Hopefully in the next few weeks.

  • AndrewZ

Thanks for the responses! I’ve been looking into the user’s manuals to get an idea of what Haiku can do. That the indexed attributes are optional (i don’t exactly know in what way) seems a bit disappointing, I was hoping to have a system that can nearly completely do away with the file folder/tree way of doing things.

I’ve got to say, as bad as you’re received, frankly I think your position in a project like this is extremely important, NoHaikuForMe. You’ve got a style that can cut through hype and get to the heart of the matter, and point out major issues early on. You seem to have a level understanding of how things work and where they stand, no more and no less. This is very good for any major project, despite people’s emotions what matters is what the code actually does, not what anyone thinks it does.

It makes me wonder, and not to change the subject, but do you actually have a preferred OS? Or some kind of dream OS? So far I’m not entirely happy with any, though Windows 7 has treated me pretty well.

They’re optional in the sense that you can tell BFS that you don’t want the index, or you can add new ones. If you remove the indices some regular operations will be faster (no index to update) and some queries will be slower (no index available to speed up the query).

You should be able to pretend there is no “file folder/tree way of doing things” as an ordinary user in BeOS or Haiku, at least to a considerable extent. You can save queries and thus have e.g. “images from 2009” as a live query that runs when you click the icon, rather than having a “images/2009” subdirectory if you like. You are correct that beneath the surface the file folders still exist.

If you are more interested in the internals, the book about BFS is free to download e.g.

http://www.letterp.com/~dbg/practical-file-system-design.pdf