Re: Gnome Session Services Framework



Mark, thanks for these comments, they're definitely useful.

On Wed, 2005-07-27 at 17:16 +0100, Mark McLoughlin wrote:
> 
> 	For various reasons I'm not entirely sure it makes sense to use D-BUS
> notification:
> 
>   - We're not actually interested in using the D-BUS service acquired by
>     the app - i.e. there isn't actually much of a requirement for the 
>     session manager to send messages to the app

Well, not necessarily the session manager, but it could happen that we
want inter-service messaging, like the battery panel applet querying
gnome-power-manager.  

By using D-BUS activation we allow for these kinds of dependencies; the
battery applet would automatically wait for the session bus to activate
g-p-m when it sent a message to org.gnome.PowerManager or whatever.

>   - It actually winds up being quite complicated to do it this way. I'd 
>     be worried about this extra complexity adding extra points of 
>     failure
> 
>   - Because of the complexity, we need a library for the service side

I think if we fix the env bug we can probably avoid the library.  

>   - We use startup-notification in order to be notified when the app 
>     app has fully started up

Hm, so every service links to startup-notification?  That means they all
have to have an X connection, which is a bit weird for some of them.
Also this would make s-n part of the developer platform, right?  Maybe
not a big deal, but something to consider. 

>   - In the normal case, if we want to stop a service (e.g. at logout), 
>     then we just kill it
> 
>   - If an app really needs to be notified that its about to be killed, 
>     it could have a %p argument on its command-line which would cause
>     the session manager to pass it the read side of a pipe which the
>     app should poll() on. When the session manager closes its side, the
>     app should shut down gracefully.

Hm...possible but kind of ugly...It seems a bit nicer to tell service
developers to just implement an org.gnome.SessionService.OnShutdown
method or something.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]