Daemon or no daemon

Avery Pennarun apenwarr at nit.ca
Mon Apr 18 18:03:27 EEST 2005


On Mon, Apr 18, 2005 at 04:52:02PM +0200, Magnus Bergman wrote:

> The solution is to have the same API for communication with the daemon
> as for communication with the back-ends directly. This is simply done by
> using the same library. What the library does is to decide which
> back-ends to use and when. This functionality is used by both
> application and the daemon, so they link to the same library and use the
> same API. But only the daemon uses the library to call the back-ends
> which needs the daemon.

UniConf does this already.  GConf very nearly does, except for a few
arbitrary and unnecessary differences between the front and backend APIs. 
(This could be fixed easily if anyone cared.)

But the main reason *not* to do this is that a common system across desktops
- D-VFS or DConf or whatever - will have an entirely different frontend
library.  KDE people like C++, Gnome people like C.  The nice thing about
using a daemon with DBUS is that it's very easy to write and rewrite your
frontend API for whatever your favourite language might be.  Problems like
common event loops and threads just disappear.

I disagree completely with Sean's assertion that it's not possible to do
some of the things D-VFS wants to do - other than cross-process caching -
without a daemon.  On the other hand, a daemon is just the sensible way of
doing it for several other reasons, so at least his conclusion is right.

Have fun,

Avery



More information about the xdg mailing list