Discovering services

Aristid Breitkreuz aribrei at arcor.de
Fri Jul 7 18:13:37 PDT 2006


Am Samstag, den 08.07.2006, 00:32 +0200 schrieb Tako Schotanus:
> Aristid Breitkreuz wrote:
> >> But, activating everything possible seems pretty scary to begin with - 
> >> you might be launching apps left and right in essence. Could be 
> >> slooooooow and have bizarre user-visible effects such as windows opening.
> >>     
> >
> > When a service is activated by D-BUS, there should be no side effects
> > like windows opening EVER. Windows might be opened after say a call of a
> > method or when a service-providing program is started by the user but
> > not, no, never, if a service is activated by D-BUS.
> >
> > If activating a service is slow... well do it asynchronously. There is
> > more than one service to Introspect usually and there is no good
> > alternative to starting the service IMO. At least once, caching is of
> > course an option.
> >   
> But you don't want that either! Imagine that in a future we'll have 
> dozens and dozens of DBus services, heck KDE4 will make use of DBus so I 
> imagine there will be quite a few, and a tool just wants to show you a 
> list of available services and start activating ALL of them!

Well... what if (almost) all services are light-weight? :-) And
activating all services is still no routine task.

> 
> Some services might be light-weight, but others might need to do a lot 
> of work before they are even usable. The service might start browsing 
> the network in search for printers/resources/services or it might start 
> accessing slow drives or it might activate your webcam, etc. And there 
> might still be other user-visible side-effects besides windows opening, 
> dunno, because of the service that activated the webcam your file 
> manager decides to put an icon for it on the desktop, for example.

Then the icon should be there anyways. And a service should not do any
serious work when activated but when needed. Clearly a service must be
activated to call Introspect methods. Why not add explicit methods for
those expensive jobs? Or at least do them as soon as really needed and
no earlier. If this is not an option... well, then the service should be
activated all the time anyways?!

> 
> I don't know but automatically activating services seems like a bad 
> idea, in the same way that it would be a bad idea to activate all init.d 
> services just to get at some meta info.

One could say that "init.d services" are activated ALL TIME and you can
fire "method invocations" like start, stop and status whenever you want.

> 
> -Tako

Aristid



More information about the dbus mailing list