mldonkey-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mldonkey-users] MySQL


From: Pierre Etchemaite
Subject: Re: [Mldonkey-users] MySQL
Date: Wed, 22 Jan 2003 20:26:50 +0100

Le Wed, 22 Jan 2003 19:51:59 +0100, Nikolai Prokoschenko
<address@hidden> a écrit :

        Hello,

> 2. I'd like almost everything to be stored in a database - not only the
> persistent data. Why? Quite easy: a database is optimized. Smart people
> have programmed data-storage algorithms for years. Every text-file is a
> nightmare compared to it - slow and ineffective. My ~/.mldonkey has about
> 1Mb of such text-files - database would be much faster.
> 
> 3. All the cruft concerning reading and writing files can be discarded. If
> the necessary data is just written to the database (on the fly, as soon as
> it arrives), there is no need for much memory and no need to write
> temporary files just in case mldonkey crashes.

You can cut down the overhead of dumping the "memory database" that is done
every 4 minutes (default value), but accessing data thru a database will be
more costly than accessing it from the memory hash table. The efficiency of
database interfacing depends on its implementation (precompiled queries ?
placeholders ?...) So the real performance benefit needs to be measured.

Also, binary formats are a PITA if (sorry, when) something wrong happens. 

And this is a bad idea for setup files. If you want to modify the
configuration while the core is not running, it will require specific tools
just for that, instead of my trusty text editor. Or specific tools just to
convert the database to/from text format. Keep setup files as text files. If
you want to optimize that, only save them when a parameter is modified.

> 4. It will be much easier for GUIs to get the data. The telnet interface
> could be slimmed up this way, stats won't have to be parsed out of telnet
> responses (which is a pain in the neck, as I see it), discussions like
> "'cs' vs. 'client_stats'" won't be necessary anymore. 

The GUI doesn't "parse telnet interface", it uses a binary protocol. Using a
database as the mean of communication between core and GUI is not without
drawbacks (synchronisation, notification,...) Personally, I think it would
be a mistake.

> So these are my points, apart from the GoodIdea(tm)-feeling. I hope we'll
> have a nice discussion :)

The ocaml-mysql code doesn't seem under GPL either :(


Maybe sources lists could benefit from being stored on disk instead of
memory, but we will only know for sure when sources management becomes
stable again :)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]