4 ms·
"there’s not really a difference between a database and a file system" The BeOS filesystem was basically a database. But there are a lot of differences betwee
by mannyv 3y ago
"there’s not really a difference between a database and a file system"
The BeOS filesystem was basically a database.
But there are a lot of differences between a database and a file system. A better way of thinking about it is that a filesystem is just a specialized database.
From an old school, a data base is really just a collection of data. An RDBMS = relational database. A filesystem is just another kind of database. etc etc.
- randomdata 3y ago> A better way of thinking about it is that a filesystem is just a specialized database. Aren't all databases specialized?
- lsaferite 3y agoI was about to bring up BeOS and decided to search to see if someone else had mentioned it already. Glad to know I'm not alone in remembering BeOS. :)
- mike_hearn 3y agoBeFS wasn't really a database as we'd normally understand it. It had no transactions, for one. It only understood string and numbers as datatypes as well. It had what was basically a normal UNIX filing system, complete with /dev, /etc and so on, and it had support for indexing extended attributes. Your app was expected to create an index with a specific API at install time, and then after that writes to the indexed xattr would update a special "index directory". The OS could be given a simple query predicate with range and glob matching, and it would answer using the indexes, including a live query. This was neat, but you could implement the same feature in Linux pretty easily. Nobody ever has, probably because xattrs historically didn't work that well. They don't get transmitted via common network protocols and have a history of getting lost when archiving, although I think these days every archive format in real use supports storing them. There's also the question of how it interacts with POSIX file permissions. BeOS was an aggressively single user system so just didn't care. On Linux you'd need to think about how files that you can't read are treated in the indexing process. Multiple devices also poses problems. BeOS simply required that apps create an index on a specific device themselves. If you plugged in a USB drive then files there just wouldn't show up in search unless the files had been created by not only BeOS, but an app you had previously installed. Note that installing an app post-hoc didn't work because creating an index didn't populate it with existing files, even if they had the right xattrs. And of course it only worked with files. If you had content where the user's conception of a thing didn't map 1:1 to files, it was useless. For example you couldn't index elements within a document this way. Spotlight can index app states and screens, which also obviously BeOS couldn't do. So there were a lot of limitations to this. The modern equivalent would be writing a search plugin: https://developer.apple.com/documentation/corespotlight/making_content_searchable https://developer.apple.com/documentation/corespotlight/maki... The API is more complex but lets you create search results that aren't directly tied to specific filing systems.