[MUD-Dev] Is database access a bottleneck?

bradley newton haug brad at faithanddisease.com
Thu Dec 12 09:59:48 CET 2002


Okay, I'm sorry no...

A flat file is not faster than a database.  In some isolated cases
it can be, like cookie recipes and files under a meg in simple
applications.  This fact is as old as databases themselves.  I am of
course assuming that you save the files at some point.  In which
case there isn't a single circumstance in which flat files are
faster, period.

It's one thing to use a system like that out of necessity, it's
quite another to somewhere along the way, get confused into thinking
that it's not only viable, but superior.

Borrowing a little concept from 'Conversations':

  "Game Coder": We have this cool method of loading DATA from A
  FLATFILE

  "Database Engineer": You know, at its core, that's what a database
  does right?  A database conceptually takes data and writes and
  reads it from a file, except we have developed methods over the
  last 30 or so years that make the process better, faster and
  reliable.  There are branches of math devoted to this subject
  alone.

  "Game Coder": Oh we made our own, it's *really* fast and good!

  "Database Engineer": Did the guy who wrote this have any db
  background?

  "Game Coder": Hahahah no, he didn't need any.  It's simple, why
  muddle it up with a fancy expensive database!  We just assumed the
  initial speed gain we observed from loading an under 10 field 2000
  line file would scale, we didn't consider the additional overhead
  of file handles, and the clumsy method we use to save the files
  out.  We're all *really* smart, we don't need to do things like
  observe past trends in our claimed profession of choice, or
  utilize the work of others to make our jobs easier, we like it
  long and hard.

  "Database Engineer": Interesting... Hey that's a pretty cool horse
  drawn cart you got there.

  "Game Coder": Oh hang on, I have to make some shoelaces out of
  yarn I wove from the sheep I raised out back to put in the shoes I
  made out of the cows that were next to them. .. okay anyway.. Yeah
  it's fast!  It goes 100 times faster than a cart by itself! 100
  times!! It's not as fast as the one we made with square wheels
  though, but someone told us that the cart has to make it town
  along with the horses or it doesn't count.  But anyway it's the
  best out there so far! Specially since we don't look, or
  acknowledge other's work, and thus we feel no need to improve or
  question its design, and 'sides chicks dig it!  Next month we plan
  on making another cart to go to the mall with, since this one only
  goes to the grocery store.

  "Game Designer/Manager": Brilliant isn't he? 100 times faster! 
  It's my idea you know, I take all the credit. *shoving coder out
  of the way*

  "Database Engineer": Oh my mistake.  Carry on.  I have to finish
  designing this massive enterprise solution, there isn't anything
  here that the game industry could use, so just ignore me, and the
  thousands of man years of labor and thought that I represent.

  "Military Simulation Engineer": You get used to it.  They're still
  cheering about inventing things I've been doing for 20 years and
  consider about as complex as breathing.
 
  "Artificial Intelligence Researcher": Well at least someone
  doesn't come along every 3 or 4 years, use one idea isolated from
  the rest of your work and then build an entire sophomoric game
  around it, claiming brilliance.

  "Pen and Paper Role-playing Industry": At least you got credit,
  all we got was bankruptcy.

  "Game Designer/Manager": Thinking...thinking...thinking... what
  if, we used a network of weighted umm.. nodes to determine umm
  ..behavior, and figured out some kind of causal stimulation that
  would trigger say..  feeding.  I have no idea how to do it, but I
  drew this cool important looking chart on the whiteboard that will
  serve as a formal design document, functional spec, documentation,
  and guarantee me credit when the system is actually coded by
  someone smarter and less lazy than I.

  "Artificial Intelligence Researcher": Hasbro beat you to it
  sparky, it's called Hungry Hungry Hippos. Hey! Didn't I flunk you
  last year?

  "Game Coder": HEY! I found something! I think I'll call it a r..
  reerr... RRROCK! ROCK! WOOT! I DISCOVERED ROCK! *dance*

TUNE IN NEXT WEEK AS WE DISCUSS: THE BRAND NEW EMERGING ART OF
HASHTABLES and: SORTING, JUST HOW DO WE DO THIS ANYWAY?

-bradley newton haug

"downhill, in a hurricane"





_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list