No way to advertise an interface?

Anders Feder anders.feder.83 at gmail.com
Wed Sep 29 06:03:20 UTC 2021


Sorry for the ambiguity, I meant interface in the general sense - MPRIS
defines a programming interface and one part of that interface is the bus
name prefix that MPRIS requires services to use. I will use the term "API"
instead:

I'm not saying that multiple peers can't implement the API. I'm saying
multiple peers can't implement the API with the assurance that they are not
causing a naming collision. This negates the purpose of having reverse
domain name notation namespaces in the first place.

If a person A creates an application named "Music Player" and have it take
the bus name "org.mpris.MediaPlayer2.musicplayer", there is no procedure
preventing a person B without knowledge of person A's application from
creating another application named "Music Player" also taking the bus name
"org.mpris.MediaPlayer2.musicplayer".

What better pattern, if any, could a standard such as MPRIS use to avoid
this sort of collision?

Regards,
Anders Feder

ons. 29. sep. 2021 00.23 skrev Lawrence D'Oliveiro <ldo at geek-central.gen.nz
>:

> On Tue, 28 Sep 2021 21:27:21 +0200, Anders Feder wrote:
>
> > For clients to be able to discover services that implement the
> > interface, the MPRIS specification requires each media player
> > to request a unique bus name which begins with the prefix
> > "org.mpris.MediaPlayer2".
> >
> > ...
> >
> > This to me seems like bad practice: The whole purpose of interface
> > namespaces is to prevent naming collisions.
>
> Yet you were talking above about bus names, not interface names.
> Multiple bus peers can implement the same interface, why not?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20210929/46e53c79/attachment.htm>


More information about the dbus mailing list