[MUD-Dev] Questions about ... XML as data format
Adam
ya_hoo_com at yahoo.com
Tue May 21 10:25:08 CEST 2002
-- Kwon Ekstrom <justice at softhome.net> wrote:
> From: "Adam" <ya_hoo_com at yahoo.com>
>> Kwon Ekstrom <justice at softhome.net> wrote:
>>> Other than time required, I'd recommend XML.
>> So. You're much better off IMHO going with a database of some
>> sort to start off with. This is really just an application of an
>> old maxim that any app which generates/uses/modifies any
>> significant amount of data should ALWAYS use a database - in case
>> it grows too large for basic emulation of database features using
>> savefiles.
> Databases are a wonderful way to store databases, they're
> specifically written to handle that. You can use a hybrid system
> as well, such as storing your data in a database in XML format.
> You then gain the ability of incremental updates, and database
> indexed searching along with the object oriented structure of XML.
Certainly; I think I made myself somewhat obscure in my last
email. I'd definitely advocate hybrid systems; what I was trying to
get at is that if you're writing a system that might want to expand
over time, then life is so much easier if you start off with a
database from the very beginning; given the quality of [almost] free
databases available these days, I don't see much reason not to?
Where I said "I strongly ... recommend not using *straighforward*
XML" I should have put more explanation of what I meant by
straightforward: the hybrid DB/XML you mention is a good example of
non-straightforward XML usage according to how I was thinking about
it.
To be clearer this time (I hope):
XML is fantastic as a markup language (especially now that schemas
have reduced the effort needed to understand and use it
properly). But if you're storing data, to be fetched and modified
often, XML on its own IMHO is a bad idea.
>> The only two exceptions I can think of are:
> I can think of quite a few more, but won't get into that now. I
> will say that I've used XML to store much larger amounts of data
> than 50 players or 25 mobs will require without a problem.
So have I, but not with the usage patterns of a reasonably big MUD.
> Another little something you'll discover is that not all XML
> parsers are equal in all areas. You may have to modify your
> programming style a little bit to get the best performance. Some
> parsers will give you the best performance doing single node
> selects, you'd have to know exactly what you want beforehand.
> Other ones do well by allowing you to select all the nodes and
> using an Iterator to sort thru them.
Thanks; I've not done any serious performance comparisons between
different parsers, but had come to suspect there might be such big
differences. Partly because of the wildly varying parse speeds
different applications (editors/viewers) will demonstrate on the
same input file.
_______________________________________________
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