Monitoring lifetimes with Python bindings

Ole Laursen olau at hardworking.dk
Thu Jul 7 00:42:49 EST 2005


Hi,

(I'm resending this since the previous message seems to have been
lost.)

In the use case I'm trying to design, a per-session server will
display a bit of UI for various clients. I'm trying to figure out how
to ensure that both the server and the clients are fault-tolerant. If
the server fails, the clients should detect the error and probably try
to resend its UI info if a new server appears. If a client fails, the
server should remove the UI belonging to the client.

This requires that the server can monitor the lifetime of a connecting
client. It is not immediately obvious how to do this with D-BUS, but I
think I need to make the server notice the sender upon receiving a
request from a client and then let it subscribe to NameOwnerChanged
signals to discover if the client name has changed from ":1.blahblah"
to "" (hm, but this leads to a race condition).


Anyway, this does not appear to be possible with the Python bindings
since there is no way to get to the message and thus the sender when
receiving a remote call. @dbus.explicitly_pass_message in 0.34 only
seems to work with signals.

-- 
Ole Laursen
http://www.cs.aau.dk/~olau/


More information about the dbus mailing list