Providing several well-known names vs. activation
sascha-ml-reply-to-2011-2 at silbe.org
Mon May 16 01:52:13 PDT 2011
I am writing a D-Bus service that is going to operate under two
different bus names: A "native" one (using a domain name under my
control) and a "compatibility" one (using a "foreign" domain name).
The same kind of service is offered under both bus names, with the
"native" API providing some additional functionality. It uses an
exclusively-locked database (Xapian index), so running two separate
processes (one per bus name) is not an option.
My problem is how to teach the D-Bus daemon that both bus names are
provided by the same process, in order to prevent race conditions on
start-up (if both bus names are contacted and thus auto-activated in
quick succession). D-Bus has an internal queue of services that are in
the process of getting activated (exactly to prevent race conditions),
but my reading of the source suggests it only works for a single bus
name per activation.
So my questions are:
1. Is my analysis of the code correct, i.e. does D-Bus currently have
no way of preventing race conditions during activation of processes
providing multiple bus names?
2. Is support for multiple bus names per pending activation planned?
(The code looked too complex for me to come up with a patch myself,
3. Is there a better way of addressing my use case (providing both
native and compatibility services) that works with the current
version of D-Bus?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 494 bytes
Desc: not available
More information about the dbus