.NET News Desk
Peer Networking Series - A Closer Look at PNRP vs. Bonjour/ZeroConf
From Kevin Hoffman's .NET Addicts Blog
May. 11, 2008 09:15 AM
Digg This!
Kevin
Hoffman’s Blog
It seems as though whenever I bring up PNRP and its
benefits, I am immediately inundated with a list of questions or comments
indicating that Microsoft is re-inventing the wheel and that PNRP has already
been implemented before in the form of ZeroConf and, more specifically, Apple's
implementation of it called Bonjour (formerly known as Rendezvous).
Here's the thing - the two services fix two different
problems. The issue arises in that their solution has a small area of overlap
and that's what confuses people. Because it is possible to use PNRP's basic
implementation in the same way that most people use Bonjour, most people
(erroneously so) assume that PNRP is nothing more than a proprietary vendor
lock-in version of Bonjour.
First, let's take a look at Bonjour. Bonjour is an
implementation of dynamic DNS. In previous posts in this series, I discussed
the need for dynamic DNS. Traditional DNS is too slow, too bulky, and isn't
really designed for the publication of dynamic services that could go offline
at a moment's notice. Services like that might be a printer on your local
network, an iTunes shared playlist, or a Windows Media
Center device, including
services offered on your local network by your Xbox 360. Peer applications
traditionally use Bonjour because they need a fast, lightweight way to browse
for and publish service advertisements on a local network.
At this point, you're probably thinking, "But wait..
Bonjour that shipped with Leopard can have global scope." And you are
quite correct, but remember that Bonjour is still a dynamic DNS protocol. As
such, it needs a server for global scope. While you can operate serverless when
doing local network multicast, Bonjour still requires you to know about a
particular server somewhere "out there" on the intertubes that will
host your service publication. Additionally, clients that you want to be able
to browse for that record must also know the location of that server. This is
perfectly fine if you're a large company and you can easily dedicate a machine
in your domain as your Bonjour box, allowing your game or LOB app to find other
users globally. But what do you do if you really want a truly serverless peer
service publication and location service?
This is where the paths of PNRP and Bonjour diverge. PNRP
is, by my definition, a truly peer-to-peer protocol. There is no central state
server, no central registration server. If you publish a peer name registration
globally through PNRP, you do not need to have a single central server on which
to place that record.
The other issue is this: what do you do if you want to make
sure that you are the sole owner of that peer name? If you want to make sure
that your application is the only application in the world that has the ability
to publish service locations for a particular peer name... what do you do?
Bonjour doesn't have this built into it. PNRP allows you to digitally sign peer
names with your own private key. Anywhere else in the world, any application
that attempts to manipulate published name registrations for a secured and
signed name - will fail. The only application that can manipulate a signed peer
name registration is an application that knows your private key. This is
tremendously powerful for peer applications that you want to have a large,
global reach but you don't want to deploy all kinds of server infrastructure
for maintaining your own registrations like many other applications do.
So it basically comes down to this: Sure, you can use PNRP
to do the same thing that Bonjour does, but you can also use PNRP to do quite a
few things that Bonjour isn't designed to do. This doesn't mean that Bonjour is
bad, because it's actually a kickass piece of technology (you'll know how much
I love it if you've seen some of my Cocoa
posts in the past). However, if you want to do secured peer name registrations,
or serverless global peer name registrations, then PNRP is your tool.
I will be posting more and more about peer networks, peer
networking, and eventually heading toward a post about Live Mesh and
ecosystems/social networks, so stay tuned!
tags: zeroconf
bonjour
pnrp
peer
peerseries
peernetworking
links: digg this del.icio.us technorati
reddit
About Kevin HoffmanKevin Hoffman, editor-in-chief of SYS-CON's "iPhone Developer's Journal" is one of the most popular "iPhone" and "Silverlight" bloggers on the Net. Kevin has been programming since he was 10 and has written everything from DOS shareware to n-tier, enterprise Web applications in VB, C++, Delphi, and C. He is coauthor of Professional .NET Framework (Wrox Press) and co-author with Robert Foster of Microsoft SharePoint 2007 Development Unleashed. Kevin authors "The .NET Addict's Blog" at ".Net Developer's Journal" (dotnetaddict.dotnetdevelopersjournal.com).