Universal standard mapping between D-Bus and URI namespaces

Anders Feder lists.anders at feder.dk
Tue Jul 1 10:54:15 PDT 2008


Hello,

Currently, D-Bus interface and bus name namespaces are named in
accordance with the Java-like reverse-domain-name naming scheme, e.g.
org.freedesktop.dbus.myinterface.

Interfaces and bus names use separate namespaces - that is, an
interface named "org.a.b.c" has different semantics from a bus
named "org.a.b.c" (for obvious reasons: its two different things).

On the Web (e.g. in XML and RDF), however, the URI namespace is
typically used, e.g. http://mynamespace.org/subspace/. Many W3C
standards, such as RDF and SPARQL, only operate upon the URI namespace.

In order to bridge these technologies with D-Bus resources (interfaces,
buses etc.), I would like to propose a universal mapping between the
standard D-Bus namespace and the URI namespace (based on suggestions
from Simon McV and Matthew Johnson on #dbus) as follows:

(The exact mapping paths can be adjusted a bit if desired, but this is
the basic idea)

For interface names,
a.b.c... maps into http://dbus.freedesktop.org/interface/a.b.c...

For bus names,
a.b.c... maps into http://dbus.freedesktop.org/bus/a.b.c...

For methods,
method d of interface a.b.c maps
into http://dbus.freedesktop.org/method/a.b.c/d

For signals,
signal d of interface a.b.c
maps into http://dbus.freedesktop.org/signal/a.b.c/d

For properties,
property d of interface a.b.c
maps into http://dbus.freedesktop.org/property/a.b.c/d

For arguments,
argument e of method d of interface a.b.c maps
into http://dbus.freedesktop.org/method/a.b.c/d#e
argument e of signal d of interface a.b.c maps
into http://dbus.freedesktop.org/signal/a.b.c/d#e

This mapping would allow e.g. XML documents and RDF graphs to refer to
D-Bus resources such that you for instance could attach RDF semantics to
a D-Bus interface. For instance, you would be able to assert that D-Bus
interface org.a.b.c (<http://dbus.freedesktop.org/bus/org.a.b.c>) is a
RDF/S subclass of interface org.a.b 
(<http://dbus.freedesktop.org/bus/org.a.b>), or you might define a
mapping from one set of methods into another set of methods, etc. The
possibilities are as vast as the meaning of the word 'semantics'.

The mapping as proposed above would require approval from the owners of
dbus.freedesktop.org and ideally a little textual description of each
namespace available for retrieval at each (dereferenced) root URI path
(http://dbus.freedesktop.org/interface/,
http://dbus.freedesktop.org/bus/ etc.), for the mapping scheme to be
deemed canonical.

What do you think?

Regards,

-- 
Anders Feder <lists.anders at feder.dk>



More information about the dbus mailing list