org.freedesktop.DBus.Properties.GetAll

Daniel P. Berrange dan at berrange.com
Thu Apr 12 06:01:47 PDT 2007


On Thu, Apr 12, 2007 at 02:22:02PM -0400, Havoc Pennington wrote:
> Hi,
> 
> The dbus spec defines a Properties interface with methods:
> 
>  VARIANT Get(STRING interfaceName, STRING propName)
>  void    Set(STRING interfaceName, STRING propName, VARIANT value);
> 
> I'd like to add to the spec:
> 
>  DICT<STRING,VARIANT> GetAll(STRING interfaceName)
> 
> Also somewhat missing here is change notification, but I can't think of 
> any reasonable way to do it since the efficiency tradeoffs are pretty 
> different in different situations.

Indeed - I've hit this limitation in some apps where I've used properties.

Having the service always send out signals for every property change on
every object it owns is going to be horribly inefficient. Even if there
are no signal matches registered with the daemon, you still have the
client spamming the daemon, and the daemon doing lots of work checking
match rules all the time. Really need to 'quench' the notifications as
close to their source as possible - ie the service itself, rather than
the DBus daemon as now.

A particular client app is only likely to be interested in notifications 
for a small handful of specific objects, for particular segment of time. 
Which suggests the property notifications are closer to unicast rather 
than broadcast, with each client telling the remote service that its 
interested in a particular object. Thus avoiding the need to spam the 
bus with thousands of property notifications. Arguably a client also 
doesn't want to receive notifications of changes that it itself is 
making via the 'Set' method. All very complex & seems to require that 
the service keep track of state, in particular clients coming & going 
on the bus.

Dan.
-- 
|=-            GPG key: http://www.berrange.com/~dan/gpgkey.txt       -=|
|=-       Perl modules: http://search.cpan.org/~danberr/              -=|
|=-           Projects: http://freshmeat.net/~danielpb/               -=|
|=-   berrange at redhat.com  -  Daniel Berrange  -  dan at berrange.com    -=|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/dbus/attachments/20070412/6c9f5c6e/attachment.pgp


More information about the dbus mailing list