D-Bus and Bonjour service discovery

Jamie McCracken jamiemcc at blueyonder.co.uk
Wed Nov 22 16:30:28 PST 2006

Havoc Pennington wrote:
> Jamie McCracken wrote:
>> It would make life a lot easier for me if a bus of some sort could be 
>> used externally. At some point I would like to do network searching 
>> using tracker (which currently only uses the session bus) but it would 
>> be quite mucky having to reimplement our dbus interfaces using a 
>> DBusServer in P2P mode just to make it network transparent.
>> Im sure there's a whole load of groupware style desktop apps that 
>> would benefit from being able to use a simpler bus for machine to 
>> machine comms too without worrying about port addresses or having to 
>> use lower level code.
>> Rather than use the system bus, would it not be better to have an 
>> additional "external bus", which can be run as non-root?
> I suppose a per-machine "external bus" could listen on TCP, and apps 
> could connect to it to offer services to or from that machine. I would 
> agree though that it should be separate from the system bus.
> It's easy to experiment with, it should not involve any dbus code 
> changes. Just create an external.conf config file and init scripts to 
> start the thing, then start figuring out how your app would use it and 
> how an app on another machine would discover it.
> My guess is that e.g. you would use a service discovery protocol like 
> bonjour to list machines on the network that export an external dbus 
> daemon, then you can connect to the daemon on any given machine.

there would have to be a additonal API for something like 
dbus_bus_get_network with additonal params for ip address and possibly 
port number (if the external/network bus's port was not set in stone) of 
the remote machine we want to connect to.

In a future tracker config gui, we would use Avahi to list all tracker 
services available and use them to populate the dbus_bus_get_network call.

Mr Jamie McCracken

More information about the dbus mailing list