PropertiesChanged signal

David Zeuthen zeuthen at gmail.com
Fri May 7 11:03:53 PDT 2010


Hey Lennart,

On Fri, May 7, 2010 at 1:46 PM, Lennart Poettering <mzqohf at 0pointer.de> wrote:
> On Fri, 07.05.10 13:06, David Zeuthen (zeuthen at gmail.com) wrote:
>
>> Now for a subjective view: If you examine the D-Bus services on a
>> typical Linux desktop, you will find that a lot of them don't use
>> properties when "they should". Which is too bad, because it makes
>> things harder to debug, for example, you have to call GetXYZ() instead
>> of just using d-feet or gdbus(1) (see [0] below again) to quickly
>> inspect the property XYZ. I think the existence of the
>> PropertiesChanged() signal, plus the availability of bindings
>> supporting it (such as GDBus), will make it a lot more appealing for
>> D-Bus service authors to use D-Bus properties when "they should".
>
> Hmm, could we extend the spec a little and say that a PropertiesChanged
> signal with an empty dict means "some property changed"? I know quite a
> few projects which have something like this (and for a reason, since the
> property data is big and more often not read than it is read), including
> some of my own. This minor extension to your suggestion would allow me
> to follow your spec without a headache of sending more data over the bus
> than necessary.

First, I would strongly suggest that you only do this after carefully
measuring whether performance really is an issue. Because... the world
is just a better place if it's very easy to create a proxy that
properly tracks a remote object without having to add specific code to
handle properties.

Second, your concerns are of course valid. Attached is revised spec
patch that allows this. Please review. Thanks!

     David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-an-optional-PropertiesChanged-signal.patch
Type: application/octet-stream
Size: 2226 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20100507/44f799ba/attachment.obj>


More information about the dbus mailing list