Documenting service activation

Jeroen T. Vermeulen jtv at xs4all.nl
Mon Aug 28 00:09:17 PDT 2006


Hello once more,

In writing the Introduction to D-BUS, I'm now at the point where I'd like
to document service activation.  I've read the spec on this (which seems a
bit incomplete so far) and Raphaël Slinckx' Activation Tutorial.

Before I go into detail, however, I'd like to get some of the basics
clear.    I hope someone (and let's not always see the same hands go up :)
can answer these questions:

 * Am I right in understanding that services get activated automatically
when invoked, i.e. without any explicit request to start them?  Raphaël's
document seems to say this, but the specification seems to assume an
explicit request along the lines of "start this service if it isn't
already running."  Or is it the one at the API level and the other at the
messaging level?

 * Am I also right in understanding that services get activated only when
methods on them are invoked--i.e. not yet when proxies on their objects
are first created?  Does the spec mandate this deferred activation?  If
not, does the spec forbid it?

 * So does this then mean that you can create a proxy on an object in an
activated service, and start listening for one of its signals, without
causing that service to be activated in the process?

Next, some more detailed questions about service files:

 * Must the header always say "[D-BUS Service]", or is that just a
placeholder in the examples?  Is (or was) the idea perhaps that service
descriptions can be embedded in desktop files?  If so, how does that
header gel with the required ".service" filename suffix?

 * Does the "Names=" entry list (well-known) connection names, nothing
more, nothing less?

 * Can service files be written dynamically, i.e. while the bus is already
running?

 * Is there any other way to register a service with the bus?

 * Can any registered service always be started for any bus where it is
requested?


Jeroen




More information about the dbus mailing list