thoughts on conversations

Ross Burton ross at burtonini.com
Wed Aug 10 19:13:51 EST 2005


On Tue, 2005-08-09 at 20:03 -0400, Colin Walters wrote:
> Probably the best example is Ross' post from June about needing a way to
> asynchronously communicate progress messages back to an individual
> client, without broadcasting to all client.

I should explain what I'm currently doing.  The get() method on the
factory object takes a string which is the address of the client.  This
is needed as the glib bindings don't let the server get to the original
message so can't get the source address manually.  It then stores the
address and makes calls to the address (which also exposes an object).,
althouth I'm planning on replacing this with signals sent to a specific
address shortly.

The server also listens for NameChanged signals and uses those to detect
when a client disconnects from the bus without releasing the objects.

> First, we document a standard interface named
> "org.freedesktop.DBus.Conversable", with methods "BeginConversation"
> and "EndConversation".  BeginConversation takes an a{sv} as an
> argument (representing arbitrary key/value pairs specific to the
> object), and returns a DBUS_TYPE_UINT32 which represents that
>  conversation. EndConversation takes the uint32, and tells the object
> the conversation is over.  Pretty simple.

I'm not entirely convinced by the need for arguments.  Can't Begin/End
have no in arguments and its up to the other interfaces on the object to
define any required arguments?

Basically I'm torn over if a client obtains references to multiple
objects on the server, is that a single conversation or multiple
conversations?

> On the service end we'd also need a new API like
> dbus_g_conversation_emit_signal which would send the signal just to that
> client.
> 
> On the client end, we'd have a new method like
> dbus_g_proxy_new_conversation, which would do what you'd expect; e.g.
> send EndConversation when it's g_object_unref'd.

Would the conversation object also track the name changes and close
itself when the other end disappears from the bus?

I'll have a think about how this would work in EDS for a bit and reply
again probably.

Ross
-- 
Ross Burton                                 mail: ross at burtonini.com
                                          jabber: ross at burtonini.com
                                     www: http://www.burtonini.com./
 PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF





More information about the dbus mailing list