Comment 10 for bug 488967

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Cool that you did this test Markus! I am a bit troubled by the results though...

I fear that signals are by definition always broadcasted. We may be able to work around this by setting a match rule on each signal connection on the client side, but I am not sure... Something like adding a named param. destination=bus.get_unique_name() to the line where we call object.connect_to_signal() in client.py. However it does not appear to be possible according to http://dbus.freedesktop.org/doc/dbus-python/api/dbus.proxies.ProxyObject-class.html#connect_to_signal.

The alternative is to do our own simple monitoring system... Maybe adding two methods to the Log interface:

InstallMonitor(in o client_monitor_path, in E event_template)
RemoveMonitor(in o client_monitor_path)

And then defining a new interface org.gnome.zeitgeist.Monitor with a single method

Notify(in aE new_events)

The way we'd do this in the engine is to remember the unique bus name of the caller in InstallMonitor() and then ping back on that address and object path client_monitor_path, on the interface org.gnome.zeitgeist.Monitor. We'd automagically drop monitors when clients disconnect by listening for NameOwnerChanged.

Somehow I am nore inclined to the Monitor-solution... At least we can be sure that it will always work disregarding if the client remembers to set up the right match rules...