Userinfo

Releases and bugs in here...
Persson
Posts: 18
Joined: 2003-02-02 13:21
Location: Sweden

Userinfo

Post by Persson » 2003-03-05 22:16

I was just wondering why dch++ store the userinfo in .xml files. Isn't it easier to store it in a database file.
I don't really know what benefits there is to store these things in i xml file.

Just a thought

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 14:32

Post by Sedulus » 2003-03-06 00:43

well.. yeah, databases are easy. but xml libraries are also easy, so this is a choice of the programmer.
the cons of a database are that there would need to be a (multi-OS, because the hub runs on linux too) database server running when the hub is running. I do not know of any database that _everyone_ has running at all times.
xml is easy and unambiguous to parse, so you'll get the data as easy as from a database.
xml is text. so it's easy to convert a list of usernames from (for example) the stimbot user export to the dch++ access.xml. and the other way around, it would be easy to export the data to a different hub. (bara skämtar arne =) )

the only real advantage of a database (under these circumstances) would be that data I/O is much faster. but manipulating user and ip lists is, even for a large hub, not even close to the amount that would justify using a database, considering that dch++ keeps everything in memory and only reads at startup and only writes at +refresh (opcom).

is this answer satisfying?
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

Persson
Posts: 18
Joined: 2003-02-02 13:21
Location: Sweden

Post by Persson » 2003-03-06 15:28

Very satisfying =)

Who is online

Users browsing this forum: Google [Bot] and 0 guests