dbus basic question

Otto Solares solca@guug.org
Thu, 13 Nov 2003 16:18:09 -0600


I want to use dbus to implement messaging in my gpl desktop
project.  I don't use X in any way but i would like to support
Keith Packard's kdrive server if i am able to compile it
without input, nor fonts, just server and dri/glx extensions.

I have read dbus's specs and the (unfinished) tutorial and have no
clue where to begin, someone could point me to a simple example?
i want to integrate dbus in the main loop.

This is my server organization:

-Input using input layer from 2.6 on a separate thread.
-Sound using openal via alsa on a separate thread.
-Graphics using fbdev/dri standalone mesa on separates threads
 each different thread for different gl capable card.
-Network using separate thread for listening to remote clients.
-System bus thread.

As you can see my server is heavily threaded and my objective
is async subsystem handling, threads allow me to simplify my
code a lot and i don't note any slowdown at all, it's pretty

Currently, threads communication are handled via pointers to shared
memory and posix locking.  I think that the proper use of dbus
will allow me to simplify the subsystem's comm routines.  The question
is: does dbus will be overkill for thread communication?  I don't
want systemwide comm, just comm in the same process.

Another point is that the last threads are precisely for system
notifications and client comm, obviously that is the primary task
for dbus (i suppose), does hotplug and init rc.d scripts will talk
to dbus so projects like mine will benefit for listening to system
events? Is any project out there with this objective in mind?

One last thing: i am currently using epoll sets for listening to
network and system devices nodes, does dbus uses epoll sets for
eficient polling of file descriptors in the current implementation?

I know i ask too many questions but i am really impressed with
dbus objectives and i am pretty confident that it will help me
in my needs if i just manage to get started with it.