"default" object path
Thiago Macieira
thiago at kde.org
Sat Oct 17 00:18:18 PDT 2009
Em Sábado 17. Outubro 2009, às 00.42.32, David Zeuthen escreveu:
> On Fri, 2009-10-16 at 23:57 +0200, Thiago Macieira wrote:
> > Em Sexta-feira 16. Outubro 2009, às 23.27.52, você escreveu:
> > > On Fri, 2009-10-16 at 23:18 +0200, Thiago Macieira wrote:
> > > > Make / the default object. Easy to type, even on busybox on an
> > > > embedded device.
> > >
> > > No, that's really bad advice, the object path name space is essentially
> > > system-wide. See this blog entry (and comments) for specific details on
> > > why this won't work in general:
> > >
> > > http://0pointer.de/blog/projects/versioning-dbus.html
> >
> > There are no arguments against placing many interfaces in the same object
> > in that link.
>
> Several times actually. Let me repeat it the argument then.
>
> Consider two services with names org.Foo and org.Bar both exporting the
> "manager" object at /. Suppose both services supports an hypothetical
> shared and well-known interface called org.freedesktop.Service. Suppose
> this interface has a signal ServiceIsIdle() that lets users know the
> service is now idle.
>
> Initially we have two different processes (e.g. different unique bus
> names) owning org.Foo and org.Bar. There is no problem, apps can
> reliably receive the signal ServiceIsIdle() and life is good.
>
> Suppose now that we have a single unique bus name, say :1.42, owning
> both org.Foo and org.Bar. This is perfectly valid and I bet we will see
> this happening more in the future as distros consolidate all the system
> services. Anyway, now org.Foo emits the ServiceIsIdle() signal. This is
> sent to the message bus. The bus rewrites the org.Foo name present in
> the header to :1.42.
>
> What happens now?
This is assuming that clients need to know which service it was. I don't see
why they need to. Now the manager object just needs to apply to all objects in
the same connection: i.e. a "ServiceIsIdle" signal would be emitted when both
of the services are idle now.
Besides, you can still differentiate by interface. You're assuming that the
same interface is used by the manager object in both services. If we assume
that, then I'd argue that merging the services into one common manager object
also works just fine.
If they had different interfaces, then nothing changed because you can still
tell which one is which.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14 San Francisco, California: Nov 2 - 4
http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/dbus/attachments/20091017/aee56966/attachment.pgp
More information about the dbus
mailing list