Sunday, April 22, 2007

The I/O of it all. Another abstraction layer example.

Recently I have been working on some "one-hit-wonders" programs that are needed just once. Working in the "COTS" like systems for years have me always thinking long term this & long term that. There is a reason the term "legacy" is used to describe existing systems; they have a VERY VERY long life, well beyond the original developers. So, my program using the latest pieces of the .Net XML Navigator and scans through a tons of flat files reacting to various things discovered in these files. My huge backlog of programming experience made me first think "Oh man, this program will take a long time to finish." Man I was so wrong.

Then I started to remember an article (ftp://ftp.research.microsoft.com/pub/tr/TR-2004-136.pdf) read a few years ago written by Jim Gray (currently in the MS R & D division). He has been fundamental in the RDBMS arena for years. This article was all about "fast" file reading and writing. For a moment I was thinking, what the heck is a RDBMS guy care about file I/O. Duh, everything is ultimately written to disk dummy! For simplicity sakes, all "good" computers must be turned off every now & then & therefore will lose all in-memory data. This made me realize that Relational Databases aren’t necessarily "faster" in the pure sense of performance (with all other things being equal - which isn't ever the case). But it is easier. That is one of the main goals of abstraction.

As I see it, lower level solutions attempt to handle the "ugly" details of it's layer leaving only exposed the common utilization scenarios for the consumer. Databases are no exception. Given the time constraints, learning curves, lack of skill sets (sorry to say), and elaborate business problems to solve; leaving the file I/O of the data to someone like SQL Server or Oracle isn't a bad idea. Why re-invent the wheel right? I agree with that, I guess I just get a little annoyed from time to time with the mystical impression people have of RDBMS. Please note, I am not saying I could do any better for a "commercial" product or that I don’t have respect for the development that went into these kinds of products. I am just not a fan of the "magical" black box mentality that exists in many development shops related to this topic.

So do you think I offended every DBA in the world? I hope I didn't offend all of them.
J

No comments: