multiple services per client?

Matt Wette matt.wette at gmail.com
Tue Feb 19 01:17:26 UTC 2019


On 2/18/19 1:55 PM, Felipe Gasper wrote:
>> On Feb 18, 2019, at 4:12 PM, Lawrence D'Oliveiro <ldo at geek-central.gen.nz> wrote:
>>
>> On Mon, 18 Feb 2019 13:44:30 -0500, Felipe Gasper wrote:
>>
>>>> On Feb 18, 2019, at 1:30 PM, Lawrence D'Oliveiro
>>>> <ldo at geek-central.gen.nz> wrote:
>>>>
>>>> You mean two different services use interface name A to mean
>>>> different things?
>>> I’m not sure what you mean by “different”, but it would be something
>>> like org.freedesktop.DBus.Introspectable, which almost everything
>>> implements.
>> But they are all supposed to implement it to mean the same thing: “tell
>> me what interfaces you support on this object”.
> To flesh it out a bit more:
>
> Let’s say I’m running services A and B on the same connection. How would I introspect objects on these services? I can’t distinguish between the services based on the interface because it’s the same interface. So the two services would basically need to share the same object-path namespace, in which case they’re basically the same service.
>
> If the message recipient were to receive the same DESTINATION that the sender gave, it would be possible to have multiple services because whatever “broker” logic divvies up the messages between services A and B could simply sort by DESTINATION.
>
> <shrug>
>

I am no dbus expert, but ...

You could represent services as well known (factory) paths, and fork off 
instances of
those if needed?  For example /org/me/textservice /org/me/imageservice, 
and maybe
these both provide the org.me.Explore interface.  In the end, if I 
understand correctly,
you are sending a message to a destination and that destination is 
identified by
  (optional) bus name (aka destination), path name, interface name, and 
member.  The
member must be an element of the interface.  The degree of freedom is 
the path name.
If you have server state associated with a interaction, then use the 
well known path to
generate an instance (e.g., "new" message to textservice generates a new 
object
testservice1).


More information about the dbus mailing list