---
title: WWDC2004 Session 504
framework: wwdc
role: article
path: wwdc/wwdc2004-504
---

# WWDC2004 Session 504

## Transcript

Kind: captions Language: en ladies and gentlemen enough introduce our first presenter and that would be architect dr. Stuart chess Eyre okay I want to thank you all for coming it's great to see such a full room on a Friday morning last day of the conference and I'd like to believe that it's because you're here to see me but I know it's really because you've all experienced firsthand the frustration of trying to set up network devices and apples not the first company to realize the importance of this but I believe we're the first companies to succeed with a solution that really works I'd like to start with a show of hands how many people in the room now are our IT administrators network administrators ok that's a good turnout so we have a lot of new stuff in rendezvous this year this has been the biggest year for rendezvous and we've got more stuff to announce this year than last year or the year before so I'm going to get right into it we've got so much new stuff we should be calling it rendezvous two or super rendezvous or something so there are three big areas where we've gone beyond Panther in three different dimensions we've gone beyond the local lamp in Jaguar and Panther rendezvous was focused at the area of IP networking that's least well served which is a small network just plugging things together but in tiger we now expand that beyond the local lan using standard unicast queries and updates people have raised this criticism before I rendevouz only for local networks it doesn't scale to the enterprise well we've left the enterprise behind because we're built on dns dns is a worldwide database it's the biggest distributed database in the world and because of that in Tiger you can browse any domain that's advertising services anywhere on the planet from anywhere on the planet so what we now scale for the whole planet we go beyond the old rendezvous in another very important way which is while we always had the Darwin code which ran on a variety of different platforms it was a little bit inaccessible what we have today just announced this week is a rendezvous system service demon running in the background just like it does on OS 10 running on linux freebsd solaris other unix systems and of course windows how many people in the audience developed for windows nearly half exactly exactly as we expected and the good news now you can go to the apple developer website and download our technology preview for windows run the installer and you get the exact same dns underscore sdh API that's provided on Panther the same API that's provided on linux and freebsd insularis in the unix platforms so the same c code you write is now portable across all of those platforms and the other way we go beyond the old rendezvous is beyond CA p is the current AP is our see header files we now have a fully supported java class library that provides you the full functionality when ancestor as a talk at javaone this week and got a big enthusiastic reaction there as well Java people have been waiting for this a long time so you have the full suite of rendezvous facilities available to you but with object-oriented Java style api's and the other area where we go beyond rendezvous is not just Java but we go beyond C to C sharp visual basics and all of the dotnet languages on windows as well so you can now write visual basic programs using rendezvous so an outline of what we're going to talk about today I'm going to recap what rendezvous is about because most Mac users and developers know about it but I want to make sure that we're not leaving anybody behind we're going to talk about the wide area reserved discovery in advertising we're going to show you rendezvous running on Windows and on the unix platforms we're going to tell you about the java api and the api that we have in panther proved to be very good we didn't have any bugs or missions to fix but we have added a couple of new helper functions which I'll tell you about and you may have seen a setting up here we just had a whole suitcase full of stuff we had the rendezvous plugfest at the apple campus last night and we told people that they brought cool stuff then we try to show it and we've got a whole suitcase of stuff so if it weren't for rendezvous it would be insane to try to set up 20 different devices in 15 minutes to do a demo but because the rendezvous will we'll see if this works and we we hope to have time for Q&A at the end so quick recap what is rendezvous first and most important is it's a philosophy it's an attitude it's the attitude that you should be able to just plug things in and have them work without fussing with addresses and subnet masks and nonsense configuration and that's what's most important and I always say that first because people forget that rendezvous is not about technology rendezvous is about the goal of making products that just work if you think about plugging USB device you don't have to type addresses to configure it you just plug it in and there's no reason ethernet should be any different or wireless so that's the most important thing but there are underlying technologies that will enable us to reach that version and those are addressing naming and discovery now I'm not going to go into these in the same detail I have a previous talks but just to recap you're not going to do much IP addressing without an address dhcp is great but if there isn't dhcp server on the network all of these rendezvous devices will pick their own address second thing having a bunch of random IP addresses is certainly a first step but it's not sufficient because if you don't ought all the IP addresses are you're not a lot better off so the second step is naming a normal usage model for internet software is DNS hostnames DNS is great if you have a DNS server but if you don't then we need a safety net and the safety net is multicast DNS where you send a standard format DNS query you multicast it to everybody on the local network and each device has its little multicast DNS responder and when it sees a query for its name it says that's me and it answers so this doesn't replace your compete with global scale wide area DNS but it's the safety net when you have just two devices on a cable or three or four devices in the hub and you don't have a DNS server setup and the third leg is discovering because using host names is better than using addresses but you still need to know what name to use and discovery lets you browse the network like be faithful old appletalk user and see what's out there and click on it without having to know in advance what the name is and why do you care as product developers well you care because if the user can't use your product then they're going to call you they're going to run up support costs and ultimately they may return it I witnessed something as a start-up a few years ago in here in California in Silicon Valley at the heart of the computer and three they bought a $1,500 high-end HP LaserJet printer double sided stapling in corners very very beautiful fancy machine plug it into the network appletalk auto configured the mac users were printing on it right away they could not get IP setup like these were guys with masters and PhDs from Stanford during the dot-com startup they could not make it work after two days they put it back in the styrofoam took you back to frys and returned it and that's just a tragic story which is why today every major printer vendor has rendezvous in their printers because they don't want they don't want the printers being returned but what is more exciting to me it's not just taking the current stuff and making it easier but the fact that when you don't have to configure it entirely new product categories have become possible and and that's where I think we're going to see a lot of the exciting things you will all have seen the announcement for our Airport Express this has no screen this has no keyboard but it shows up in a pop-up menu in itunes for you to play your music that wouldn't be possible if you had to type in addresses and netmask and things that this products wouldn't exist so that's where i think we're going to see the excitement in the next couple of years so to summarize rendezvous has grown both in bretts and in depth it's grown in breath in terms of reaching more platforms and more languages and it's grown also in the it now skills beyond the local link geographically it's grown to scale to the whole world so don't even try to read this I'm not here to talk to you today about upnp but when we have whenever we meet with developers it's a question that comes up what about you pnp and the upnp forum loves to proclaim how many hundreds of companies they have signed up for their forum but they only have one credible product today after all those years of work and i'm being generous by even calling it credible that's it that's the upnp home gateway protocol and it really doesn't even work very well but that's the only thing that they can kind of point to is that their success well nevermind the forum and the hundreds of companies we have hundreds of products this is from the list of registered rendezvous service types from the dns service discovery website and this is just the first page and it goes on and i won't go page after page after page we're on to the letter I here we're only on the 9th letters of alphabet every one of these registered services this is not a product this is a protocol for every one of these there are one or more service advertising that there are one or more clients browsing for that if it's a network game it may be serving a client from the same company in the case of protocols like ssh telnet FTP there are of course dozens of servicing clients advertising that so we have this huge adoption this quite revolution going on that people almost aren't aware of and the daily this list of registered rendezvous services gets longer and longer so on that note I'd like to invite Curren a car up on stage to tell you all about wide area around Thank You Stuart so glad to see all of you out here I know the morning after a beer bash can be tough but I'm very excited to be here and tell you about what we're doing here my name is Kiran sacar and I've been involved with the rendezvous team at Apple for almost two years now and for Tiger I'm focusing specifically on our wide area initiatives now Stuart mentioned when we started off with local rendezvous a few years back we aimed squarely on the local network because that was the area that was least served by IP networking and the most amazing thing happened once everyone tried it the first thing they asked invariably was how can we get this beyond the local network suddenly the area that had the worst user experience became the model for how we're going to move forward now we have this viable solution on all these platforms for the local network and we are ready to move forward and we have a very clear vision as to how we're going to do so the first and the most sweeping of these goals is to bring the zero configuration ease of use everywhere from the local networks where we started to enterprises and education all the way to the internet and in doing so we're going to bring reach ability to everybody reach ability isn't something that you should have to have a static IP address for and have the savvy to set it up and even if you do have these things well once you go mobile your reach ability goes out the door imagine you move between your home your office and an internet cafe short of actually getting on the phone and calling up your friends and telling them your IP address reaching you is like finding a needle in the haystack now in pursuing this vision we're going to have a very broad reaching impact on all of you take for instance this doesn't use rendezvous take for instance a network game all of a sudden you can collaborate with another game player across the internet with just a couple API calls it's that easy it provides a great user experience and it's easy for you to allowing you to focus on your core competencies which is creating great applications not messing around with this networking stuff if you manage a network environment like in an enterprise you might have found yourself choosing between a network that's easy for you to administer and a network that's easy for your your users to interact with and with wide area rendezvous you get both and of course life local rendezvous has done wide area rendezvous will add a competitive advantage to your hardware products making them better for your customers to interact with and ultimately lowering your support toss now as Stuart explained when we set about solving the local problem we focused on a few core pieces of functionality and moving forward with wide area rendezvous we're doing the exact same thing first we give every machine a dynamic dns hostname this is much like the link local name on local rendezvous but now the name is globally unique meaning it can be looked up an access from anywhere and this name is persistent meaning as you move between your home and your cafe and your office the name stays the same even as your IP address changes this is the first big step towards reach ability this alone brings us so much functionality but we go ahead and take it a step further first of all we don't want to have to remember these names and even more importantly we want to learn about new machines that we didn't know about before but they're providing some service that's of interest to us so we take the DNS service discovery and registration that we have on the local network and publish this into a global name space where these services can be accessed potentially from anywhere now it's easiest to explain the architecture to the solutions of this functionality in the framework of local rendezvous that we all know local rendezvous of course starts with dynamic dns our pardon to the dns service discovery on the top and that is the AP is that your application is used to browse and register for services and of course the resource record format using standard DNS messages to encode information about your services now beneath this we have multicast DNS the server lyst protocol for registering and querying for these DNS records on the local network with wide area rendezvous we simply slide out the multicast DNS layer and use unicast Vienna communicating directly with a DNS server now in the difference between this architecture and our previous local architecture what has stayed the same is just as important if not more important than what has changed and that's DNS service discovery this means that our AP is our one hundred percent unchanged the exact API is that you've been using for the last two years we'll give you all of this new wide area functionality with little to no modification in your applications when we first did local rendezvous many people ask why are we using the DNS message format and back then we did have some good reasons there were a wealth of debugging tools developers are already knew the message format just to name a few but now is where we see the really big win by making that decision for local rendezvous we're allowed to keep the same protocol in the same API s and instead communicate with the state with these DNS servers that automatically know how to understand our messages we can look at some of the specific advantages of DNS both on the discovery using the DNS queries and the registration side using dynamic updates let's start looking with by looking at registration pardon me with discovery to discover a service or to look up information about a service we format a standard DNS query like we would have done with local rendezvous and instead of sending it out on the network we send it directly to our DNS server and get an answer it's really that easy but along with it being easy we inherit this huge wealth of advantages that DNS has to offer DNS has extensive caching DNS is distributed in nature and perhaps most importantly DNS is ubiquitous there are servers everywhere now getting the information off the server is pretty easy but how do we get information to the server how do we publish our services and register our name after all dns was initially a relatively made for a relatively static data set when it did change it was usually an administrator actually typing in something in a text file unfortunately that problem has been solved for us as well with dynamic dns update as you probably know dynamic update allows the client to publish resource records into a server and we use this to publish our global globally unique address record and this is one of the more conventional uses for dynamic update in addition we take our service records the records like the pointer record the txt record the SRV record that convey information about the services that we're offering and publish those into the DNS as well now we have this distributed system of databases just ready to accept our services which ones are we going to use well if you manage an enterprise network chances are you might set one up and we've gone ahead and set one up too and it turns out it's pretty big that's right dot Mac now supports dynamic dns this is included with a standard mac service and each user gets their own name user members maxcom within this domain they can publish the names of any number of machines that they own and any number of services that they wish to advertise the server was built from the ground up to support wide area rendezvous so the software is highly tuned and unless you come from Virginia Tech the rack of extras will make you drool but it turns out if you're not supporting half a million users you don't need anything like that in fact a standard DNS server will work just fine and that's what we do with our tiger server offering we use by nine the tried and tested DNS server and include a UI that makes setting up wide area rendezvous even easier now when we're registering into these servers and potentially across the internet with Mac this of course creates a whole new range of possibilities for the visibility of our services with dot Mac services are truly globally visible when you publish your name and your services anyone on the internet can discover them but you don't have to set your network up this way if you are managing an enterprise network you probably don't even want that you probably want your services registered securely behind a firewall and DNS offers us that kind of flexibility using techniques like what namespaces you can do much as you do with your website having your publicly visible website as well as an internal website that's only visible behind the firewall this brings us to another advantage of using the domain name system not only there are there so many technical advantages but we also get this wealth of administrative expertise there are already thousands of people many of them are in this room who know how to set up a DNS server and guess what now you're also a wide area rendezvous administrative expert now if you're an administrator deciding how you're going to set up your wide area rendezvous network or you're an application developer planning to publish your services into the dot Mac system it's worth thinking a bit about what kind of visibility you on and what's this visibility means for you well let's take the extreme example the dot Mac example when you publish your services anyone can find them from anywhere but that's where it stops at discovery once someone discovers the service they'll have to connect to your service and it's up to you to have the kind of access control and security that's appropriate for your application so what's the message secure your app but as it turns out this discovery mechanism doesn't actually introduce any new vulnerabilities if a hacker wants to if you're providing a service they could find you even without this kind of discovery what this does is it makes just makes it easier for those with legitimate reasons to find your services and be able to interact with them now one area that's particularly challenging in terms of visibility is networks that are behind nat gateways as you might know and that allows a single public IP address to be shared amongst a number of private addresses for example an airport base station plugged into a DSL line often acts as an that now then that detects outbound connections say one of the machines talking to a web server and it'll change the addresses in the packets to make them look right and it'll remember this outbound request so when a reply comes it'll know which miscue machine behind the gateway to send it to unfortunately there's no way for the nat to know when a machine behind it is actually providing a service and there's no way for machines outside of the gateway to connect to these machines with their private addresses now the reality of networking today is that machines are more and more finding themselves behind these mat gateways and it's simply not acceptable to force them into this cloud of isolation if they're in this kind of a network configuration that's why we've created a natural versatile protocol it's a very simple protocol that allows the machine behind that gateway to learn public IP address and to request the public port that it can then maintain with a lease life and a refresh much like dhb p and this effectively allows machines behind the net gateway to be able to accept connections incoming connections from outside of that gateway I'm glad to hear that you're all enthusiastic about this and of course following in the rendezvous tradition this is an open specification which is now available in a preliminary form on our websites and if you're interested in using this in your products by all means come talk to us now this promotion this protocol is a highly complementary to wide area rendezvous but it turns out that the rendezvous stack is also the ideal place to implement it in white area rendezvous we use the protocol to find what our public IP address is so that when we register our names in the DNS we're registering a public address that can be reached from anywhere when an application registers the service using our service registration api's we'll go ahead and take care of the NAT mapping for them will maintain the leases and the refreshes and all this is completely hidden from the client you don't even have to worry about it now if for some reason you don't want this if you don't want a port map for you just register your service in the local domain only and we won't do any kind of wide area registration for you we won't create any nap mappings for you but your service will continue to work on the local network now this protocol gives us huge flexibility in terms of the range of visibility and all of a sudden we can have a person registering a service on one side of the globe and someone discovering it on the other and as the physical distance increases we clearly need some kind of authentication mechanism for publishing our services take for instance the dot Mac service if we had this without any kind of authentication someone could register something say a photo share in my domain other people will discover it think it's mine and when they resolve it they will actually get directed to this Impostors machine and who knows we might end up finding pictures that I just don't want my grandmother to see fortunately DNS standards provide us with an easy solution for this we use the transaction signature resource record also known as a tea cig and what this is is a cryptographic hash of the dynamic updates which includes all of the messages pardon me all the records and the services that will be publishing as well as a shared secret known by my machine and the server and this effectively allows the server to determine that I do in fact have the authorization to publish records in a given domain now all of this is available with why area rendezvous and in the dot Mac case it just works seamlessly but it's not required as part of the protocol if you're setting on up the network that's behind a firewall with a relatively small number of users you might decide that you don't even need authentication you got by with Apple talk for years without it and you trust your employees you don't have to have it you have that kind of flexibility now looking at all these different pieces the authentication than that traversal the dynamic updates the queries we get a more detailed architecture of the white area rendezvous system and what this really is is a novel combination of existing technologies in a way that provides a very valuable and powerful experience but if you look at this long enough and believe me we did eventually you'll find some holes let's look under the discovery sign with local rendezvous we have this notion of a long-lived query when we start a browse say in ichat you get all the answers that are available on the network and your list immediately populates but this browse this query maintains for the length of time you have that window open so as new services become available or old services go away your list maintained it your list is updated and it's live it's snappy and it provides that great experience that we all like unfortunately there's no equivalent with unicast DNS we have a couple options here we could deal with failed data you could maybe add a refresh button to your application and if you've ever heard Stewart talk before you know you're more likely to see a big flat your powerbook or we could pull the server very rapidly and find out about changes that way now that would make us fall back into the chattiness that plagued appletalk and it would completely preclude this kind of scalability that we need for a half a million users in dot mac so it looks like the DNS standards got us pretty close but they stopped a little bit short of giving us a solution that we need as it turns out dns actually comes through by offering its own extension mechanism this is called edn s0 and it's a standard way of enhancing the DNS protocol to provide new functionality as it becomes necessary we use this extension mechanism to create long-lived queries this is a special kind of query where we ask the server to give us all of the answers that it knows and then to continue to tell us as new answers become available or answers that it previously gave us becoming valid this provides the same kind of browsing experience that we have on the local network while still being high performance and highly scalable similarly on the registration side we've got a piece missing under dynamic update with dynamic update we published a resource record into the database and it stays there until we d register it which works fine some of the time but imagine i plug my laptop in within to the ethernet jack and i register a bunch of services and then i unplug the cable well guess what those services stay up there on the dns even though my machine is no longer reachable and they'll stay there indefinitely for this prob we end up with the same stale data problem and we address this too with the ed and s0 extension mechanism we add a least life to resource records so that we tell the server to publish them and hold them for a certain amount of time which we can periodically refresh if we need to and then if the Machine becomes disconnected from the network where the power goes out or what have you before too long the server will realize that the machine isn't there anymore the lease is expired and it will actually go ahead and remove those records from its database now these extensions are done with DNS native extension mechanism but they clearly require some kind of modification to the server and there are a couple ways we can make this happen in the dot Mac servers because they were designed specifically for wide-area rendezvous these extensions are supported natively it can do long live queries and it can handle Leafs life's just like it can standard queries and standard dynamic updates but we design these extensions so that they can also be implemented as a side process running next to a stock unmodified name server this is what we do with our tiger offering we use by nine which is tried and tested and it works great and next to it we will have a process that understands long-lived queries understand the Leafs lives and essentially acts as a broker between the clients and the servers and specifications pulmonary preliminary specifications for these extensions are posted on the website and you're welcome to take a look at them and implement them in your servers if you so choose now looking at implementation it's worth taking a look at what kind of application implementation and what kind of application changes need to be made to take advantage of this in our discovery ap is you might have wondered why we have this domain parameter after all it's always just been local well now you see why in fact we have encouraged you as developers to not explicitly specify a domain when you make your registration calls and when you make your browser calls just pass the empty string and let us pick you something for you and up until now that's always just been local but now that we have this new capability we can make intelligent choices for you about where to browse and where to publish services for example a default browser registration call might take place both on the local network and in a user's Mac domain now of course if you have explicit needs by all means pass an explicit domain if your service really only makes sense in the context of the local network than just past local likewise if you want to be looking in a specific dot Mac members domain perhaps for some kind of a collaborative application or a game then just pass that members domain if you want to we have calls that will provide a list of available domains that you can browse and register in and you can actually let your client pick one in a graphical user interface these enumeration calls have been around all the time and up until now they've only returned local but now they'll return local as well as one or more dot Mac domains and possibly even other domains that we learn about from our network environment well enough of hearing me talk let's take a look at how some real applications use this stuff can we go to the demo please early demo three thank you here we have a tiger machine thank you here we have a tiger machine and as you can see I'm in the dot maxpreps pain and there's this new tab called domain this allows us to turn on the dot mac dns service I've checked it on here and you can see the name of my computer portable Kieran members matcom Kieran members mac com is my personal domain where I can register in and portable is the name of this machine that I've sat in our sharing press Spain now this is a standard DNS name you can use it in the connect to dialogue you can use them the terminal anything that takes a dns name but we can also use rendezvous for browsing of course we don't have to use this name explicitly we can take a look in safari in the rendezvous tab and sure enough i'm actually not seeing anything I'm not seeing any rendezvous shares here let's see if we can't figure out why that's happening I have a machine at home and I want to be able to see its website and I thought it was publishing in the dot mac and i know i have apple remote desktop turned on there so let's see if i can't actually get into it and see what's happening now here too i could enter that the name of my home machine but i don't have to here we have an unmodified application apple remote desktop that does rendezvous browsing and doesn't specify an explicit domain so the system goes ahead and publishes both locally and in my dot math domain and here we can see my desktop machine with its IP address here which is not on our local network and i can go ahead and add it and here we see the difference between discovery and actual access anyone can discover that i have apple remote desktop but you still need to correct zation to access a machine and now I can connect to it here too we can see that I have dot Mac turned on Mac domains turned on and that's why I was able to see it from here in the conference room and you can see its name desktop in my same in my same personal domain now let's take a look at why web sharing wasn't working well that would explain it it's not turned on so we can look back in our safari browser here and Safari has a long-lived query established with the server which means that it's asked for all the answers and in fact there weren't any but the server will continue to tell it as new answers come about so if i go ahead and turn on web sharing here it'll fire up apache register my services both on my local network at home and in my dot mac domain go ahead and turn it on takes a few seconds for Safari to launch and there it is it's amazing to think about how many things happens have to happen there the registration has to send the records to the dns server the dns has to notice this change and send the notification to my machine here and it's still just as snappy as it is on the local network you can see it disappear and reappear it actually takes longer for Safari to lots for Apache to fire up than it does for the registration to take place and we can go ahead and double click on it and resolve the service to the IP address and the port of my machine back home and there you can see the web page that's running on my desktop computer now I like this this whipped web page and I think I'm actually going to print out a copy let's see I don't see any printers here on the network let's see if I can if I can add one go ahead and add oh what's that because the printer sharing is also doing the same default browsers and registrations it's able to look in my dot Mac domain and see this printer that's registered at home and actually go ahead and print to it so can we go back to the slides please seeing this work in real applications allows us to look at this architecture and say that it really is a solid architecture that makes great use of existing technologies and provides a really powerful technology for all of you guys to leverage but at the end of the day most of the stuff is really just implementation details what this is is really fundamentally dns service discovery it's the message format that we've had before it's the same API is if you guys already have in your applications and most importantly it's the same user experience that all of us and all of our customers have come to love I'm really excited about this technology and I'm even more excited to see what you guys do with it but this is really just a part of what's new in rendezvous for tiger so with that I'd like to turn it back to steer Cheshire thank you Karen so next big announcement which I think will make a lot of feel very happy is rendezvous on Windows so what's there we have a system service demon running in the background just like on OS 10 we have a client CLL that clients link with in order to communicate with that demon and we have Java support as well as the driver claims in the Developer Preview that we have on the developer that apple com web page we have a couple of sample clients to illustrate how you can use this one is a plug-in for internet explorer that gives you a rendezvous icon in the toolbar very much like in Safari where you can browse to find rendezvous services we also have a printer setup wizard to illustrate how you can find printers and set them up effortlessly in Windows but of course the big news here is we have the header file and the stub library for all you developers to link with your applications so you can advertise services and add rendezvous menus and rendezvous browsers in your application software you can get it today from the developers at apple.com website in Mac OS 10 / rendezvous and if you'd like to license this installer like maybe the way some of you license the quick time for windows installer then send us email and let us know so now I'm going to show you a quick demo and we will need we need this demo machine the VGA connection please all right let's run Internet Explorer and see what we see oh that was quick we have we have one of these axis cameras on the network this runs linux access is the world's leading maker of network cameras and they've now decided to adopt rendezvous we have one of accesses print service hair plugs in the parallel port turns your printer into a network printer what else we have we have this little printer thing from intercon let's try connecting to that a lot of these devices in the past would have had a serial port that you plug a terminal into and you configure it in a vt100 terminal and that's very 70s the but but the the serial port and the vt100 terminal was kind of a universal user interface of the 1970s and the universal user interface of this decade is the web browser so a lot of these devices that don't have any screen or keyboard are configured through the web browser which is great if you can find it and of course rendezvous gives you the answer so we can find all of these things and they show up just like they do in Safari but the thing that I'm sure you'll all want to see if you've ever tried to use a network printer is this so let's see what we have on the network will click Next there's an HP LaserJet somewhere in this building not mine but we have the seh into conference server plugged into this old epson printer here and it recognizes that it's a stylus color 740 and now we're ready to set up a printer I actually wanted to not have all these next and back buttons I just want one button here that says I'm feeling lucky so that was it effortless setting up of windows printing so on that note let's go back to the slides please so as well as windows we also have support for the unix platforms for linux freebsd solaris same story there's a background demon there are system scripts to start stop at boot time there's a shared library for clients to link to and there's the same a header file as mac and windows and there's the same driver support so the same java applications will run unchanged we don't have an installer on the website but that's available in darwin and if you check out the top of tree darwin code and run make install in the POSIX folder it will install those five or six files where they need to go so let me show you a quick demo of that let's go back to the vga feed please so if you've looked in the Darwin project in the clients folder we have a sample command line client to exercise all of the DNS sdap eyes you can browse you can register your reconcile you can resolve it's about four hundred lines of C and it's a big switch statement that does all the different calls so if you're using rendezvous then that's a good place to start to just copy and paste a little chunk of code that you need and of course it compiles and runs on linux just the same and i'm going to show just a simple let's browse for HTTP and the advertised HTTP servers and there we see the same things that showed up in explorer and in safari and if we look for things that are offering IPP printing service we will see those to show up so the same API is there and we're really excited talking to the people to make web browsers and other software that runs on linux to start adding these calls into their applications so that they can have rendezvous in venues as well okay back to the slides and with that I would like to invite Roger pantos to come from stage and tell you all about using rendezvous from Java thank you sir so my name is Roger Pentos and I work with Stuart and kieran at apple on rendezvous and what I'd like to do today is spend about 10 minutes telling you about the rendezvous interface that we've built for for Java so from the point of view of a Java applications programmer the most interesting kind of most fun thing to do with service discovery and so that's what the work we've done is kind of centers on what it consists of is a new API a new set of classes for Java that gives you access to the complete set of service discovery facilities that rendezvous offers what that gives you is complete access to the system implementation of rendezvous which means this is a system level implementation this is not running in your java program as in previous 0 conference implementation so it means you get the benefit of the system-wide resource record cashing it means you get the performance that every other client gets it means you get the benefit of all the additional work we've done in our reference server on things like duplicate suppression the efficiency and all the bug fixes we've made to mdns now the java support is also built in to our reference implementation when you build it on windows or on Mac OS 10 or on linux or on freebsd you get the java support as well and when we deliver a rendezvous on a platform we deliver the job of support and so our intent is that if you have rendezvous on your platform at all and you have a java vm then a java application can run on your platform and it can use the rendezvous ap is so let's talk about the rendezvous API is a little more closely when we were working on the design we had two big goals the first was we wanted to create an API that would allow a Java client to be a first-class client of rendezvous which means that it should be able to do everything that a C or C++ client could do but at the same time we didn't want to try and just take the c api and kind of cram it into Giada we wanted to create something that was a real java api we want our java developers to be able to look at and say yeah that looks like a java api feels like a java api it fits in naturally with the rest of the java stack and so the approach that we took to achieve this was is what is known as a factory class model what that means is that you have a single instance of what's called a factory class and when you want to invoke a rendezvous service you do that by sending a message to this instance of factory class now rendezvous operations as you all know our little bit unusual from a library point of view in that their network operations you asked for the printers and we go off the network we find these printers eventually they come back and this takes time of course and so we use a very similar model in Java to what we do use in the DNS SD AP is which is we use we provide support for that asynchrony now in Java the way that model works is for every rendezvous API which or write a boost service which is asynchronous we've defined a Java interface and interface is just kind of a package of methods that your class implements and in this case each rendezvous operation has an interface which is defined to report the results of that operation back to your application and so the client you create an object that implements this interface when you ask us to perform an operation you pass a reference to that object to us we do the operation and then we call you back from a separate worker thread when we have the results of that operation now if as the java programmers in the audience are aware of often you'll want to do some kind of user interface in response to getting the results and this is something like you know updating a swing list or something and so we actually provide some facilities in the code we ship along with darwen that some utility things allow you to reschedule those operations on to your awt thread in addition to that utility class we provide some classes that make a little bit easier to manipulate the text records in the dns SP format and we have some see equivalence of that as well its storage is going to be talking about a little bit later so let's actually take a look at a more concrete example of the java stuff so we can get an idea of how it works in practice what I have here is a very simple little object whose job in life it is to look up printers on a network it's an app it's a class called my browser and it has this well I guess the first thing you'll notice is that the it's we've defined a new package for it java actually manages its name space by dividing classes up in the package so at Apple we have we defined a number of packages like combat Apple duck Coco for instance we've got a new one here combat Apple DNS SD so the first thing that my little browse for printers does is it sends a message to my factory class DNS SD says it a browse message and it's ending it underscore IPP look for preachers it's also passing it a reference to itself because it implements the Browse listener interface there we go and one of the methods that the Browse listener interface defines is service found and so you can see what's going to happen here is it's going to ask for an EVO to go find all the printers rendezvous will do that and then it's going to call this implementation back with the results and in this case all it's doing is printing out the results of times of the console but that in a nutshell is rendezvous programming in Java this is browsing once we find something we want to register it or rather we want to resolve it and so resolution is the same kind of deal we've got an interface which is a resolve listener it defines a callback which is service resolved and so you send a message to the SSD and it gets resolved registering a service again very similar you send a DNS SD a register message or register message I guess with it's saying hey I want to register our website it's called me it's an HTTP thing we're going to pass it to this reference we implement the registered listener call back and we get called back once the registration complete so we could spend some more time talking about the API but I thought it might be cool to have a demo so let's go over to demo to here on screen and here it is we can let's hide this guy not yet but soon ok so i guess when you're bringing up a rendezvous on a new platform for first time kind of traditional to get rid of good but it's kind of traditional to create a browser and you can see stewards we've got the browser from coco here i wrote a little browser in java as well and so here's my java app it's a couple of pages of Swing code and you can see it's looking in the I just lost my mouse maybe you were there we go okay we're good so it's looking the in the local domain here and it's found a number of different services that are being advertised so you can see we've got a java application here it's using rendezvous it's finding all kinds of different services so that's kind of interesting but then we decided to have a little more fun and so what I built was kind of the world's simplest peer-to-peer chat program that's called simple chat and so i'm going to write it here and what you can see is going on is that we've got this pop-up menu here and right now it only sees a single thing which is itself but if i could get Stuart to double-click on I actually on the windows machine here i'm going to got some whole bunch of machines up here but if we if we can get Stuart to run simple chat on windows there's actually his name is also Tim it's a kind of his nickname and so he's typing away in there and we've heard them specie and I can send them a message in theory okay I guess this is the and if we want to switch over to the vga feet per second on demo three we can see it running on all right I'm Alixe machine and we can see it running under windows I hope there it is so a couple set so if we could switch back to demo to just for one more second simple chat is actually it's it's really small it's only like you know four pages of code but it's nice and that it illustrates three major aspects of using rendezvous first of all registration when you run simple text it registers itself on a network as an instance of simple of I think I'm score p2p chat the next thing it does is it wants to it wants to populate this menu of things that can talk to and so it browses for instances of PDP chat finds itself and a bunch of other things and then third when you actually select something from that pop-up menu then we resolve the service we discover the host running on discover the port you're running on and from there on and we just send UDP packets back and forth now just as with every other rendezvous browser this is live and so as you can see I've got Tim up there in the pop-up menu what I'm going to ask Stuart to do is quit simple chat on his machine and you'll see Tim disappears and it goes back to Apple so of course it's live just like any other one drew service so the next step is for you folks that start playing with this stuff if we could go back to the slides with how are you going to do that well first order of business is documentation documentation of course is in Java doc format it is provided on the tiger seed so if you've installed the tiger seed you already have it on your disk in addition for those who are not running tiger or perhaps running running Darwin you're using Darwin on Linux or perhaps on Windows we actually provide the Javadoc as a make file target and so you can generate the Javadoc yourself and of course as a last resort we also have a mailing list and so its rendezvous at list on apple.com if you just go list on apple com you can find out mailing lists I know many of you are already signed up to that so that's how to find out how to use it some of you are probably wondering how you actually get it or maybe more to the point how your customers get it so let's talk about delivery so at the basic level the Java support as an additional piece to rendezvous consists of two files one is a jar file which it contains the Java classes the implementation of our interface and that that jar file is platform independence the same on all platforms the next part we have is a jni library a java native native interface library and that is designed to adapt the platform independent java classes to the specific instance of the dns SD dll that you're running on on whichever platform and our intent is to deliver both of these are to the onto the machine when you install rendezvous and so this for most of you should be a detail the other thing is we are shipping with tiger and the Stewart says or as Stewart said we are also shipping it with Windows and so our intent is that when we deliver rendezvous to customers in binary form that the Java libraries will be there and you'll be able to depend on them so that in a nutshell is the Java API is I hope that you try them out you send us feedback and you build some great stuff with them thank you very much Thank You Roger we're getting close to the end time to wrap up we have really no changes of the main AAP is the only new ones we have I want to tell you about quickly now when you advertise a service you can attach name value pairs to that service and when you resolve you retrieve those name value pairs and those can be useful to store various attributes that describe the service particulars printers they store attributes like diversion and post grips and things like that that the client might want to know those txt records have to be formatted as standard DNS tax records and that's not difficult it's length bike and data but we just made some helper functions so now when your advertiser service you create an empty txt record you do set value set value set value and then you pass that txt record you've created to the standard DNS service register call when you resolve and when you receive a txt record off the wire we have a couple of functions to tell whether a certain key is present and to get the value for a given named key those are the only new api's we have to add at the higher levels that build on top of the DNS sdh API core foundation they have some minor changes which they talked about at their session on Tuesday and I would like to go back to the podium demo machine not the vga that the Mac you have here and I am in the few minutes we have remaining I told people if they brought things to the plugfest last night we'd try to show them on stage and we've got a lot more things than we expected this is a music device from Roku really nice i'm going to buy one of these with my own money when they start shipping them really nice bright fluorescent display on it controlled with the remote control play your itunes music but that's not what i'm going to show you today i'm not going to show you music playing what i'm going to show you is what they used in development which is if you go to the connector server menu in terminal and select telnet you see the sound bridge shows up because for development purposes they have a telnet interface to it and so same kind of problem how do you configure this thing well now it just shows up in the connect to server menu in terminal I said that the serial port was the user interface of the 70s and the web browser with user interface of the 90s something I think is a very interesting direction that the world is going is a network protocol called VNC for virtual network commute computing it's a way of seeing the screen of a remote machine and this little box here is some rack mount equipment for music studios to mix music and inside it's a PC it's got a VGA port on the back so you can hook up a keyboard and a monitor but you really don't to be sitting cross-legged on the floor with a monitor on your lap plugged into this thing in the rack so it would be much nicer if you could access this over the network well it runs the VNC client which is nice but how do you know what IP address it has well the answer is I don't really care what IP address it has because it does rendezvous and we just select that and it finds the address and this is a BT unit so it sometimes the display doesn't show up the other thing i found that was very interesting is there are a lot of other things on this network advertising rendezvous VNC that i didn't even know about so don't know what that's about but I think building user interface in a web browser for configuring a device is something that's very easy to do but sometimes the web interface doesn't give you everything you want whereas VNC lets you push the pixels you want so I think rendezvous advertised VNC is going to be an interesting direction for future interfaces the network devices so on that note let's go back to the slides and we will wrap up for more information Craig Keithley is our developer relations evangelist he's the man to go to with all of your questions if you've got technical developer questions about making things work or design questions or hints the rendezvous mailing list is a great resource not just Apple people but hundreds of other third-party developers are on that list and it's a great community for people working together to solve their problems of course one of the big benefits of rendezvous is when multiple people do things that interoperate so being the only VNC client that advertises with rendezvous is less useful than having all the NC clients and servers advertised the same service type with rendezvous so community communication is very important on the tiger CD you have this documentation and if you go to the ADC home reference library page then you can click around the links there's a lot of sample code and documentation there as well quick run through the URLs zeroconf dot org is the umbrella website for the zero configuration networking efforts it builds on multicast dns and dns service discovery is two of enabling technologies of course we have the apple developer pages that also have links to these sites at developer.apple.com the mailing list I already mentioned very important and if you're not tired of hearing we talked yet you can come back at the end of this month I'll be giving a rendezvous tutorial focusing on cross-platform rendezvous at the O'Reilly open source convention in Portland Oregon at the end of this month
