Re: Platform



On Mon, 18.05.09 22:39, Stefan Kost (ensonic hora-obscura de) wrote:

> > Avahi -- Service discovery.  This is used in quite a few
> > places.  I know some people in the past had talked about
> > having a simple wrapper in GLib.  How much do we push it?

Avahi has been shipping with a GObject API contributed by Sjoerd since
quite some time. It's established and maintained. This should
definitely be pushed.

> Now that apple has closed the whole bonjour stack, I would prefer to build on
> upnp. We have gupnp, which is actively developed and fitting nicely here.

As mentioned by other folks this is nonsense.

mDNS/DNS-SD is certainly as open as UPNP. In fact you could even argue that
it is more "open" since it was submitted to become an IETF RFC which didn't
happen for UPnP -- and is very unlikely to ever happen.

The initial Apple implementation of mDNS/DNS, which was Rendezvous
(later renamed to Bonjour) was licensed under APSL -- which is not a
Free Software license. The main reason I wrote Avahi was the broken
license of Bonjour. Avahi is fully LGPL and due to that became *the*
mDNS/DNS-SD stack on free systems. Eventually Apple acknowelegded that
they fucked up there and relicensed Bonjour to the Apache
License. Which is certainly a much better choice and makes it Free
Software, but isn't 100% satisfactory either since it is GPL2
incompatible. (though this doesn't matter much in reality).

These days Avahi does many things better than Bonjour but there are a
handful of things Bonjour does Avahi can't. However, the Apple guys
publicly acknowledge that Avahi is the better stack ;-)

So, in summary: mDNS/DNS-SD *is* absolutely open. It has very high
quality documentation/specification. And it has two complete 100% Free
Software implementations. What else do you need to declare something
"Open"?

Now, there are a two sour points:

1) If you want to use the "Bonjour" trademark you need to sign a
contract with Apple. Luckily, this doesn't matter at all to us, since
we can call the technology mDNS/DNS-SD and our implementation of that
"Avahi". We don't even use any of the code from the original Bonjour
project. (UPnP has a similar trademark mess with "DLNA" AFAIU)

2) What Apple really fucked up are two of the protocols that they use
on top of mDNS/DNS-SD, more specifically DMAP (better known as
DAAP/DPAP) and RAOP. The former is a protocol for sharing music repos
across local networks. The latter is a protocol for sending audio to
remote speakers (i.e. Apple Airport base stations that have audio
connectors.) Apple uses cryptography to dongle DMAP and RAOP clients
and servers together. Probably to please record companies. It's some
crypto that hasn't been fully broken yet. One side of the key pairs of
both RAOP and DMAP have been recovered, the other one hasn't. Which
means you can implement a RAOP client and a DMAP server right
now. However implementing a RAOP server or a DMAP client that iTunes
would accept as valid is not possible. Which sucks big time.

Now, on top of UPnP we have UPnP A/V which does very similar things as
DMAP and RAOP. A UPnP A/V MediaRenderer plays about the same role as
an RAOP server. And a UPnP A/V MediaServer plays about the same role
as DMAP server. UPnP A/V is open and documented, no dongling takes
place. Which is the reason why RAOP and DMAP are not nearly as popular
on Linux as they used to be. OTOH UPnP A/V is now widely implemented
and there's even a lot of explicit hardware for it. Apple came first
with both DMAP and RAOP. And they were in a great position. But they
fucked it up due to their stupid dongling, and everyone went for the
open alternative.

But again, mDNS/DNS-SD is open. It's just DMAP/RAOP that is not. But
these two pairs of technologies are not directly related and should be
seen independantly. Especiually since Avahi does not implement
DMAP/RAOP and nobody has suggested inclusion of a DMAP/RAOP library
into the platform. There are many other protocols that can be used on
top of Avahi that make Avahi very very useful.

On a purely technical level I think that mDNS/DNS-SD as well as
DMA/RAOP are much better designed than UPnP/UPnP A/V. i.e. mDNS is
very careful about caching to minimize traffic on the network. In fact
the largest part of the spec is about the elaborate caching
scheme. UPnP otoh is very chatty. RAOP also has all kinds of nice
features like jack sensing, dB volume scaling and so on. UPnP A/V is
much more limited there -- but it does have other benefits. ... but
hey I don't think it makes much sense to compare both technologies in
that much detail here, and of course I am biased since I wrote
Avahi. And I don't want to piss off Zeeshan...  ;-)

But let me say this: right now if you want to stay compatible with
specific third party software or hardware the choice between UPNP and
mDNS/DNS-SD is not up to you. Which is why both technologies have
their validity even if they share a bit functionality. -- If you start
a new project/protocol however I'd probably recommend going for
mDNS/DNSD, except for a few cases, but again I am biased and Zeeshan
might disagree.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]