How To Implement A Database Oriented File System 232
ALundi writes "A really great read from Andrew Orlowski over at The Register on how Benoit Schillings and Dominic Giampaolo created the 64-bit journaled and attribute based Be File System. Schillings and Giampaolo discuss a variety of design and implementation issues, including data integrity and file system performance. " Interesting in the context of MSFTs plans to
implement a DB filesystem
in future versions of MS Windows.
BeOS file system rocks. (Score:5, Interesting)
If you want some real insights into the OS as a whole, check out the BEOS Bible [amazon.com]. not so good if you want an in depth discussion, but for non-kernel hackers it's a fun read and very informative.
Read the section explaining how their address book works. it's really cool.
Reminds me of the BeOS 5 Bible reading on this. (Score:4, Informative)
If I remember correctly, Be originally used a "true" database backend as the filesystem, but ran into performance issues compared to the R5 fs implementation. I can't help but wonder how many of these issues were largely due to the speed of the technology used at the time.
I suppose it depends on your application, but I know a lot of web-based platforms already use true db backends (Oracle, PostgreSQL) to handle all data storage, representing a filesystem as a hierarchial set of rows in numerous tables. I've written several applications this way, and am currently working on a content management platform which also uses this model. Need to make a change to the filesystem structure (adding attributes, changing the security model)? Just modify the DB structure and you're done, especially with databases like PostgreSQL where you can use the database engine itself for a *lot* of functions (via triggers, stored procedures, security settings, etc).
As more and more functionality is brought into web-based application environments, I can see the importance of "old style" filesystems starting to fade somewhat for a lot of apps. Yes, they'll still be necessary (the database itself has to reside somewhere, obvisouly), but not in the same way they used to be. Just a few thoughts
Re:Reminds me of the BeOS 5 Bible reading on this. (Score:3, Informative)
It's a true (NFS, SMB) mountable filesystem, with all the flexibility that provides, but also the replication and other Enterprise features you want from a database.
Re:Reminds me of the BeOS 5 Bible reading on this. (Score:2, Interesting)
I checked over the specs for this over at the Oracle site... looks impressive! Now, if only you didn't have to use Oracle to take advantage of this sort of thing; PostgreSQL is standing in first place as my database platform of choice for most tasks.
Is there any kind of equivalent work being done in the OSS community, perhaps based on PGSQL? The platform I'm working on for web-based content management is actually headed toward being usable (and will be licensed under the GPL as soon as that happens), but doesn't use the "real" system FS for storage at all. BLOBs are used for file storage instead, and performance seems to be fairly good
I suppose the best way to go is to structure the system such that it can be used for intranet-style doc/file management, in addition to being able to dish up web-based content (whether for internal or external access/use). We'll see how it shapes up, I guess
Hardware has come a long way since the days of BeOS 4 (I believe that's the last version that used a "true" database backend for the filesystem). With the added power we have these days, it seems the old performance issues might be largely eliminated. Now, I'm not trying to portray myself as an advocate of "throwing hardware at a software problem"; to me, it's really more a case of "we can now do things we couldn't do before." This is somewhat akin to being able to do better 3D modelling on PCs due to new capabilities in 3D hardware acceleration.
If its so easy . . . ? (Score:1)
A lot of people think journaling is a really difficult, complicated thing. But that was actually the easiest part by far. BFS journaling is maybe a thousand, maybe twelve hundred lines of code it was really not difficult. And people make it into this monstrous complicated thing. But again, we do things like change the disk buffer cache so the 64bit features that were needed to do journaling were supported.
In SGI's XFS, their journaling is bigger than all of BFS!
If its so easy, why don't all file systems implement such goodness? Personally, I'd love to see this everywhere.
The Gardener
Re:If its so easy . . . ? (Score:2)
While it's great for performance, it changes how people understand filesystems. This isn't necessarily a bad thing, it's just a change.
Re:If its so easy . . . ? (Score:1)
Re:If its so easy . . . ? (Score:2)
SGI's XFS uses and agressive advanced cache system and pre-allocates sectors. What this means is that small files, like temp and working files, never actually make it to the physical disk. They are cached and used from the cache. If they are short lived, then no disk I/O occurs at all.
Pre-allocating sectors means the system can study where the best location for the file is before it actually gets written. This not only minimized fragmentation, but it also speeds up writes.
New FS Engineer at Apple! (Score:3, Interesting)
Does this mean that Apple is finally going to put some kind of reasonably modern filesystem under OS X?
Have they finally seen the true genius behind their own iTunes interface?
Have they finally realized that they will shortly be THE ONLY operating system that still relies on file extensions as the primary way of identifying files?
I truly hope that this snippet is as wonderful as it sounds, as it may finally restore my faith in Apple, as well as cure me of my unhealthy Debian and XFS addiction.Re:New FS Engineer at Apple! (Score:1)
The real beauty of the BeFS wasn't the journaling (that's been done before) it was the ability to let the user define their own meta-data. That's the sort of thing Apple really needs to add to Mac OS X (that and eliminating extensions and Type/Creator in favour of MIME types).
Re:New FS Engineer at Apple! (Score:1)
Actually I am quite aware of the capabilities of HFS+, but at the same time I am very disappointed in the use those capabilities are getting. It would be a small feat (for a filesystem engineer, not me) to add completely extensible metadata support and basic journalling to HFS+. Instead, Apple (at the moment) seems to be foresaking every good aspect of the filesystem except for long file names. Perhaps because they realize the performance/reliability they would gain by moving all the metadata out of the filesystem into a RDBMS.
In reponse to "what's wrong with file extensions?": nothing, unless they are used as the sole method of identifiying files. While this isn't quite the case in OS X, the guidelines seem to state (once again, at the moment) that it will be.
There is nothing wrong with file extensions, just the same as there is nothing wrong with the creator/type system. However, when you use one and not the other, you are losing capabilities.
File extensions allow any system, regardless of file system, to tell what a file is supposed to be. Creators and types allow the user's computer to know what application the user wants the file to open in. Magic-number checks tell the computer definitively what the file contains.
I'm not biased towards or against any of these systems. I want the best consumer-oriented UNIX in the world to have them all!Re:New FS Engineer at Apple! (Score:1)
They still have Metadata, to an extent.
Re:New FS Engineer at Apple! (Score:1)
I think MacOS uses data they store in the resource fork of a file to determine what type of file it is and what application created it. This allows different files of the same type to be opened by different applications, and doesn't require *any* file extension.
Re:New FS Engineer at Apple! (Score:1)
Re:New FS Engineer at Apple! (Score:3, Insightful)
You gotta love how every Unix/Linux/Windows user now talks about how file extensions are so bad. A few years ago these same people used to say how crap Apple's idea of meta data was, and that file extensions were better (cross platform, etc, etc). The arguments that I've had with Unix people at different places I've worked. It seems to take the rest of the world at least 10 years to catch on to ideas...
Re:New FS Engineer at Apple! (Score:2)
Not in a modern interface, it isn't. And it's also far too easy to screw things up; a file's association shouldn't change just because its name does. Storing immutable data like association in a mutable location like the filename is a hack that should never have been used. It's a great shame to the industry that it ever was.
But then, that's Microsoft for you. Pushing inferior standards onto everyone else.
Re:New FS Engineer at Apple! (Score:2, Insightful)
Re:New FS Engineer at Apple! (Score:2)
It just is ignored by the computer if a more accurate source of that information is available, e.g. a MIME type set by the last app to edit the file, which is more informative, e.g. text/plain; charset=unicode.
If this information _isn't_ provided, it can be attempted to be gathered by several means, all of which might be tried in turn. If the suffix matches, a temporary (because it isn't perfectly certain) metadata descriptor might be attached. It might be analyzed by the computer using the magic number system under Unix. The user might be asked if he knows the first time he attempts to open it. Or an opening program might recognize it and explicitly save it with this information.
Furthermore, there's nothing preventing there from being an OPTIONAL setting that would append suffixes to apps based upon the true metadata.
Suffixes in the file name are about the suckiest thing that ever sucked suck... if they're where type metadata is chiefly stored and looked for. As an option for people that enjoy 'em, no one is saying that they should be eliminated. No one.
I'd suggest reading some of John Siracusa's articles for further reading.
Re:New FS Engineer at Apple! (Score:3, Insightful)
Ugh, don't get me started... Here's a short list:
Only if the metadata is stored in some other inode.
In the case of BFS, the inodes are always 1024 bytes, but the inode information is only about 300 bytes; that meant that BFS had 700 free bytes in the inode--free in the sense that they don't take up any more space, but also free in the sense that you don't need to do an extra seek or an extra read to get them. Now that's free! You can go about 700 bytes, but then it needs to allocate more blocks (I don't know if that requires another inode, though).
Also, in this case, even if it is just slightly faster to look at the filename, you lose every other possible metadata feature, just to get an essentially unmeasurable increase in performance. I'd take BFS and all of its features at half the speed if I could use it on any OS I wanted.
Dominic's Book (Score:5, Informative)
AD doesn't yet have wide acceptance, DBFS doomed (Score:2, Informative)
Re:AD doesn't yet have wide acceptance, DBFS doome (Score:2, Insightful)
Damn right they are! For good reason too: it's cranky and fussy and likes to corrupt itself. When the school I went to threw the Microsoft Official Courseware labs out the window because they were impossible to implement, I got my first taste of why AD as it stands is pretty much useless.
If Microsoft had stayed standards-compliant with open standards like LDAP and Kerberos 5 and so forth AD would be much less of a nightmare than it is now. But no, typical MS, they had to "embrace and extend" it. As a consequence, they have shot themselves in the foot.
This is the reason why most MS shops hold desperately on to their NT4 PDCs even though 2K has NT4 beat nine ways to Sunday. 2K cannot do the old-fashioned SAM-based domain even if you cajole it, beat it about the head and shoulders, or ask it nicely. And for most shops, that kind of domain is all they need.
Of course if they went with Samba they could decommission their old fugly NT4 PDC, heh heh...
Re:AD doesn't yet have wide acceptance, DBFS doome (Score:3, Insightful)
Re:AD doesn't yet have wide acceptance, DBFS doome (Score:2)
Where is that standard-incompliant?
Database-like (Score:5, Insightful)
XFS [sgi.com] is also "database-like". But BFS seems to be rather more ambititous an effort -- and very intriguing.
This is one of several BeOS features that the Open Source community should reall consider stealing. But let's consider these features individually, with one eye on whether they're likely to achieve acceptance outside the ranks of BeOS enthusiasts. Let's not waste time on wholesale BeOS clones and compatibility layers. Those are exercises in denial. BeOS was a nice piece of work, but it's as dead as CP/M. Deal with it.
Re:Database-like (Score:2)
Yes, BeOS is dead. Long live OpenBeOS. [openbeos.info]
Software Necrophilia (Score:2)
Look, there's a lot of good stuff in BeOS, and a lot of us would like to see it preserved. But it's the technology that's worth preserving. The platform is just a way of delivering the technology. If you insist on totally re-inventing the platform, either as an OS or as a compatibility layer, you force all your potential users to start over completely. And they just won't do it. You want proof? OS/2. DR DOS. NextStep. AmigaDOS. All of these were impressive products. I personally would prefer any of them (or BeOS for that matter) to Windows. I might even prefer some of them to Linux. But like most users, I have to concentrate on platforms that have a real user base.
Re:Software Necrophilia (Score:2)
It was started many months ago, already has 150+ people working on it, already has a kernel in progress (based on NewOS kernel, written by an ex-Be engineer), and is aiming for BINARY COMPATABILITY with BeOS for the first release. Most of your argument doesn't make any sense if you know all the facts, so instead of just criticizing the project, why not read the website FAQ's.
P.S. Whoever said we are creating OpenBeOS to try and take over the OS world? We like BeOS, we want to re-create it in OpenBeOS, and then once we have something on par with R5 BeOS, we can go forward with new ideas (which are already being hashed out in a separate sourceforge project called The Glass Elevator).
:-P
Re:Software Necrophilia (Score:2)
You're right, I'm ignorant as to how many people are working on OpenBeOS. There are thousands of open source projects doing interesting things. I can't even follow all the ones that are closely-related to my own work. I'll simply take your word for it that a lot of people are working on this particular one.
But if that's true, I'm all the more discouraged. What is the goal to all this work? Just to avoid moving your desktops to Linux or OS X? Seems rather a lot of work devoted to a very limited goal. The sad fact is, you're actually working against having Be technology becoming more widely accepted.
Maybe I'm just whining because I'd really like to play with some of this technology. But as long as this technology is only available in the form of a totally new platform, I don't have any room for it. My job already requires me to spend time with more platforms than I care to think about: various desktop Linux distros, Windows, Symbian, and .NET. My personal interests include PalmOS and Java. There's simply no time for me to integrate a whole new platform into my job or other work. (If there were, it would probably be one of the embedded or game-console Linuxes.) And I'm more flexible than most users, most of whom are totally resistent to trying new platforms.
But if a Linux implementation of the Be file system or the Be file type model were to appear, I'd jump on it with both feet. I might even lobby for my companies development products to support them. But I guess you don't want that to happen.
What I try (Score:2)
Time passes. Sun drops the ball on Solaris x86, and consulting companies like Red Hat and SuSE start attacking Linux's shortcomings. Finally I get hired by a company that wants to extend its Windows development tools so they also target Linux. This forces me to play with Linux some more, and I get a more positive impression. I even think it might replace Windows for my day-to-day work, 'cause Windows has gotten too bloated, brittle, and inflexible, and Linux is getting more mature and easy to use. Best of all, Linux is, by its very nature, unmonolithic and open to experiment.
Alas, desktop Linux hasn't lived up to its early promise, though I think that might still happen.
More time passes. I still work with Linux, but for various reasons I still spend most of my time on Windows. Our Linux tools aren't as successful as we'd hoped, but they're still pretty succesful. And now we're also gonna start targeting .NET and Symbian. I'd like to avoid getting into these platforms, lest my brain explode. But I'm responsible for documenting core features of our cross-platform API, so I can't avoid it.
My history with Java is similar. I actively avoided it for a long time, then got a job where I had to learn it. Currently I write the odd web applet for friends.
Bottom line: I can't jump into every technology that looks interesting. Too many constraints. Finite brain capacity. The need to earn a living. The desire to work on things that people will actually use. The business decisions of the people who sign my paycheck. If you want me to use your technology, find a way to integrate it with platforms I already use, or be ignored. Not fair? Perhaps. Life is often unfair.
And as I said before, I'm actually more flexible than most computer users. It may be frustrating and boring to cater to their limitations. But if you don't, all the work you're putting into Be technology will only be seen by other Be enthusiasts. Not that you have any obligation to the rest of us -- but it strikes me as a nasty waste of human potential.
A self-correction (Score:2)
Microsoft's database'd os (Score:1)
Excuse me but... (Score:1)
Re:Excuse me but... (Score:2, Insightful)
Here's an analogy: Heirarchical databases are to relational databases as the GOTO statement is to object encapsulation.
This might explain why some of us get so frustrated at being forced to continually "navigate" up and down our "folder" heirarchies with the "tree widget". That's just a graphical metaphor for 60s computer technology.
wrong way round (Score:2, Interesting)
Simple joins, and most of them are can be replicated with links if necessary. Almost all the databases I've seen would lose little from moving out of the DB and into the filesystem.
It doesn't scale to complicated joins and huge datastores with complex triggering but for most stuff it simply isn't used.
Too many developers have the mindset of placing tree based data into RDBMS which adds complexity.
Re:wrong way round (Score:5, Interesting)
Simple joins, and most of them are can be replicated with links if necessary. Almost all the databases I've seen would lose little from moving out of the DB and into the filesystem.
But then, you lose all the advantages of database journaling (not just integrity, the ability to rollback to a previous state, if necessary), consistency (you have to make sure the files can't be accessed by other operations before the commits are done) and replication.
If I were building an application today with Oracle, I would be very tempted to use iFS for these reasons.
Re:wrong way round (Score:2)
Tis true, again for the majority of dbases this simply isn't a problem anyway. Week after week I am presented with projects that have "we store the data in a MySQL database" when there really is no operational need for such a system.
Plan9 and Hurd with synthetic file systems and filters also present an extension to the simple disk based file system. I'm not for a minute suggesting thrwoing all that indexing and query optimisation away where it's needed.
Rememebr the ask slashdot a while ago about "how can i keep track of my photographs". People were seriously suggesting Oracle and MySQL. All of his data would fit on a floppy and proably into the memory of my microwave oven or car stereo!
Re:wrong way round (Score:2)
Surely thou jesteth! open() has to be one of the most expensive unix system calls! What you're proposing would move slower than cold molasses.
C//
Re:wrong way round (Score:2)
C//
Re:wrong way round (Score:2)
It causes no problems and brings me benefits
RDBMS are overused and seem to be applied as a first resort
man sort
man join
they work just fine
Re:wrong way round (Score:2)
C//
Possibilities (Score:3, Insightful)
My fear, and I think the reality is that Microsoft will not be so kind.
jrbd
Re:Possibilities (Score:2)
Need support for versions and schema changes (Score:2)
A DB as a file system could still be a mixed blessing though - anyone tried to store code in a database, or other files with lots of different versions that may have different structures? Generally, DBs are weak when it comes to namespaces (like directories), versions (except in some special cases features for time series) and 'schema evolution' (changing the data structure).
Nothing impossible though - I think Oracle were getting there with the Internet File System, so would be nice to have a PostgreSQL FS in Linux to start playing with!
Problem is that file systems don't care about data structure and so don't care about changes to that structure, so you can have half a dozen different versions of your address book floating around
I prefer object-oriented graph filesystem (Score:3, Interesting)
- need much less overhead than database system
- can hold multiple ways to access one object, easing semantic link
representation
- can be secure by allowing only the workflow links.
It should be organised as a set of object that hold data within them,
with links between them.
Re:Why object oriented? (Score:2)
I followed the link to your home page, and I must say I was impressed.
Nevertheless, I must say you will get only as far as SQL goes, and SQL doesn’t really gives you the full benefits of the relational model [dbdebunk.com.]. While your ideas are certainly very interesting, they would be potentially even more powerful if they were recast in terms not of SQL tables, but of relations.
Leveraging a DB FS (Score:5, Interesting)
One could provide a helper app that allows you to look at the stored files in ways other than your typical file listing. To do this would require various metadata attributes to be associated with the data. Helper apps would be provided for all of the standard applications that read and write to data to the file.
For example, one app could set attributes to categorize data. One could then search for data on your system, and potentially others, much in the same way as you would search for stuff on Yahoo.
Say you are in a rush to finish your taxes but you need to put together an itemized list of business expenses. You have information on them stored in various places including text files, e-mail, spreadsheets, etc. You could use find and grep to go poking around looking for them or you could use a helper app that does a quick search of attributes and presents you with a list of candidates and ca even call up other apps or services to look at the data. Once you have identified the data another attribute can be set that your tax software uses to record it and pull it into your tax forms.
Re:Leveraging a DB FS (Score:2)
Re:Leveraging a DB FS (Score:2)
C'mon, don't pretend to ignore the #1 application of a filesystem with built-in metadata support: PR0N. :)
[X] Asian
...
[] Blonde
[X] Blow
[] No Audio
[X] Quality: Great!
[] Quality: Average
[] Quality: Crap! I should delete it!
a filename can only encode so much...
--
mySQL filesystem (Score:2, Interesting)
Has anyone actually tried it?
Stop this! (Score:1)
btw, wont databases make the filesystem slow ?
Re:Stop this! (Score:1, Informative)
it was another story a few weeks ago (Score:1)
All of a sudden it's interesting, perhaps all OS's should have a DB file system installed by default.
Re:it was another story a few weeks ago (Score:2)
Advice to the victims. Backup early. Backup often.
MS say (Score:1)
How does it make it any simpler ? May be faster
I'll wait for SP2 (Score:2, Insightful)
Even more than normal Microsoft bashing, this sounds like a huge challenge for MS to get right. I can't imagine that they'll manage to retrofit a DB filesystem and make it peform adequately on the first try. It would be tough enough even if they started with a clean slate and a small, independent team of top talent. Unfortunately, although they do have some first-class developers, they also have tremendous legacy baggage and a group-think culture.
I'll wait for at least Service Pack 2 before I put any real data on an MS DB filesystem.
Unix lags (Score:2, Insightful)
Linux is a nice remake of a legacy os, but is hardly the future.
The open source community needs a good object storage to base a more futureproof os on. Badly. (And a way better UI than XWindows can give us.)
Unix *File* *System* lags. (Score:2)
If you're a fan of the Be file system [sourceforge.net] (and I may be turning into one myself), note that you don't have to use BeOS to use the Be file system [sourceforge.net].
Re:Unix lags (Score:2)
Let's consider me: I have a group of html files that I need to develop and maintain. Ergo, the default associated program is a text editor, because I spend most of my time editing the files.
However, I also have a group of html files, and plain text files that I like to open in a web browser, which are static text, and never, ever change. This is because they're novels and short stories -- an editing program is definately not what I want to open them with, because it's not as good for reading as a browser.
So what the hell do I do?
Either waste time explicitly dragging or opening via a menu or dialog the former group of work files, or the latter group of lesiure files?
If I can arbitrarily set each file, which are identical in terms of format, to open in the program that is proper for it, I will save myself a damn lot of time and trouble.
File associations are the only way I've heard of to do it.
And because they're ALTERABLE, easily so, and ignorable, you can still open files set for RealPlayer in anything else, and have it (or a daemon) automatically change them to henceforth open automatically with that program.
Give it a shot before you condemn it!
Re:Unix lags (Score:4, Informative)
No, you don't.
Be used the following method of determining which app would open a file:
Notice that nowhere in here does it take into account what app created a file.
Even better, you can always right click on any file (or any list of files of the same type) and get a list of:
So no, I'd say that you don't understand the problem.
Re:Unix lags (Score:3, Insightful)
OpenBeOS BFS (Score:3, Informative)
They have a fantastic amount of the work done [sourceforge.net] already such as
o Read-only BFS
o Kernel Interface
o Full Attribute Support
o Indexing
o Symlink Traversal
o Queries, full UTF-8 Support, and support for non-indexed attributes.
I believe they are also fixing some problems that were in the original FS.
I am sure they would be glad for some more file system engineers. Come to think of it, the rest of this open source project is going really well too, but as always it needs more programmers....
Re:OpenBeOS BFS (Score:2, Informative)
Re:OpenBeOS BFS (Score:2)
OBOS is aiming for binary compatability with BeOS R5, and is re-creating all aspects of the operating system. The only difference should be that it is BSD open source'd.
You're right, it's not BeOS, it can be even better, since it will have a future.
Practical File System Design (Giampaolo) (Score:2, Informative)
Current Linux work on a database filesystem? (Score:1)
I used to like this idea. (Score:3, Insightful)
Not much user, lots of system and iowait, that's what. We run into a whole new realm of needing accounting for these kinds of things.
Re:I used to like this idea. (Score:2)
Imagine if you had to really work to abstract your filesystem layer in all of your crossplatform software the way that you have to abstract your windowing system and most other stuff.
my two cents (Score:3, Interesting)
If the data is shared, and you have libraries that are shared, then why not ask the data to display itself (object.display(x);) and have it call to a standard library (system library?) which queries a system properties database object as to what application to display it? Don't actually store the display code in the objects, but have the objects query the system as to what the user has specified to display that type of data with.
Dominic: That's what I mean. Some people are very anal about organizing things in rigid hierarchies and others are 'I know what I want to find'.
I think there is a place for hierarchies, but not as the base organizational method of the filesystem. I would like to see a hierarchy of attributes, or keys, or whatever you want to call them. When you save an object (off the internet, or out of your head), a title is only one possible attribute you want to give it. When I save a pr0n jpg, it doesn't need a damn title, I need to mark what it's a damn picture of (amateur AND cumshots AND redhead)! Perhaps start with people, places, things. Or later in the hierarchy, sound -> music -> various bands as well as various artists as well as various sound effects as well as dates and live or studio, all keyed (so to speak) and queryable. But the hierarchy is for browsing. Just for browsing, because browsing is important (when you want to look at cumshots, you want to look at cumshots, but when you query for cumshots, watersports and lesbians, well that's bloody well what you should get), and micro$oft's nice little explorer looks about right. Although instead of a stupid directory tree, we have a tree of object properties and types, and any object can be in any number of places in that tree, depending on it's attributes (categories?).
I know of course that I haven't really said anything new in this post, and I know that performace needs to be taken into account. This is, however, the way things are moving, and all we really need is a really good, really fast, solid state storage medium. When permanent storage is as fast as or faster than RAM is today, the database filesystem will finally become a reality, until then, we'll sure be gearing up.
Cheers, Joshua
brute force (Score:2)
There are brute force ways of doing it: you build some kind of ad hoc database system and dump it into kernel space. You may be able to engineer such a system reasonably well, but to me, it is in bad taste: indexing is such a complex and application dependent area that nobody can guess ahead of time what kind of indexing people will want a few years from now. The Be file system looks like it's too complicated to interoperate well, and too simplistic to be of much use for anything rather than fairly primitive indexing operations.
A better way of doing this is to figure out a protocol for notification and updates between a traditional file system and user-space database indexing services. Yes, that's harder, but that's what software engineers get paid to figure out. And, as far as I'm concerned, if you can't figure out how to do it right, it's better not to do it at all rather than doing something half-baked.
Threat to Open Source? (Score:2)
Re:Threat to Open Source? (Score:3, Interesting)
Functionally, database-based file systems are an old hat. If they were the magic bullet Microsoft and BeOS think they are, they would have caught on long ago. To me, it looks more like a bunch of college hackers getting mightily excited about a whizbang feature of little real value. (Database based file systems have worked well in some niche markets--IBM is selling some systems with such file systems.)
Something needs to be done about indexing and search, but putting a database into the kernel is not the right thing.
Microsoft is NOT putting SQL Server into Windows!! (Score:5, Interesting)
As the ExtremeTech article pointed out, they are not even considering putting the full-blown SQL Server into Windows. SQL Server is too resource-intensive (it really wants to use all of the available CPU, memory and disk space), too much overhead, and most importantly to MS, too profitable (sales of SQL Server / BackOffice make up about 10-15% of MS's revenue.) There's no reason to bundle it if people are willing to pay a ton for it separately!
As the article says, they're thinking (nothing decided yet) about including MSDE, which is exactly the same as SQL Server 2000, except it is tuned for 5 concurrent users (and hard-limited to 10), the database size is limited to 2GB per database (the same as the Jet DB, aka Access), and it doesn't have the nice GUI admin tools bundled.
Also, the OFS (Object File System) discussed previously probably won't get added either. There's a good reason why it was talked about way back in the Cairo (pre-Win95) days but never implemented - it's really, really hard to do, and it's hard to even convince anybody of its value. (Just look at Be.) Active Directory was originally supposed to be an object store, but I don't think anybody uses it for that (if anybody even uses it at all.)
What probably will be included is an improved version of Indexing Service, which is currently included in Windows 2000 and XP. For those of who are fortunate enough to be unfamiliar with Indexing Service (formerly Index Server), it's an NT service (think "daemon") that periodically scans the file system for new / updated files, and then adds whatever metadata it can extract into a database of sorts, which is then used to speed up searches in the built-in Search dialog on the Start menu.
There are a couple of problems with the current implementation:
So, in summary, MS's plans for the DB-in-the-filesystem look a lot more like Reiser4 [reiserfs.org] than like BeFS or SQL Server.
Re:Microsoft is NOT putting SQL Server into Window (Score:2)
locate (Score:2)
Phillip.
Re:Microsoft is NOT putting SQL Server into Window (Score:2)
Err... (Score:2)
I find this very hard to believe. True, SQLServer eats up everything you feed it, but stays away from the stuff you don't give it: if you forbid it to use a certain CPU, it won't use it; if you tune it to only use XX% of the memory , it will only use that amount of memory (and databases use memory mainly for cache).
they're thinking (nothing decided yet) about including MSDE, which is exactly the same as SQL Server 2000, except it is tuned for 5 concurrent users (and hard-limited to 10)
MSDE is limited to 5 concurrent transactions, not users. So every 6th transaction (i.e. a T-SQL command) will get queued and has to wait for an empty slot. This will degrade performance but you can hook up 30 or more users on a single MSDE powered database without noticing it.
Your point about 'including' MSDE and not SQLServer is weird: both share the same codebase and both eat up everything you give them. MSDE too eats up all the memory it can get, even for 5 transactions. Also: a DB Filesystem eats resources, plain and simple, because you have more data to store plus you're not just serving files but VIEWS on bits of data. So caching has to be intensive. Yes this costs memory and perhaps a lot of diskspace.
As for Index Server: Index Server is ment to index textdocuments and documents of a certain format (office docs etc). It's a hog, indeed, but it also doesn't need much maintenance. It does it's own housekeeping, indexes files by itself. Asking a query by the windows search is a bit slow perhaps, but I've never had any performance problem when using indexserver as the searchengine on static websites.
An Earlier Example of a DB Filesystem (Score:2)
PICK has an SQL-like language to create reports and search and select databases. The data structures are kept in a "dictonary" file for each file. Records are variable length and seperated by upper acsii characters. (254 for fields, 253 for values (sub-fields), and 252 for sub-values.)
PICK is pretty much considered a "legacy system" by most people any more. (If they have heard of it at all.) It had some features that were far ahead of its time. Unfortuantly, Dick Pick, the creator of the OS, was unwilling to improve on it. So PICK remained in the dumb terminal world, while everyone else moved on. The vendors of PICK made improvements over the years. It was the only thing that kept it even vaguely current.
Microsoft is claiming that you will not need datastructures for their new system. DB filesystems are very dependant on embeded filestructures. It has to be there. I have no idea how they will be able to take a structure as complex as Word or MPEG-4 and make it "transparent" and portable. More likely you will be held hostage to their OS. It will be portable to "upgrades" of the OS and no more. (At least until they make that data format no longer supported...)
Integrated database computers: IBM AS/400 (Score:5, Informative)
IBM's AS/400 (a midrange computer system targeted for commercial use/accounting/warehouse/etc...) is based on an object-oriented database filesystem which is implemented at the firmware level (SLIC) rather than at the OS-level - and this system has been around for about 20 years and IIRC it always had quite good performance.
-arch----
A few words about its architecture, if you're interested...
The operating system (OS/400) itself runs on top of this object-oriented low-level "OS" by calling its APIs - as a result, most parts of OS/400 are platform-independent. If you'd manage to get the SLIC running on another hardware platform, you could probably install a nearly unmodified version of OS/400, and it would do its work.
Actually, I'd call the SLIC code the 'real' operating system kernel rather than OS/400, because OS/400 itself would not work without an apropriate SLIC layer.
Everything on the system is an object, so you'll always have to use the object's methods to perform some operation.
For some applications that may be an advantage, because security is enforced on each object at the firmware level. For other applications it might also be a disadvantage, because you'll always have to use a limited set of APIs for modifying data. That blocks many methods commonly used for writing highly optimized code.
-end arch----
One of the benefits of having a database-filesystem is probably the fact that you do not need to run a database product on top of the OS.
Every object on the system can be backed up and restored in a very simple way. Logical files (multiple logical views of one physical file) can help to keep data management simple and consistent.
On the other hand, you will have to update the entire OS (including the kernel) when you need to install a new release of the database - which means, that you'll have to reboot the machine.
And - last but not least - the more code you have in the OS kernel, the higher is the probability of having dangerous bugs somewhere in the kernel.
It should not be necessary to mention, that bugs in the OS kernel may compromise all system security.
There are certainly many advantages and disadvantages regarding the database-filesystem issue, so I think it all depends on what you want to do with your computer.
-----
kind regards from Austria,
octogen
PS: i hope my english isn't too poor..
And - by the way - even Microsoft uses AS/400 boxes for running its business, so what do you think, where did they get their inspiration from...?
Re:Integrated database computers: IBM AS/400 (Score:3, Insightful)
This guy has it right. I have been working AS/400's for YEARS! The OS is built around the DB2 database. And IBM beat MS to the idea a long time ago. But, MS likes to make everyone think they actually "Innovate" things. When in fact they don't! They buy up companies, steal technoligies etc... The only thing MS has perfected is the marketing engine. And yes it is true MS uses AS/400's. In fact MS wanted me to come interview to work on their team that did the MS--> As/400 integration work. (I told them to blow me, I wouldn't work for a company I dispised!).
Re:Integrated database computers: IBM AS/400 (Score:2)
> But DB2 is generally *relational*, not OO.
IBM DB2 is SQL. While SQL claims to be relational, it isn’t [dbdebunk.com.]. There are only two faithful implementations of the relational model, one is obsolete [mcjones.org], the other [alphora.com] is still a beta.
Re:Integrated database computers: IBM AS/400 (Score:2)
> I meant "street relational", not Codd theory-book relational.
The problem is that street relational is no relational at all, since it violates the basic theoretical principles of the relational model. BTW it’s not only Codd, but also Christopher J Date [uk7.net], Hugh Darwen, Fabian Pascal [uk7.net] and now Nathan Allan.
It makes no sense to speak about Codd theory-book relational. There is a post-Euclidian Math with is still Mathematics, and indeed superseeds Euclid; but it evolves from the Euclidian fundamentals to the point of redefining them. SQL, OODBMSs and other database models up to this day are either pre-relational or just plain confusion of mind which seems works just because people never considered they could have something much better [alphora.com] &ndash -- that they could have had it [mcjones.org] for twenty years already.
Re:Integrated database computers: IBM AS/400 (Score:2)
> Codd's ideas were intially pretty much ignored. What finally triggered something was that he started showing how his ideas made queries simpler, or at least smaller.
If you have any reference to this piece of history I‘d like very much to read it. As far as I know what triggered the wholesale migration to SQL was on one hand IBM‘s restricted release of SQL/DS validating Relational Software’s crappy first version of Oracle, and on the other Berkeley‘s Ingres and its associated QUEL validating the applicability of relational model.
In fact it was when Codd tried to market his ideas thru ‘The Relational Model for Database Management: Version 2’ that his writing lost some technical qualities – for example terseness and strict adherence to a clean implementation of sound theoretical principles – and so he lost much of his influence. It was a pity, because before that many more people were hearing him when he delineated his still disregarded rules to evaluate a DBMS compliance with the relational model and the still not implemented RM/T.
> Others took the ideas and made them a bit more palettable to the mainstream.
> If some new thing is truly better, then one is going to have to do the same thing: show how it makes things better, faster, shorter, cheaper, etc. significantly *enuf* to justify tossing the current standards.
> Until then, it will just be considered an intellectual toy.
First, your ‘current standards’ – I take that to mean ISO SQL 92 and its successors – are so substandard that they are mostly disregarded. Try, for example, run some simple queries on Oracle‘s data dictionary with the SQL flagger turned on, even to the SQL 92 Entry level. Almost everything will fail to run, because not even data types are compliant.
Second, that the relational model can ‘make things better, faster, shorter, cheaper, etc significantly’ has already been widely demonstrated by Codd, Date, Darwen, Pascal in their various writings, by Darwen‘s in his BS12 and now by Nathan Allan in his Alphora Dataphor. But it is difficult to argue with a disinformed climate of opinion, because people don’t want to do their homework, do their reading, their understanding, even buying the relevant books.
Finally, it’s a pity that users suffer so much because current products are so limited and frustrating to use, and still the blueprint that would make life easier &ndash and didn’t before because it was disregarded – gets dismissed as ‘an intellectual toy’. When the Columbia space shuttle exploded, I don’t think anyone still considered physical and chemical theories, models and experiments intellectual toys, if one ever did.
Re:Integrated database computers: IBM AS/400 (Score:2)
> Well, when 7 dead astronauts are traced to SQL flaws, then perhaps the "real relational" model will finally get the attention that it allegedly deserves.
You should read the authors you criticize before being ironic about them anyway, my example was purposefully overshooted to try to bring your attention to the fact that theory is practical [uk7.net], and there is more [firstsql.com] than one book [aw.com] about that, but you seem to have also purposefully missed the point.
> What you need to sell it is catchy buzzwords and toy examples and techno-cliches that inject half-baked ideas (or even those that happen to be full-baked) to PHB's.
Here I agree with you. But all this can come just after an implementation of the relational model gains some acceptance. It’s a chicken-and-egg problem which was broken for the basic relational ideas by IBM Future System’s System R prototype which eventually became SQL/DS. BS12 could have been it for the full relational compliance, but perhaps now it’s too late for it, even with IBM newfound open source friendliness. But Alphora Dataphor could be it, too bad slashdotters don’t want to hear about it. There were at least two rejected submissions about it.
> I agree that NULL stinks overall. It's few benefits are not with the myriad frustrations it causes.
You get the point relating to NULLs. You can say about the same about duplicates, inconsistent language design, lack of closure, arbitrary restrictions, broken types and domains system, mistaken object support (the relvar == class blunder), and the list goes ever on that’s why it’s way better to ditch SQL and start all over again, and that’s why we need The Third Manifesto [acm.org].
That's not the point with MSFT DBFS (Score:2)
What's the point in MS' DB filesystem is that you're not INSIDE a database, but ON TOP of the database. So you handle files and bits of data as you are doing today but they're not physical files but views (or query results as you wish) on the data in the database. That's something different than a filesystem with metadata connected to the 'files' like in the article, or an OS that is just a DMBS like OS/400.
You could simulate the behaviour today if you store different pieces of a file in a database (SQL Server, Oracle) as blobs with metadata stored in related fields/tables. Query on the database, f.e. by selecting blobs based on a certain where clause on the metadata, and build some component that will reconstruct a file from the blobs. _THAT_'s what's all about.
Dominic is at Apple! That rocks! (Score:2)
Re:Dominic is at Apple! That rocks! (Score:2)
Dominic, we are delighted to learn, has subsequently joined Apple as a file system engineer.
This is the best news that I've had in a while on the Mac OSX technical front.
Allright, Dominic! Get in there and kick some ass!
How does this compare to Oracle's IFS? (Score:2, Informative)
Supports protocols HTTP, WebDAV, SMB, FTP, IMAP, and SMTP gives the ability to store, manage, and search documents, presentations, multimedia, Web pages, and XML files.
Also do Check-in/check-out, version control, and event notification features. Unlike most of the examples i have seen developers can extend these base features to build custom content management applications.
IFS: servers only (Score:2)
In anycase, IFS is not a workstation filesystem, like BFS. Strictly for servers.
Some people consider filesystems old hat (Score:2)
EROS [eros-os.org] claims to checkpoint the memory of the system - its running state - rather than have programs explicitly serialize state to save and so on. By doing this they can make a machine shut down and reboot in a matter of seconds into a consistent state with your programs apparently still running. This is different from hibernation - you can take the machine down at any time by pulling the plug and this will work.
Its a different axis of filesystem from the 'store more metadata' stuff in this thread, but IMHO its a more interesting way to go. EROS's storage is transactional - to the extent that what is on disk always presents a consistent picture of what was in memory; user-level transactions are dealt with in programs. Its unclear from the register article whether the Be filesystem had this level of integrity.
-Baz
Re: (Score:1)
Re:Noooooo! (Score:1, Funny)
~jeff
Re:Noooooo! (Score:3, Informative)
BeOS began development in 1991. the first iteration of a DB backed file system came out with BeOS 1.0 and BFS replaced in around 1994ish.\
soooooooo.......MS again is a day late and a dollor short.
same with MATURE Office productivity products, since workperfect was mature long befor word 1.0 was released, as was lotus spread sheet.
perhaps they did good work on the OLE crap, but that stuff sucks (imho) and Adobe has much better products to crate desktop publishing work that OLE was intended to help with....not to mention that word still can not do what TEX can do.
Re:Noooooo! (Score:2)
Re:We already have a "database" file system... (Score:3, Informative)
It uses B-Trees which if you RTFA is thought not to be a very good solution, but it was revolutionary for its day.
The idea of having a resource fork to all files, a little name badge for every file that tells file type and creator type, is tremendously helpful too. However, the resource fork on Classic MacOS files tends to corrupt at the drop of a hat, rendering this little innovation, also introduced with HFS, fairly useless.
Oddly enough, however, I find good ol' MacOS fairly robust...so much so that there is no need to reformat and reinstall on a regular basis. Its memory management sucks, but aside from that glaring problem it's a beautiful operating system. I have PCs running Windows and PCs running Linux here at Catseye Labs, but it's my good ol' G3 that I do most of my work on.
Re:We already have a "database" file system... (Score:2)
In my opinion unless there is a trivial method to reduce ALL the data of a file to a single stream of bytes that can be read/written with Unix-style calls, this is doomed to be a failure and a return to 1960's "pip" programs. MicroSoft would love this (it would quickly make all file transfers proprietery) but it would be a disaster for all software development.
Unfortunately I see no sign that anybody is going to address this. Even older Unix's have "attributes" like name/time/date/owner/permission and there is no way to communicate these without the program knowing about each of them and making up it's own encoding.
Re:We already have a "database" file system... (Score:2)
Re:sounds pretty good, (Score:1)
Have you been living in a Afgani cave for the last 3 years? Ext3 has been around since 1999 [lwn.net].
Its even the default filesystem in RH 7.2.
ResierFS went in to the 2.4.1 kernel in [lwn.net]
2001, but I know for a fact that the first patches appeared much earlier than that.
Re:sounds pretty good, (Score:1)
above notwithstanding, I did hear the same woes on #linux several days ago: "why does my suse still fsck so long", with a response of "hey, just be glad that it cks out at all: you dont want to ask me what the worst that can happen with an inopportune power outage is...found that out the hard way."
--
m iso socially aware artistic geek pen-pal, m or f, in '1337 edu. jazz, poetry a must.
email me (click my user info for addy) if you're interested.
Re:Fsck meta-data (Score:2, Insightful)
Note that MS has remedies their shortcoming with NTFS, which is more expressive than many Unix filesystems, and is fully capable of maintaining full HFS Metadata. this is why Services for Macintosh (or whatever MS calls it) requires an NTFS FS to run. metadata is much more elegant than "structured files", which seem to be what you might prefer. A big downside with structured files (like the ID3 tags in MP3 files) is that if you do not know the predefined format for the file structre, then you cannot access the metadata. this prevents the useage of a standard systemwide metadata store, which can be very useful in GUIs and multiuser systems to say the least.
-castlan
gots to preserve my mods