From: Christian B. <chr...@gm...> - 2006-11-26 04:20:19
|
Bill Pringlemeir wrote: > I have some symbol information. Good news, it is the 'C' library, > SQLite (now deprecated?) and GnuTls. SQLite is not deprecated albeit not necessary for gtk-gnutella. For the spam filter a normal hashtable seems the better option with less overhead. For most people it probably doesn't matter but with a slow disk or NFS, it's probably noticeable. Also there are some unresolved issues e.g., if the disk which is holding the database fills up, we have a problem. Albeit my $HOME is not on the same slice, it fills up every now and then. Handling this properly seems more effort than it's worth for what we currently use SQLite. One option would be using in-memory databases. Maybe it's possible to use a mmap()ed file for this so that it's persistent. One advantage is that we can pre-allocate the disk space in this case, so that we're not in danger to run out of it. Though I'm not sure how many megabytes would be acceptable for the common user. As you see it raises more issues than it solves momentarily. SQLite could probably be useful for other things like persistent search or browse results. If we ever add TTH support, SQLite would be handy too because we don't really want to create one file per TTH which is only a few kilobytes large. Berkeley DB is another option but it's a PITA if the version changes because it's not binary compatible. We have to keep in mind that gtk-gnutella is at large a desktop application and not a server application per se. So we can't treat users like database administrators. I thought about using a simple fixed-size record format as well (or maybe an on-disk b-tree) so that we don't have further dependencies but whilst not difficult every little thing adds up. -- Christian |