[systemd-devel] Dbus service

Lennart Poettering lennart at poettering.net
Mon Sep 24 13:41:56 UTC 2018


On Di, 18.09.18 15:07, deepan muthusamy (deepan.m2903 at gmail.com) wrote:

> What is the difference between dbus service and bus-activatable service?

That's really a question to ask the D-Bus mailing list, not the
systemd one.

That said: a dbus service just means a service offering IPC interfaces
via dbus. A bus-activatable service is a special kind of dbus service:
it means the IPC interfaces are also offered while the service isn't
started yet, and a client talking to such an IPC interface will then
implicitly trigger starting of that service by doing so. "activatable"
is just a fancy word for saying "can be started by", i.e. "triggred
on-demand by".

By building systems with bus-activatable services you build more
robust, simpler and more efficient systems, as services don't have to
run all the time, and clients don't have to know when precisely a
service is started, but can talk to the service anyway, and rely that
the dbus system will implicitly start any service that is not running
yet, fully transparently.

Examples for such bus-activable services are "policykit" for example,
or systemd's own "hostnamed", both of which normally don't run, but
when a client wants to talk to them are implicitly started.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list