MySQL FS 198
xcyber writes "Developer, Database Admin and user, MySQL is developing an mysql filesystem for Linux to mount database on
Linux as a fs. This is still in development stage and the development
team would like to receive comment on this. So please let us know.
" "Because you can" dammit. Thats just plain awesome.
Re:SQL? (Score:2)
Amongst all these other examples, it's probably worth noting that SQL is a declarative language. Basically, it allows you to express the results -- without worrying about the procedure used to generate the results.
Re:Liquid file system (Score:2)
And yes, file systems are databases; they're merely inflexible databases using ANCIENT technology. Not all databases are created equal.
-Billy
sweet! (Score:4)
--
Re:One step further (Score:3)
It's BAD to try for too much with the first release. If you'd like an 'object system', by all means prototype one using conventional directories; you'll decide quickly that it's little different from modern Unix (remember ioctl!). In other words, an overly complex solution.
We need a true file system, one in which ioctl isn't needed. See the latest plan9 OS for details.
-Billy
Oracle File System (Score:3)
Re:*holds up sign* (Score:1)
Well, the story about this topic was at
and the flames I gotr are still at
Look it up for your own.
My point was: 90% of the people running linux do not care about GPL, OSD etc. they like free as beer software especialy if its stable and the source is included.
You can forgett my addition, I only liked to show the attitude several people expressed.
a'o's
Re:That's the dumbest thing I've heard all day! (Score:1)
--
Re:People are missing the point. (Score:2)
Doug
Re:This might stimulate nerds and developers (Score:1)
Imagine if you could move a bunch of Word200 documents (they ARE XML files, mind you -- you just need an OLE stream decoder a la wv to decode them) into a DBFS directory and provide the DTD for that datatype in a way that you could make SQL calls against the files (records) using the DTD as a table definition.
You could then move files TRANSPARENTLY in and out of the DB, using the DBFS and automatically index against them.
A few years ago, I was responsible for getting a bunch of documents on a website to be searched and sorted. I had directory upon directory full of procedure and process documents. One day, I found a program called Xerox DocuShare, (written in Python, BTW) and it used some features that were very similar to this idea.
Cheers,
Ken Crandall
Re:Just because you can ... (Score:1)
Re:People are missing the point. (Score:1)
All one has to do is program for a dynamic, RDBMS-driven website, storing (and retrieving) images on-the-fly to see what I mean, adding your point, above. Of course, websites aren't the only place this is an issue.
The "ultimate portability" and "Even shell scripts" points are really good.
AS/400, Palm-OS, Be-OS, Reiser-FS, etc., all do something like this now, as has been pointed out.
Of course, this now has to be implemented.
I think they said they'd never land a man on the moon, or something like that. Then, there was this group at NASA.
Re:This project should help MySQL (Score:2)
Lastly, I'm largly unaware of any linux-only apps that actually make or break a user's choice to use linux vs. any other unix. I think what really makes or breaks the choice is price-point and percieved momentum. pauvre pauvre netBSD.
-Daniel
Re:People are missing the point. (Score:1)
Well, no. It was too daunting for me. But, I'd like to.
I recently started making a database where I could keep track of all my photos - a "photo database," if you will. (It's here [umich.edu], if you are curious.) I didn't store the photos in the database - primarily because there isn't enough room on the database server. I numbered all the images by hand and serve them from my personal computer - using MySQL and PHP on the database server to access them.
Anyway, I want to organize my photos into groups - and maybe even subgroups. And I want the groups to be able to overlap. I haven't done this yet, because I don't have the time to (re)impliment a file system inside the database! However, a "dbfs" seems to be exactly what I need for this task. It's close to what I envisioned.
Re:This might stimulate nerds and developers (Score:2)
Good idea... (Score:1)
Re:Be OS (Score:1)
Re:MysqlFS (Score:1)
I've recently been evaluating high end NAS/SAN (network attached storage arrays / storage area networks). The rep from netapp (makes high end NFS based devices) said Oracle is using their devices as the backing for their new E(whatever) service to compete with MS .NET. ... AND in the process, Oracle has forgone using their raw block access methods for, you guessed it, NFS-based Oracle database (to connect to netapp's netfilers) powering their own site. He said Oracle found they could map to netapp's high performance custom NFS file system and start to free up a huge engineering group devoted to optimized raw block access architectures.
Sounds pretty f'd to me. And not surprising to hear from netapp, given their whole universe seems to revolve around NAS (NFS) as opposed to SAN (fiber). Anyone out there actually running Oracle on an array via NFS ?
Re:easy & dangerous. Like sirens? (Score:1)
How about:
char buf[] = "foo,bar,bally";
if (write(fd, buf, sizeof(buf))
if (errno==EINVALDATA) {
fprintf(STDERR, "Invalid data\n");
}
}
The standard error codes (as specified by man 2 write: EBADF, EINVAL, EFAULT, EPIPE, EAGAIN, EINTR, ENOSPC, and EIO) don't really cover that scenario, but any non-zero value from write indicates an error.
My question is how to form a path to a row/column (and are you forming paths to rows or columns?) - would it be something like /db_name/table_name/column_name/value or /db_name/table_name/columns_primary_key?
Good idea (Score:2)
As well, this would be fantastic for configurations (in particular the complex ones of Gnome and KDE) since large amounts of data could be elegantly compartmentalized in a standard way. I find this nifty with the growing complexity of filestructures in these config sets, they would be open to editing and updating through the standard filesystem method, or through a standard SQL query system.
Re:Good idea (Score:1)
Re:People are missing the point. (Score:1)
You still cannot provide anything universal or that can be done by an end-user. Only having fs access to a db allows for this. First of all, name one universal BLOB that works exactly the same for all db's that support BLOBs (there aren't any). Name one standard SQL command that does all this. Name one standard piece of source code that works in all languages, all the time, for all OSes. Name one totally standard API/interface/protocol/whatever. None of the above can be done.
Unfortunately, BLOBs are not universal. Nothing works exactly the same way everywhere, all the time. And, let's just assume that you'll be using one DB on one OS all the time in one programming language, just to make things as easy as you claim it is. Things still aren't clean, since you will have to include code repeatedly in all your apps. Possibly, you may have to change your code if your tables change. Assuming you do everything the "right way" and use an interface such as ODBC, JDBC, or DBI/DBD, and assuming you write good OOP that is generic, you still cannot take that code everywhere to all apps all the time, even in the same programming language/OS. There will always be porting, adaptations, and recoding to get this to work everywhere with all your apps. In fact, everything needs to be planned so that all apps that will be using your code should follow the same conventions all the time.
To avoid this mess and to make life easier for end-users, we could mount the DB as a file system. This gives apps, APIs, libraries, OSes, end-users, etc. the ability to query, read, write, and modify data, even if the platform doesn't even support SQL! By mounting the DB as an FS, you give (nearly) all apps the ability to work on your data (where db data==files), just by being able to open and close files! This is the ULTIMATE layer of abstraction, making access truly UNIVERSAL. (Security restrictions/permissions still should apply, of course.)
There is absolutely NOTHING universal about what you suggest. Nor do all BLOBs work, even in theory, as you suggest. Nor do end-users benefit. Nor do all apps automagically get access to your data just because you wrote something in language a for database b for OS c to support program d.
Oracle 8i's IFS, Informix's data blades, MySQL-FS, PGFS, etc. all have been written by the db experts to address these deficiencies. Why do they disagree with most of the people on this post?
It's because they're right.
Read "Distributed Systems" by Sape Mullender (Score:2)
Re:*holds up sign* (Score:1)
Nothing about flickering, though.
Re:More like BeOS's filesystem? (Score:1)
MysqlFS (Score:2)
Oracle has been doing this for years.
This is just another important step that MySQL needs hurdle before it is concidered for high end applications.
So, basically... (Score:1)
-------
Re:Is MySQL ready for that? (Score:1)
Can you imagine ... (Score:1)
that would be SO cool
---
Re:That's the dumbest thing I've heard all day! (Score:1)
And, I'm sure somebody out there probably thinks the whole directory structure is too relational, or db-like, already. Give me a break!
Yes, a file system puts flat files inside a flat file; drives are more logically mapped anymore than they are physically mapped; RAID, LVM, and partitioning in general divvy that up into pieces; databases put relational data into a bunch of indexed flat files; BLOBs are nothing more than flat files stored in databases.
So, what is a drive or a partition or a file or a database? The lines are already so blurry you can't tell the difference, anymore, and you wouldn't want to, unless you want to go backward!
Re:How would this work? (Score:1)
Like the concept, implementation needs work (Score:1)
http://www.etoyoc.com/odie [etoyoc.com]
PalmOS (Score:2)
THe entire filesystem is based around the idea of a database, where memory chunks are accessed based on the name of the app, etc....
Re:Isn't this what Reiser FS is for? (Score:2)
this must be one of those times. without some way of querying your file system (except for ls) then you loose the relational aspect of the database. then you just have a filesystem that stores metadata for fast recovery. this is good from a fs point of veiw, but it does nothing to help you find the files you are looking for. it provides no relations between files, and does not store file descriptions (that are useful to a human).
eg. this is an image file that can be catagorized under political, humor, bill clinton, letch, etc.
use LaTeX? want an online reference manager that
Mute? (Score:1)
OK.. but which is it? You first say if you were to measure it to the "micro second, some difference might be noticed". Then three sentences later you say there is "no difference". You seem confused, and you were right the first time.
There is a difference (however minute) and it's due to BeOS not actually having the ability to create fields at the FS level. It's trivial to create file examples that show off the flaws in their method and to make peformance suffer. There are filesystems that do it better, through better architecture. Realise this and you'll see my point - that BeOS can improve it's so-called meta FS.
ps. I've used BeOS for several years now on PPC and x86, programmed for it, and you're probably using some of my apps (here's a hint - Doublin). Oh, and there's much more anger and arrogance without fact or links or proof than anything I'm putting out, believe me.
-- Eat your greens or I'll hit you!
Is this a prototype for mapping DBs into the FS? (Score:1)
If mySQL is only a prototype for that this is fine! However if this is ment as an improvement for mySQL I doubt it is the right step currently, as there are a lot of more demanding features like locking, cashing and general peformance in multiuser environments.
And of course it would make sence to be able to describe table mappings from existing standard unix configuration files like
e.g.: select user, shell from
or better: echo "why don't you use bash?" | mail `select user, "," from
Regards,
angel'o'sphere
Re:Liquid file system (Score:2)
I've seen presentations about Placeless Documents and it's really cool.
Re:People are missing the point. (Score:1)
A: Flat files stored in a database!
Q: What is a database?
A: Data stored in indexed flat files!
Q: What is an index?
A: More data stored in flat files, or a database of metadata that relates to the order of data!
Q: What is a file system -- Unix/Linux?
A: Flat files stored in a database (that's why it's called a file system) -- with at least one flat file, such as /dev/hda1!
Q: What is a hard drive (present day terms).
A: A device that logically maps data on a physical medium, or a database of sectors!
Q: What is version control, such as CVS?
A: A database of changes to flat files.
Q: Why don't (many) people get this?
A: Maybe they haven't been a DBA, haven't taken a class about modern operating systems, haven't developed a dynamically-generated website with images, haven't been a frustrated programmer dealing with dynamic and static data simultaneously, don't organize data well, haven't read about new FS'es (such as Reiser-FS), haven't used asset management software, think there really is a distinction between filesystems and db's, store all data in flat files, etc.
Re:sweet! (Score:2)
-
-Be a man. Insult me without using an AC.
A DB FS? (Score:2)
Like the AS/400! (Score:2)
Re:Other low-level data storage systems out there? (Score:2)
I am looking for something way lower level. ReiserFS isn't a bad solution, I just dont believe that their plugin API is mature enough to base another project on top of --or am I wrong?
Re:This might stimulate nerds and developers (Score:2)
Good point -- didn't think about being able to use the "Find" function of an OS.
However, how is this better than a dedicated web app for HR flacks?
Find your favorite non-computer-literate person and see if they even KNOW that there's a "Find Files and Folders" in their Start menu? (I'm assuming a Windows-centric office here)
Like I said, I think it's cool and potentially useful, but probably not as useful for non-nerds
Re:Liquid file system (Score:2)
I also don't know what you mean by 'number of possible categories'. I think you're mistaking 'categories' for 'sets of categories'. In my example, "/etc/wtanksle" is a set of two categories; "etc" is a category. I could see some reason to cache the results of category queries; that's an optimization concern, and not my specialty. I don't see any reason to try to precache all possible queries, as you seem to imply.
Its speed will be almost irrelevant; I predict that it'll be about as fast as the current system, but even if it's hundreds of times slower it'll still be fast enough, since caching is trivial and looking up a file based on a full filespec is almost never done.
-Billy
Re:This project should help MySQL (Score:2)
Your analysis is wrong.
Most anything shipped on linux distro is nothing more than a Unix program PORTED.
Unless GCC, X and others are 'linux only' apps.
reiserfs is intended to be a database fs (Score:3)
Much of the ultimate point of ReiserFS is the marriage of databases and filesystems (filesystems are really just a limited sort of database anyway). This is the reason for the all the commercial funding; there are people out there who really want this.
See Hans Reiser's White Paper [namesys.com] for information on where he's going with this.
For what it's worth, database filesystems are not a new thing at all. Hans is just planning on accomplishing this in a way that completely preserves the Unix file metaphor and related concepts.
Never use a gift horse to do a man's job (Score:2)
A database is about data. The data is partitioned into tables and columns, with a large number of additional constraints (unique, primary key, foreign key and check clauses, for example) to limit the values of the data. Additionaly, the data is strongly typed. In order to access this data, SQL supports very high level commands, like SELECT, INSERT, UPDATE and DELETE.
The power of a database is most basically in its very high level nature. You, as the user/programmer, do not care where the data is, who else is using it, how it is stored, or what the old values where. The database management system takes care of all of that. Other powerful features of databases include indexes, joins, subselects, real NULLs, aggregate(set) functions, and GROUP BYs (sub-setting).
Now, contrast this with the low level file/directory structure. In this, you have a hierarchy of directories, each of which contains one or more files. A file is nothing more that a stream of bytes, and the only constraint they have is that they be uniquely named within their directory. Also, a single file can be in more that one directory.
In order to use a file, the programmer must know where the file is, possibly who else is using it (with lock files, for example), what format the data is stored in and, if they want to be able to undo their actions, the old values. The advantages to files are the plethora of tools for manipulating them (at least in the case of text), and lower startup cost (eg. it takes less time to make a stupid file format than a SQL schema).
This project is therefore brain-dead as an application development platform. 'But,' I can hear the reply, 'it's useful for users who want to change the data in the database.' Reply: every database accepts SQL, which modifies the data. Some SQL API's I've seen only take two lines of code to retreive some data. And SQL won't shit on your data if you accidentally type it in in the wrong format, it'll conplain, but your data will be safe and secure.
This is quite possibly the worst idea I've ever heard. Worse than Linux as an Internet Explorer plugin, worse than Napster as a family tree generator, worse than Quake III as a spreadsheet, and even worse than Apache as a VMS shell.
Not that I have anything personal against it.
Re:Liquid file system (Score:2)
You might be able to build some of the categories statically, but if your fs is truly fluid, then the number of possible categories is gonna be too huge to build and maintain statically. Maybe it needs to be a little less liquid, or maybe you can find a way to indentify commonly accessed files/categories and build that stuff statically, then do everything else dynamically.
I also think this needs to integrate with rather than replacing a traditional fs. I doubt this method will ever be as efficient in terms of looking up, creating, and deleting files as a traditional fs, so it would be bad for system stuff like
Re:More like BeOS's filesystem? (Score:2)
The early versions of BeOS used a separate database (not very complex) and filesystem, which wound up being very difficult to work with, so eventually they merged the two. The "database" aspects of the BeOS filesystem are more of being able to add (relatively) arbitrary data to particular filetypes, and do searching based on those criteria. It isn't a formal database in any sense of the word.
Versions of BeOS prior to the Preview Release had a file system and a separate database. Because it was difficult to keep the data in the two separate systems consistant, it was decided that they should merge. This happened in Preview Release 1, and BFS remains relatively unchanged today.
At the time there was a lot of enthusiasm for the merged design to be a database-based file system, but after a lot of research, Dominic Giampaolo, the engineer doing the design and coding, determined that wasn't going to work. The reason is it becomes too difficult to filter out the files you aren't interested in. There is a lot of organizational value in a hierarchical, structured, traditional file system.
The design for BFS that was implemented is best described as an "attribute-adorned file system," with a query engine that can search against the attributes, and some indexing to make common queries fast. There's a fairly simple query language (along with simple GUI tools), but it's not as complex or capable as SQL (nor would you really want it to be). You can execute those queries from the command line if you want, which can be pretty useful when piped to another program (much as find is in Unix, but simpler to work with).
Re:sweet! (Score:2)
Just went through it to. Good Luck
Re:Liquid file system (Score:4)
For a long time now I've been thinking about filesystem-as-database concept. We've passed the point where computing is about optimizing hardware resources. It is now about optimizing *user* and *information* resources. If your hardware is blazingly fast, but you are lost in a sea of irrelevant information, you can't do anything. I think that's where the database/meta-filesystem comes in.
With all this rich content around, we should not be searching for files based on some arbitrary linear categorical name. We should be searching on *attributes*. We should be searching on *association*. E.g., "List all files relating to my work that I have store on my home computer", "Now, of those, show me all files that pertain to status reports". Or "List all data I have on the artists and bands in my music collection". etc.
This is where plain, flat, hierarchical file systems fail. We need basically a data "repository", and various ways of obtaining information from that repository, based on attributes, categories, mime types, relation to *other* files, etc.
Isn't this what Reiser FS is for? (Score:4)
Bruce
Liquid file system (Score:5)
In my vision, 'documents' would be categorised, and the categories could be viewed in a manner very similar to how we now view directories, except that a file is in more than one folder at a time. A file which is named /etc/wtanksle/ppp.conf could also be referred to as /wtanksle/etc/ppp.conf, or if it's unambiguous, /etc/ppp.conf. /dev/removable gives the list of all removable devices; /dev/scsi gives the SCSI devices (including the removable ones).
The potential uses are many -- I think it would make a lot of common computer tasks a lot easier.
Oh well -- anyhow. :-)
-Billy
This project should help MySQL (Score:3)
Take the linux kernel. Would the kernel be anywhere near where it is today if people hadn't gotten others interested by writing intriguing, linux-only apps? Probably not. Perhaps one day MySQL will evolve to the point where this will be useful, perhaps due to developers attracted by this project.
Re:Liquid file system (Score:3)
the cool thing is that i can stream the data via apache to whatever application i want. so i'm going to upload all of my mp3's and build file lists based on the primary keys of the files. then i can stream the data to mpg123/xmms. it works really well, and since i store the md5sum i can prevent myself from storing exact copies of a file.
i'm useing postgres right now. if they had the ability to mount raw partitions, and get over the 8k limit (this ones coming soon) that would be great. it would make backups easier. now i just have to dump the database and then backup the db dumb and the
use LaTeX? want an online reference manager that
This might stimulate nerds and developers (Score:2)
The everyday user won't exactly go nuts over it, though.
The site gives the example "imagine marketroids browsing through the directories to directly access columns and entries" (or words to that effect)
No way. Hey, don't get me wrong, I LIKE that idea, and it gives me a pretty cool idea for a couple of projects that I'm working on, but think carefully about it: any sufficiently useful database for a large company is also sufficiently large that a directory tree is absolutely the slowest and most confusing way to access data held within a database.
For example, let's look at two examples:
It's not bad, but it's not as good. Plus, with good programmers (and good communication between programmers and management), the SQL is so abstracted out, it makes no difference. It gets condensed to a list of names and a checkbox next to the names. Those that get "checked" get a raise to $100,000.
To be truly useful to non-programmers (or non-analytical thinkers, if you will), the MySQL-FS would have to abstract out so much of the Database, you're back to a filesystem and a set of scripts to update a MySQL database.
It's cool, but it's not for your regular joe. Beyond a couple of levels, the average computer user gets lost in a heirarchal filesystem -- assuming they don't fill it up with "Untitled Folders" and such.
whats the point? (Score:2)
--
Re:Other low-level data storage systems out there? (Score:2)
Regarding the ReiserFS plugin API, you're probably right. However, you don't necessarily need plugins if your project is simple enough. That is to say, if all you're doing is associating a set of data with a key, you make a file (named by the key) and put the data in. Need multiple keys? Use symlinks.
If your project is of some size, lightweight file support will likely be done before you are (it certainly will if you throw Reiser some money -- he funds his team that way).
Really, though, I think SQL is almost certainly your best option. The hashing and cacheing done by most modern databases more than makes up for whatever speed is lost to SQL support -- and once again, that speed loss is a load-time thing only if you write your app correctly.
Re:Isn't this what Reiser FS is for? (Score:2)
Turn the unix philosophy on its ear... (Score:2)
Re:Other low-level data storage systems out there? (Score:2)
Again, for a normal application you're absolutely right. But if you want to push/crunch a few GBs around in a coupla minutes, every little slowdown counts
Re:Other low-level data storage systems out there? (Score:2)
I think a well-balanced solution with cache and FS-level access (ReiserFS maybe, in a coupla years from now) will do better. Although, I am really more impressed with SGI's XFS.
To see how this works, check out IBM AS/400 (Score:3)
This approach also simplifies development, which helps to make the AS/400 such a powerful application engine.
Re:Other low-level data storage systems out there? (Score:2)
Re:Other low-level data storage systems out there? (Score:2)
Not all SQL-based databases are alike. If you have the hardware budget for a {SMP,clustering,mainframe} system, a good RDBMS will take advantage of it -- something which might not be said of solutions optimized to perform well on lower-end hardware.
So, yes -- do your benchmarks, on hardware comparable to what you'll be using for your actual production system. And don't count SQL-based DBs out yet; I would be entirely unsurprised if the overhead which makes them flexible is more than made up for by the heavy optimizations done elsewhere.
They're "duals" of one another (Score:2)
It would provide pretty "weak typing" of a sort of TCLish style where "everything is a string, sort-of."
There are probably a lot of useful applications out there that wouldn't care much about the distinctions. That probably parallels the way that a lot of applications out there don't really care that MySQL does not satisfy the ACID properties or offer triggers, foreign keys, or other such things.
It also might be regarded as parallelling the way that Lisp-like languages have "strongly-typed data" with dynamic typing, which is a bit the way ReiserFS might be used, whilst "MySQLFS" looks a bit more like the "static strong typing" of ML/Haskell. Which is a rather weaker analogy...
In any case, the distinctions between ReiserFS-as-DB and MySQLFS are fairly strong. MySQLFS looks a lot, by the way, like the NameSpace concept in Casbah. [casbah.org]
Zope file system (Score:3)
I believe that is one of the goals of ReiserFS as well -- that database vendors use file systems to store data instead of having to use raw disk partitions, or deal with file system overhead plus database overhead...
Matt Barnson
How would this work? (Score:2)
goober:$ cd
goober:$ ls
USER_ID FIRST_NAME LAST_NAME TIMESTAMP
goober:$ mkdir AGE
goober:$ echo "Oh crap, there goes my schema!"
"Oh crap, there goes my schema!"
goober:$ cd USER_ID
goober:$ ls
11023 11025 11044 11055 11092
goober:$ rm 11023
goober:$ echo "Wow! I hope that wasnt relational!"
"Wow! I hope that wasnt relational!"
goober:$ exit
Seriously, what type of integrity checking will be enforced in this filesystem?
I am betting that you either have robust integrity, which would give a completely counterintuitive file system, or lax integrity which would open the doors for all sorts of mischevious errors and data corruption.
Re:Other low-level data storage systems out there? (Score:2)
Re:MysqlFS (Score:2)
Which actually has nothing to with the posted article. This article is about creating a virtual filesystem that serves as an interface to the contents of an existing MySQL database (kind of like the /proc filesystem). It doesn't mention anything about creating a special filesystem for MySQL to store its internal data in a more efficient form.
Integrity of data in a database filesystem. (Score:2)
well, wasn't that just lovely (Score:2)
This is what happens when you discover that your co-worker has been posting crap as cyb0rq_m0nk3y, and then they feel that it would be funny to post their inane rant on my computer while in the restroom.
Makes us (the tewwetruggur contingency) look by far dumber than normal.
again, my apologies.
Re:Isn't this what Reiser FS is for? (Score:3)
Re:A real world use for this (Score:2)
I've never been thrilled with the performance of storing LOBs in any kind of DB -- Oracle, PostgreSQL, or MySQL. The plain-old filesystem tends to do it better and faster. I usually store the path to an object in the DB instead.
That being said, I have used the LOB stoage in Postgres to implement a versioning system for in-house work (and it worked well enough to prove to me that it's do-able, but not well enough to actually use). The concept is sound, but the implementation needs some work.
However, using a DB's LOB is a helluva lot better than using CVS for binary objects. CVS seems afflicted with unseemly memory bloat when checking in/out large binary objects...
More like BeOS's filesystem? (Score:2)
What about metadata (Score:2)
Thanks
Bruce
Re:This project should help MySQL (Score:2)
Thanks
Bruce
Is MySQL ready for that? (Score:5)
*holds up sign* (Score:2)
Hell, I will anyway. WTF are you talking about??? GTK *flickers*? Since when? I used to have GTK apps on an old 40MHz 486 (and it was a DLC machine at that...a Cyrix 486 that plugged into a 386 mobo) and I didn't see said flickers *unless the app was poorly written, was doing animation, and didn't double-buffer.*
Bah, Troll Tech wrote somewhere? The PR department wrote an official release that said something along the lines of "we did not emulate the slow and flickery refresh of GTK(or was it gnome?)" Bullshit. Show me the link. Why would Troll Tech have a position on GNOME, anyway? They don't compete with GNOME in any way. They write a toolkit. I've seen some poorly-written QT programs that display flicker like all hell, and I've seen some GTK apps with decent animation. I've also seen well-written QT apps that display no flickering, and bad GTK apps that do. It depends on the app, I suppose.
One step further (Score:2)
[*] really the class has other data structures besides the actual file data: e.g. file name, a field for comments about the file, etc., which may vary from class to class
There are also a variety of classes which serve as containers. The most obvious are what traditionally are directories or desktops. Another container class is "query", which has typical database search methods associated. These can be saved, copied, etc.
Imagine this: your command line should not be associated with a particular directory location, but rather a particular query. On the command line you most frequently use "cq" ("change query"), "rq" ("restrict query"), and "eq" ("expand query"). So to view the penguin image I know lurks somewhere on my drive, the sequence would be something like
% cq type=image ./penguin.gif
5037 files selected
% rq *pengiun*
2 files selected
% ls
pengiun_57.jpg
pengiun.gif
%
No default action for type "gif"; performing default action for type "image": opening penguin.gif with gimp...
(And, of course, there are obvious database sorts of features that any sensible graphical file explorer should have...)
To summarize:
(1) YES!!! Regardless of how exactly the system implements it, the filesystem should be interfaced as a database.
(2) Furthermore, don't view files just as RECORDS -- view them as active OBJECTS that are instances within a hierarchical class structure.
Finally, I think a lot of this can be done just with user interface, without having it explicitly in the filesystem. In fact, things have definately been moving this direction, at least for graphical file explorers. Has anyone added this sort of thing to a command shell?
Au Contraire (Score:2)
All those complications that MySQL eschews are the sorts of things that would muss up the idea of viewing "database as FS hierarchy."
And as for the "locking" and "transactional" issues, the point is not terribly different. Filesystems generally don't provide ACID properties; neither does MySQL; that fits together well.
Mind you, it's quite possible that there's a much bigger controversy concerning stability; based on the MySQLFS web page, it appears that they're passing a CORBA IOR into the kernel. What can that possibly mean other than that they're assuming the presence of the "kORBit" implementation in the kernel? The flaming that surrounded "Why don't we try putting an ORB in the Linux kernel?" was much more vigorous than any flaming about MySQL lacking some ACID features! :-).
Re:Other low-level data storage systems out there? (Score:2)
Well, almost.
You can also use ReiserFS -- particularly in a little while, after it impliments lightweight files (thus reducing the amount of overhead for eath record). Yup, ReiserFS has low-level support for relational storage, and lots of Other Cool Stuff. I understand that Squid has accelerated support for it; I've also seen a system for indexing newsgroup articles that uses Reiserfs as its backend. Roughly put, this is possible because of reiserfs's blazing speed when working with small files; it also has a plugin API (in-progress?) and Assorted Other Good Stuff.
Be OS (Score:2)
Re:More like BeOS's filesystem? (Score:5)
BeOS doesn't have one big clump of data that is partitioned; it has a lot of little bits of data. There is nothing "supposed" about the attributes.
For instance, an "MP3" datatype might have fields for Artist, Title, Album, Year, and Comments. You could then search for any song with the word "Land," performed by a group with "Men" in their name, on any album between the years 1982-1988, with the phrase "sounds like crap" in the comment field.
There's no way to actually define a new field at the FS level.
Sure there is. Preferences->Filetypes allows you to add new attributes to a particular filetype, as well as define new filetypes. It's up to the associated applications to do anything meaningful with the new field or fields, but you can pretty much do what you want.
On the command line, I don't think you can manipulate a global filetype. However, for individual files, you can add your own attributes, delete existing ones, and so on.
Early version of BeOS did use a database FS for the entire system but they dropped it by R4 (I think that's the right version) because of performance issues.
The early versions of BeOS used a separate database (not very complex) and filesystem, which wound up being very difficult to work with, so eventually they merged the two. The "database" aspects of the BeOS filesystem are more of being able to add (relatively) arbitrary data to particular filetypes, and do searching based on those criteria. It isn't a formal database in any sense of the word.
--
Re:Just because you can ... (Score:2)
Well, but maybe you should.
Sure - a DB accessed as a filesystem doesn't present the full power of the DB through the filesystem API. And sure, a DB filesystem doesn't necessarily have the same performance characteristics as a standard filesystem.
But there are some very significant applications where a DB presented as a filesystem makes brilliant sense. Here's two simple ones off the top of my head.
Configuration management. Systems like CVS go to great trouble to get transactional behavior, so that you can't lose code if the program crashes in the middle of an update. If you're using a DBFS, you've got transactionality and rollback for free.
Micro-applications. There are a lot of simple applications which really need transactionality/rollback facilities, but which can't (either for portability or for size reasons) make use of a complete transactional database facility. Write it to access files, and let the database take care of transactions.
I don't have anything to do with this project, but I think it's a great idea, because I'm doing almost the same thing with DB2. (Why DB2? Because I work for IBM Research..) I'm building an SCM system, and I don't want the higher layers of my system to need to understand the database or the particular table layout that I'm using. So they access it as a filesystem; downbelow, it's a rock-solid database.
Of course, all of the above assumes transactionality - which is not yet fully supported by MySQL. So I'd be a little paranoid before using this, to make certain that they're using the transactional tables!
-Mark
A real world use for this (Score:2)
As PHP is used in conjunction with MySQL a lot, the functions like move_uploaded_file could be used to store blobs in the database rather than an insert into a blob field making your code much easier to read, but, of course, making the server setup a lot more complicated.
Without row level locking, however, you will face bottlenecks if you try to do anything besides a mostly read-only file system.
Other low-level data storage systems out there? (Score:2)
Re:easy & dangerous. Like sirens? (Score:2)
This would be great for text based files and spreadsheets. The possibilities for searching and updating your files would be greatly enhanced by having them maintained by a database.
I don't think a database would be appropriate for graphics or music files(other than storing pointers to those files, but certainly any text based file would be ideal.
Given my thoughts on how a database enabled filesystem would work, I don't think very many joins or triggers would be necessary. Most things could be handled by single tables.
Besides, there is the matter that mySQL doesn't support foreign keys or triggers anyway, and last I checked those features weren't on the to do list. :)
Re:Please explain (Score:2)
Re:Isn't this what Reiser FS is for? (Score:2)
Re:SQL? (Score:2)
SELECT Age, Height, Name FROM MyAddressBook WHERE Age<18
The above statement will return the fields Age, Height, and Name from the table "MyAddressBook" and limit the values to only those whose age is less than 18.
There is also ways using SQL to insert data, create tables, and lots and lots of other stuff.
Re:SQL? (Score:2)
Example: "select answer from whizbang where
qid = 22 and sid = 1"
whizbang is a table (imagine a spreadsheet that's accessed row-by-row). The query grabs the answer column from the whizbang table, but only in rows where the value in the qid column is 22, and the value in the sid column is 1.
PostgreSQL filesystem (Score:2)
Can someone compare this to the MySQL filesystem, or perhaps point me to a place where pgfs can still be downloaded?
Database independance (Score:2)
Re:People are missing the point. (Score:2)
Re:How would this work? (Score:2)
Open your mind a little further. You're only envisioning the first steps. Certainly being able to transist the database like a filesystem is an extremely powerful interface. Data integrity could be preserved by interacting with the shell the user is in while (s)he is trying to manipulate data. For example:
Get the picture? ;-) Essentially, the interface will have to understand how to translate a row into a hierarchical representation. Getting a useful and easy-to-understand interface this way may not be the easiest thing to do. Add the difficulty of resolving foreign key dependencies and such a CLI would get quite confusing. An interesting spin on this would be to bind canned queries to directory names. Still, it has a very limited scope. Complex queries would be difficult to attain through such a CLI.
Re:Good idea (Score:2)
Seriously. The average config file is an heirarchical structure as opposed to a table structure. This makes it ideal to use XML.
I think that making config files usable by XML, one could write custom configuration apps that would work with any program. Example: mythical "gappconf" would simply need the rc file as well as some DTD description of the tags for that program, and it would present the standard tree widget with descriptions of what options you can change, what restrictions you have, etc.
Now, extending your idea above, I would think it's also possible, but beyond my ability, to write a fs that fakes a directory structure based on an XML file, so that you can decend into directories via your favorite shell and change specific options that you want.
Filesystem interfaces (Score:2)
There have already been even FTP and HTTP filesystems for several operating systems if memory serves, and I know there have been a couple other odd ones for BeOS. I nearly did a database FS for Be a few years ago myself.
Speaking of which, this would be much easier to implement (filesystems are simple to write) and more useful IMHO (because there are already standard APIs to query filesystems and support any number of attributes for files at the OS-Filesystem level) to do for BeOS.
I'm sure it can be done for linux too, but I have doubts as to the usefulness of it under any OS, much less one where you don't have the luxury of being able to utilize existing attribute support.
It might give some shortcuts for reading, but writing will likely be very complicated. I don't see a good way to do anything along the lines of joins either. The idea of using "." files/directories will help provide some of that I suppose. Permissions will also be a problem, though I guess you could just go by login name.
A good reason to have filesystem interfaces to complex resources (like FTP, HTTP, databases, etc) is that it is easy to access things on a filesystem from within just about every programming language on every platform. However, by forcing the normal interfaces to those resources down into what can be done to a filesystem some things also become very complicated. To do those more complicated things will either mean complicated interfaces or programs that give the filesystem information through some other means (ioctl?) or perhaps writing commands to a file within that filesystem ("cat 'SELECT blah FROM blahtable' >
In short, I'm sure it'll be very fun to implement and be an interesting toy which may even have some uses...
People are missing the point. (Score:4)
Imagine a dynamic web site that uses this! You could simply copy files (especially graphics files) to/from a table easily and look them up via SQL queries! My goodness, the usefulness is extreme, people.
Have any of you (fs!=db) nay-sayers ever tried to store/retrieve GIFs and JPEGs in a relational database for a web site -- an often daunting, but often necessary task? There are whole article on my to store/retrieve pics as BLOBs via MySQL/PHP on PHPBuilder.com: http://www.phpbuilder.com/columns/florian19991014. php3 and (sorta) http://www.phpbuilder.com/columns/bealers20000904. php3
So, for those of you who can't get over this idea, try doing sites that store images in databases sometime. An idea like this (one being done by the big RDBMs -- and I work for one of those) is a BOON for websites. It also has many other applications.
A layer of abstraction is often a good thing for filesystems, and it's where things are headed. IMHO, I think db's could provide BETTER security and make things more distributed, rather than current filesystems. Imagine whole new networked filesystems that are distributed databases. Open your mind. Think about it hard before brushing it aside.
Besides a db is an fs is a db. It depends on how you look at it, your definition, etc. Is a filesystem relational? Does a db use local storage, often RAW storage. The true computer definition of the two is not all that different. And, SQL is not the only query language out there. Haven't you heard of CLI, which uses commands like cat, ls, echo, rm, mv to handle data? What about those relationships called directories?
I say, what's the real issue? Raw speed? Oh, wah! Grow up and join the enterprise! Oops, I guess the AS/400 must not be a viable platform; they've been doing this HOW LONG?!?!?
Q: When are we Linux/Open Source people going to get enterprise-level file and storage management?A: When we get to the point that we implement at least a JFS (if not a full-fledged logged filesystem, good logical volume management, real uninterruptible power, truly fault-tolerant hardware/software clustering, better security, and fully distributed storage management that backups and versions data automagically.
On a lighter note, MySQL now implements a filesystem. :-)
Re:This might stimulate nerds and developers (Score:2)
and POW! You've got the religion!
Currently, programmers are about as far removed from the computers they work on as a chimpanzee is from a spider monkey. An end user is an armadillo.
People DON'T think in terms of files and folders -- that's a hold over from filing cabinets where it is the only method to wrangle and organize physical documents. People think in terms of tasks and projects.
If you're working on a project and you remember something you did 2 years ago that you can re-use (or at least build from), you don't say, "It's in that tape we backed up to in the 'Projects for Harold' folder". You say "Didn't we do something similar for Harold a few years ago? Something to do with sand and apricots, I think"
You pull up Harold's info, look through the list of projects done for him, and find one described as "Peachs and Beaches" -- bingo, you've found it.
Re:More like BeOS's filesystem? (Score:2)
No, the MySQL filesystem will only provide the means to access regular databases as if they were filesystems.
I imagine that in the root of the mount point there will be a directory tables/ with a list of tables in it. This is not like the BeOS's filesystem that stores files in a table.
Nontheless (sp.) this is pretty cool, if a stable version of this thing is released (which is probably not for the near feauture) I imagine using this to make backups to a CVS server (like the article suggested).