Introduction to D-BUS

Jeroen T. Vermeulen jtv at xs4all.nl
Tue Aug 29 09:18:34 PDT 2006


On Tue, August 29, 2006 22:32, Thiago Macieira wrote:

>>2. Is there any kind of support for failover?  Let's say you have a
>> proxy, for an object you looked up using a well-known bus name, and the
>> client providing that object dies.  Assume the client restarts (e.g.
>> using activation), grabs the same well-known bus name, and once again
>> creates that object you had a proxy to.  Is the proxy always dead at
>> this stage, or is there a way (for objects that support it, obviously)
>> to resume where things left off?
>
> This is a binding-specific question. Some bindings allow you to do that,
> others don't, and others allow you to choose the behaviour. If you want
> to document that, you'll need to verify the info for each binding.
>
> The D-Bus daemon and library couldn't care less about this issue :-)

Come to think of it, I guess this creates an unusual hazard in some
bindings: if you're doing work on a proxy using a well-known connection
name, the actual object could go away for a while and come back, and you'd
only notice by listening for the "going-away signal" on the object's
connection--but if you're at the mercy of an external event loop or thread
timings, you could easily miss that signal.

So normally with these bindings, if there are any points in your code
where you can't have an object just go away and come back unnoticed, you'd
want to create proxies on unique connection names.  For best service you
could then renew them in places where failover would be acceptable.


Jeroen




More information about the dbus mailing list