[rfc] Activating Common Services
hughsient at gmail.com
Tue Jun 19 09:29:20 PDT 2007
On Tue, 2007-06-19 at 11:04 -0400, Havoc Pennington wrote:
> Richard Hughes wrote:
> > So, is HAL wrong to register itself on the bus before adding all the
> > coldplug devices (other services like NM do similar things to this too),
> > or should we have some sort of "activation" interface that is always
> > present as soon as the service appears on the bus and also lets us shut
> > a service down:
> > org.freedesktop.Hal.Activation.Start
> > org.freedesktop.Hal.Activation.Stop
> Remember not to use 'activation' in APIs ;-)
> There is a StartServiceByName call already, and many can be stopped by
> just taking their bus name (use REPLACE_EXISTING flag).
Sure, I've added this to the documentation.
> In general life cycle policies are service-dependent since the best
> policy will vary.
> This is very key not to ignore ;-) in fact it's so critical that you are
> better off just not messing with refcounts. Distributed refcounting is
> both slow and unreliable.
> I would suggest alloc/free on particular objects in the service API
> rather than on the entire service, since a service API can in principle
> grow arbitrarily complex. The "one bus name, one interface, one object"
> pattern that leads people to ask why they are typing the same thing
> three times is not the only possible pattern.
Okay, the StartServiceByName solves my immediate problem.
More information about the dbus