Question on service activation
kevin.krammer at gmx.at
Thu Feb 22 13:18:49 PST 2007
thanks for responding.
On Thursday 22 February 2007 14:46, Havoc Pennington wrote:
> Kevin Krammer wrote:
> > Examples from the Maemo documentation and an activation tutorial linked
> > from the D-Bus tutorial suggest that interface name == D-Bus name ==
> > object path (with slash as separator), e.g. a .service file specifying a
> > service "org.example.Foo" will result in a process available at D-Bus
> > name "org.example.Foo", with an object at "/org/example/Foo" having the
> > interface "org.example.Foo"
> When the three line up, it is just a coincidence - for example I
> recently defined a "Prefs" interface which was implemented by a couple
> different object paths under a couple different bus names.
I see, we were already quite sure about this but there were too many such
examples to not take it into consideration.
> > However, we weren't sure how service providers (i.e. processes with a
> > D-Bus connection providing interface implementations) would specify
> > multiple interfaces.
> Interfaces are implemented by objects within a process, while bus names
> are owned on the bus (by a process's connection).
Yes, that's what I tried to convey :)
> > For example consider PIM interfaces (kept short to ease typing):
> > pim.EMail, pim.Contacts, pim.Calendar.
> Do you mean interface or bus name here? (just to be sure)
> > A "just email" application like Thunderbird would probably just implement
> > pim.EMail and pim.Contacts, a full PIM suite like Evolution would
> > implement all.
> > (1) If none if the is running yet and an application would make a call to
> > pim.Contacts, will the bus wait until it has registered all its names?
> If you have multiple bus names then for a given activation, the bus will
> only care about one of them. i.e. it will only block the pim.Contacts
> call until pim.Contacts has an owner.
Yeah, thought so, but we had to make sure.
> > (2) Is there a race condition if two applications activate two different
> > services?
> Bus name ownership is only atomic for a single bus name. So yes you
> could get different apps owning the different names.
> > (3) If Evolution is the default handler as configured by the desktop, can
> > Thunderbird be prevented from claiming the default names if started
> > manually?
> Not right now. It's not clear this is right anyway (if someone has
> thunderbird open, maybe it should be used for mail - at least, it seems
> as good a guess as any)
Well, from my point of view I want to have my preferred mail application to
handle mails, which is the one I have told by desktop to consider the
> You can imagine various solutions, obviously, but in general nobody has
> yet defined the connection between the default handler choices and dbus
I see. We were basically discussion the design and even the need for a broker
to map from a service (interface) to a service provider (D-Bus name)
Since a couple of examples suggested that people are using the interface name
and D-Bus name interchangably, we'd rather ask if this was just concidentally
or meant to work this way.
It wouldn't have made sense to continue designing a service broker if that's
already handled by the existing infrastructure.
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070222/60df3df3/attachment.pgp
More information about the dbus