Re: [Tracker] Simplifying DBus interface
- From: Jamie McCracken <jamiemcc blueyonder co uk>
- To: Samuel Cormier-Iijima <sciyoshi gmail com>
- Cc: Tracker List <tracker-list gnome org>
- Subject: Re: [Tracker] Simplifying DBus interface
- Date: Mon, 11 Sep 2006 20:55:02 +0100
Samuel Cormier-Iijima wrote:
I don't think we need to hide how the database is structured
internally - we're talking about open source here anyways :-), and
somebody can just access the database directly. Actually, I was
talking with thiago on #dbus and he had this to say:
thiago: I mean, there's nothing wrong in developing a backend for a
service that uses D-Bus to talk to a daemon
thiago: I just wonder why people develop new libraries doing that
instead of simply developing the daemon and the API
yoshiznit123: just for simplicity, as you said vanilla dbus is pretty
difficult
thiago: right, but the XML is much simpler
yoshiznit123: xml? we have the introspection file if that's what you
mean...
thiago: yep
thiago: if your library is just a thin-wrapper around the XML, I see
no need for the library
thiago: if it does something more involved, then it makes sense.
yoshiznit123: yea, i think we have a wrapper around the header created
by dbus-binding-tool
yoshiznit123: :-)
thiago: that's my point: if we can recreate your library using a code
generator, then we don't need a library :-)
yoshiznit123: yea, i'll point that out to jamie
we have a thin wrapper in libtracker to remove DBUS'isms only.
thiago: IMO, it makes sense to have a library when D-Bus is just one
of many (possible) backends
thiago: for instance, libtracker could open the SQLite database
directly and avoid the daemon
thiago: in that case, it makes sense to have a library
Would it be better to extend libtracker to allow direct mysql queries
(bypass dbus completely)? i thought that would have a few problems,
such as database locking
cant do with embedded mysql as it exclusively locks the DB so only one
process can access it
Sqlite allows but will corrupt on NTFS with broken file locking (with a
daemon it will use mutexes to prevent this and the tracker daemon can
also use an external lock file to prevent corruption on multiple session
NTFS)
and pulling in libmysqlclient or sqlite as a
dependency on libtracker, and i'm not sure it would provide many
advantages... the reason is because dbus wouldn't be able to handle
queries sent over dbus with really big result sets...
We would need some sort of limit applied so that say no more than 4096
rows are dispatched coded into the dbus method. Select queries in both
mysql and sqlite also have limit and offset as part of their sql
language so you can say "select * from Services limit 1024" and the
query will deliver the first 1024 rows only.
--
Mr Jamie McCracken
http://jamiemcc.livejournal.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]