One of the most obvious, distinguishing features of the Mac platform is the fact that things seem to “just work.” Apple has always worked to avoid making users fumble with jumper blocks or to wade through pages of configurations just to get started with a computer.
 
One of the key automagical technologies Apple uses to make things simple is Bonjour. Apple is now working to extend upon its features in interesting directions. Here's how it works now, where it came from, where Apple plans to take it, along with some ideas for the future.
 
Say Hello to Bonjour.
Bonjour is Apple's name for its automatic network configuration and discovery services. It was formerly called Rendezvous, until Apple was sued over the name by TIBCO. Bonjour helps devices on a network find each other without requiring any advanced configuration.
 
Essentially, Bonjour allows devices plugged into the network to set themselves up and then advertise themselves so that other devices can find them without using a directory. Without Bonjour, setting up a shared printer or file server on an IP network requires a lot of preparatory work and additional infrastructure:
 
  1. Devices all need either static IP settings, or a configured DHCP server to assign them unique IP addresses.
  2. The network has to have a configured DNS server, with entries linking each device's name to its IP address.
  3. To find devices, there has to be a configured directory server or some type of discovery protocol in place.
 
In an office network, administrators configure directory services, DHCP and DNS to manage of all these networked devices. That's a lot of work and dedicated hardware in set up in a home environment, or any other setting where devices may come and go.
 
With Bonjour, devices and services configure and register themselves automatically. The result is that a shared network printer automatically appears in every user's printer list moments after it is plugged in. Bonjour-savvy applications, such as iTunes and iPhoto, can advertise shared libraries automatically, allowing any network user to access a list of the available shared playlists and albums.
 
Services like Mac OS X's file sharing and web hosting automatically advertise themselves so they can automatically appear in as Bonjour services within the Finder's Network browser or within Safari's dynamic Bonjour listing of discovered web sites.
 
The Macintosh Office.
Bonjour is actually the modern, Internet Protocol version of technologies originally delivered in AppleTalk. The technologies behind Bonjour actually date back to the days of the original Macintosh.
 
Shortly after it debuted, Apple founder Steve Jobs worked to push the Mac into the business market as part of an automatically configured, powerful, networked workstation system to be sold as the Macintosh Office.
 
The computing power of the original Mac was to get a huge boost, and it would incorporate technologies from the world of Unix workstations, including ubiquitous networking, high resolution displays, and sophisticated operating system features.
 
The new SuperMac would be paired with a new laser printer capable of creating high resolution documents and a new file server, all using Apple’s new, auto-configuring networking protocol.
 
However, instead of racing to develop the future, Apple's board of directors and its CEO John Sculley worked to rein in on Jobs' plans and instead focus on products that were already selling well. Sculley had just held up the company's last generation of computers and declared "Apple II Forever!"
 
Jobs eventually left in frustration to pursue his plans outside of the company; his replacement at Apple, Jean Louis-Gassée, scoffed at Jobs plans, calling it the Macintosh Orifice. Apple eventually released the laser printer to great success, but never made serious efforts to position the Mac in business.
 
Instead of targeting the Unix workstation market, Gassée and Sculley tried to make the Mac more like a high-end DOS PC. Apple coasted along on the remains of its goodwill for another decade, slowly falling from its apex of popularity to become a minor player in the PC world.
 
Jobs independently delivered his Macintosh Office idea at NeXT: an integrated, workstation class machine that pushed the state of the art in computing technology.
 
 
Sculley's Apple Sauce.
Apple conservatively rolled out a series of premium priced Mac models that did little to expand the existing Mac market. Gassée thwarted any and all plans to partner with other workstation makers to put the Mac interface on their systems, from Apollo and AT&T, and rebuffed advice from Bill Gates to monetize the Mac through software licensing.  
 
The only remains of the Macintosh Office to be successfully salvaged were the laser printer, which helped to establish the Mac as a creative platform, and AppleTalk networking technologies.
 
After years of minimal, unfocused development, Apple tried delivering a file server and a distributed messaging system called PowerTalk, which expanded the automatic networking and discovery technologies of AppleTalk to include collaborative messaging services. In typical Gassée fashion, it was overpriced and painfully over-engineered, with little thought given to interoperability.
 
 
End of an Apple Era.
It was all too little, too late. The Mac had been established as a creative niche machine in a world dominated by DOS PCs. Network administrators did not take Apple's pioneering networking technologies seriously and dismissed AppleTalk as being “chatty.” Instead, most businesses set up Novell NDS directory services or used Microsoft's less sophisticated but equally chatty LANManager products.  
 
By 1996, Apple was ready to abandon PowerTalk and had run aground in its attempts to extend the Mac platform from its appliance beginnings.
 
It paid a huge premium to buy up the technology developed by NeXT, effectively setting the clock back ten years to revisit the decision to scrap the Macintosh Office.
 
However, it wasn't 1986 anymore, and Microsoft has expanded to a powerful new role in a monopoly position over the PC business. The new Apple under Jobs took it as a monumental challenge.
 
 
An Open Rendezvous.
Apple's acquisition of NeXT perfectly paired needy customers with a good product. Even so, it took over a half decade for the company to sort out and refine a combined product that capitalized on the strengths of each company's assets.
 
In many ways, Apple and NeXT had separately learned a lot of the same lessons in different ways and in different circumstances over the previous ten years. That provided a lot of retrospective wisdom for the newly merged company to draw upon in plotting its future.
 
One strength pioneered by NeXT was a reliance upon open, interoperable standards. NeXT pioneered the use of open BSD code before Linux had even got started as an open source project. NeXT had also worked to open its application frameworks with the OpenStep specification, a move that was embraced but then quickly abandoned by industry partners.
 
NeXT's openness trumped Apple's legendary dependance upon closed, proprietary solutions. When Stuart Cheshire presented the idea that Apple could adapt protocols from the venerable AppleTalk and expose them in a useful way over standard IP networks, Apple hired him to do just that.
 
 
The benefits of AppleTalk's discovery services were dissected and applied to industry standard IP networks, using open mechanisms to extend the capacity of DNS. Apple involved other companies as partners in drafting a new, open standard for "zero configuration" networking.
 
Apple also completed its own software implementation of the standard, and released it as open source code, enabling anyone to reuse, not just its technology, but even its implementation. In Mac OS X, the technology was advertised under the marketing name Rendezvous and then Bonjour, although at one point it appeared Apple would rename it “OpenTalk.”
 
 
It Does Windows.
In addition to outlining the technology and sharing its implementation openly, Apple also delivered Bonjour software for Windows. This was largely done to broaden the appeal of adding Bonjour networking to devices, and in particular printers. Once installed, Bonjour for Windows allows PC users to discover printers and other services advertised using Bonjour.
 
Beyond printing, the other obvious application for Bonjour is file sharing. iTunes already allows users to advertise their shared playlists and discover other playlists on their network. So why doesn't the Finder offer a similar way to discover shared files?
 
It does, just not in the most elegant and useful way. In the sidebar of Finder windows is a Network icon, which offers a list of discovered file servers on the network. This list includes a mix of devices discovered by AppleTalk, Bonjour, and any directory services installed. Wouldn't it make more sense to have shared file servers just pop up when they are available, the way shared playlists appear within iTunes?  
 
 
AirPort Extreme Disk Sharing.
Apple's revised AirPort Extreme with wireless-n debuts a new disk sharing feature that does just that. The base station allows users to plug in a USB drive, which it then shares as a file server. What's new about its disk sharing feature is the ability for clients to automatically discover the availability of new shared disks on the network, via Bonjour.
 
It even offers the option of automatically mounting the disk whenever it’s available, on both Macs and PCs. A new menu bar icon can show a list of the disks available in Mac OS X.
 
It would be nice to see a sliver of the innovation being pumped into iTunes delivered in a revised new Finder, making this feature a standard part of the desktop for all Bonjour-advertised file shares, but its great to see at least some progress in that direction. It appears Leopard will unleash Bonjour in a larger role.
 
 
 
Going Global.
Bonjour has only ever been presented as a way to discover services within the local network. That's why a shared printer or shared playlist in iTunes isn't available across the Internet. Bonjour's magical sharing kingdom stops at the router.
 
Or at least it does by default. Apple silently introduced “wide area Bonjour” support for both Macs in Mac OS X Tiger, and PCs using the free Bonjour for Windows. The only catch is that there's no obvious way to configure it using the graphical interface.
 
AirPort Extreme introduces the first public interface of wide area Bonjour, but doesn't supply enough information to let users know what its about or how to actually use it. The interface only hints at using Bonjour to share outside access to the base station configuration, shared printers and disks, with checkboxes that offer to “advertise globally using Bonjour.”
 
When configured to point to an external, public Dynamic DNS, wide area Bonjour allows users to advertise their Bonjour shared services and access them from the outside Internet. In a typical home network environment, everything sits in a private network created by the router, using IP addresses that are not accessible from outside. This is a problem for a number of reasons.
 
Lost in the Network Address Translation.
Because the world has a limited number of IP addresses, routers commonly use private addresses to create dummy network numbers that allow for unique addressing within the scope of the local network, but are not globally unique. That means a local computer can address a local printer, but no other devices on the outside internet can.
 
NAT helps to conserve allocations of unique IP addresses by reusing the same ones over and over. Any IP addresses in one of the following ranges are private:
 
  1. 10.x.x.x
  2. 172.16.x.x
  3. 192.168.x.x
 
If you look up your own IP address, it may likely be in one of those series. If it is, your system is behind a router performing NAT. The router itself uses one or more globally unique IP addresses, and then makes up a series of local IP address numbers to assign to all the devices within its own local network. It then talks to the public Internet using its unique IP address, and translates incoming traffic to the local devices.
 
When a PC with local IP address accesses the Internet, the router performs NAT to keep track of which local computer made the request, so that when the response arrives, it knows to forward it back to the correct PC.
 
It's a little like a boarding house with one postal address, but full of people who might want to get or receive mail. Nobody in the outside world can directly address mail to those individuals, because they don't have individual public addresses. However, mail can be relayed back and forth with a mailroom system that manages internal distribution of mail.
 
NAT can present a problem when multiple systems on a local network need to be addressed from outside. This is particularly a problem with sophisticated connections such as remote display or video conferencing.
 
NAT can use port forwarding to relay specific channels of communications to defined clients, but what about circumstances where an outside user wants to address multiple hosts inside, in order to use remote desktop to connect to more than one inside user?
 
Say Bonjour to My Little Friend: IPv6
NAT and port forwarding are an ugly hack to forestall the need to move to IPv6, the next generation of IP networking. IPv6 supplies enough unique addresses so that every device can have its own, and so removes the need for solutions like NAT and port forwarding.
 
However, the security problems unique to PCs running Microsoft Windows force those users to continue to rely upon the artificial barrier imposed by NAT as a layer of “security by obscurity.” Because PCs can't be connected directly to the open internet without risking an immediate, crippling infection by viruses and malware, there is little chance that IPv6 will immediately replace the existing status quo, which in part serves to protect the fragility of Windows insecurity.
 
In order to make the switch to the next generation Internet, computers and routers will all need to be upgraded to speak IPv6; since the existing networks are not going to go away anytime soon, IPv6 systems also need to be able to tunnel IPv6 traffic over the existing IPv4 Internet.
 
Apple supported IPv6 and turned it on by default in Mac OS X back in 2003 with the release of Panther. Microsoft has recently responded by matching that in the new Windows Vista. As Vista is deployed with new PC shipments, the tide toward an IPv6 Internet will slowly come whether Microsoft's customers want it or not.
 
Apple has also delivered the new AirPort Extreme base station as a full IPv6 gateway by default, with the ability to tunnel IPv6 traffic over standard IPv4 networks. Until IPv6 become more widespread however, there is a still need for addressing discoverable devices hidden behind NAT.
 
 
Wide Area Bonjour: DNS-SD
Wide area Bonjour extends upon the existing DNS infrastructure to allow automatic advertising and discovery of services that would otherwise be hidden from the open Internet.
 
Just as Bonjour devices automatically pop up on the local network, users can register with a given Internet domain name--something like danieleran.mac.com--and receive dynamic updates on the wide area Bonjour services available.
 
 
By logging into a Bonjour-enabled DNS server, they can also publish records for the services they want to publicly share. What's to share?
 
Printer Listings: Just as local Bonjour allows users to plug in printers that automatically configure and the populate within the local users' printer options, wide area Bonjour allows a user to type in the network's DNS name and gain access to all the shared printers available.
 
Dynamic Bookmarks: if you host a webserver or a list of bookmarks, anyone subscribing to your domain's wide area Bonjour will get an updated listing of sites available within their Safari or Internet Explorer browser.
 
Shared Files: share albums from within iPhoto, or documents within SubEthaEdit. Turn on file servers, either within Mac OS X or using the new AirPort Extreme disk sharing, and those shares can be advertised globally via DNS just as they are already advertised locally.
 
Other devices: AirPort Extreme can advertise itself globally using Bonjour so that an administrator subscribed to the domain can access and discover all of the devices within a University, for example.
 
iPhone Discovery.
Where else will Apple use Bonjour? It would be hard to imagine that Apple would forget to add support in the iPhone. Imagine being able to discover and configure devices on a local WiFi network, and instantly gain access to log in and control them. Bonjour TV controls? Your iPhone is now the ultimate remote control for everything.
 
Apple quickly convinced all major printer manufacturers to include support for Bonjour, and similarly convinced automotive, aircraft, and stereo makers to support iPod dock inputs. Imagine if Apple asked component stereo makers to support Bonjour remote control protocols, so any device could connect to, authenticate, and command their devices. And why stop at the stereo?
 
You could be watching TV, stop the dishwasher, add another minute to the microwave, turn up the surround sound on your stereo, and dim the lights, all using the same device, say your iPhone.
 
What about other things to discover? Imagine walking into an office, connecting to their public WiFi network, and getting an instantly populated listing of building information, perhaps historical information on the building, a company directory, a map of emergency exits, and the location of the nearest restaurants with bookmarks of their web-based menus.
 
Imagine automatically discovering kiosk information in an airport, or a service schedule and a system map that is broadcast from a transit stop.
 
Imagine discovering other iPhones in proximity, and be given the opportunity to exchange an electronic business card, public encryption keys for secure messaging, or even just exchange an entertaining YouTube download.
 
Rather than giving somebody your “MySpace name” to look up later, you'd carry your information site with you, and could allow public or invitation-only access to your profile, photos, and friend links.
 
Collaboratively work on a document with another user on networked iPhones before mailing it to your boss. Meet potential clients for lunch and deliver your portfolio right there electronically without getting spaghetti sauce on it.
 
Leopard and .Mac.
A Bonjour powered iPhone would also demand matching upgrades to Leopard and .Mac. Imagine a Finder that makes discovering and sharing documents, applications, and media as easy as iTunes does. Don't just advertise your iChat name, but attach links to your user profile and portfolio website to it as well.
 
Apple could set up .Mac users with their own wide area Bonjour domain, so they can log in and list the devices they want to share publicly.
 
Then simply register Bonjour on any Internet enabled machine to enable printing to a local home printer, remotely accessing shared albums from an iPhoto library, and connecting to an AirPort shared disk. Grant full or limited access to others the same way.
 
 
Something Old, Something New.
The technology designed to link together the aborted Macintosh Office is poised to deliver a wide range of new applications a full twenty years later.
 
After subtly hinting around in the AirPort Extreme, expect to hear more about Bonjour on the iPhone, .Mac, and in Leopard. What would you do with Bonjour?
 
 
Like reading RoughlyDrafted? Share articles with your friends, link from your blog, and subscribe to my podcast!
 
Did I miss any details?
 
 
Next Articles:
 
This Series
 
What do you think? I really like to hear from readers. Leave a comment or email me with your ideas.
 
 
Haloscan Q107

Bookmark on Del.icio.us | Discuss on Reddit | Critically review on NewsTrust

Forward to Friends | Get RSS Feed | Download RSS Widget

Check out the Daily Show Multi-Pass on iTunes.com

 
A Global Upgrade for Bonjour: AirPort, iPhone, Leopard, .Mac
Saturday, May 19, 2007
Ad

Apple iTunes

Apple iTunes

Apple iTunes

Apple iTunes