0
BonAHA: A Framework  for Ad-Hoc Applications Suman Srinivasan, Henning Schulzrinne Internet Real Time Lab
Introduction <ul><li>Problem </li></ul><ul><li>Approach </li></ul><ul><ul><li>Service discovery and Bonjour </li></ul></ul...
Motivation <ul><li>Mobile nodes; highly mobile networks </li></ul><ul><ul><li>No infrastructure </li></ul></ul><ul><li>OLP...
Background <ul><li>Started out with raw multicast </li></ul><ul><li>Service discovery protocols </li></ul><ul><ul><li>Appl...
Bonjour API <ul><li>Factory class:  DNSSD </li></ul><ul><li>Interfaces: Callback functions for events </li></ul><ul><ul><l...
Bonjour API <ul><li>BrowseListener </li></ul><ul><ul><li>serviceFound()  when services appear </li></ul></ul><ul><ul><li>s...
Problems <ul><li>Bonjour API  </li></ul><ul><ul><li>Three listeners, five function calls </li></ul></ul><ul><ul><li>Have t...
BonAHA <ul><li>Aim to make a framework that solves these problems </li></ul><ul><li>Much simpler, and more intuitive, API ...
BonAHA <ul><li>For registration </li></ul><ul><ul><li>service = new BService(&quot;7ds_location2&quot;, &quot;tcp&quot;); ...
BonAHA – OO Network Events Node 1 Node 2 key1  =  value1 key2  =  value2 key3  =  value3 key4  =  value4 Key2_1  =  Value2...
TXTRecord DNSRegistration RegisterListener serviceRegistered() DNSSDService BrowseListener serviceFound() serviceLost() DN...
BService BListener serviceUpdated() set() register() setListener() serviceExited() BNode get() getHostName() getHostAddres...
Example: LocationFinder <ul><li>Scenario </li></ul><ul><ul><li>Two nodes meet each other </li></ul></ul><ul><ul><li>Lack g...
Code: LocationFinder
Compare: Bonjour Code
Comparison in numbers ~60 ~8 Only ad-hoc application functionality 148 79 Complete class Bonjour Code BonAHA Code Location...
TicTacToe <ul><li>BonAHA sample application </li></ul><ul><li>Shows use in </li></ul><ul><ul><li>Multi-player games </li><...
Related Work <ul><li>Proem (2001) </li></ul><ul><ul><li>Needs to run on “peerlet engine” </li></ul></ul><ul><ul><li>No pub...
Related Work <ul><li>LightPeers </li></ul><ul><ul><li>Sep 2007 PhD dissertation (B. Christensen) </li></ul></ul><ul><ul><l...
Related Work - LightPeers <ul><li>Differences with BonAHA </li></ul><ul><ul><li>PING packet sent every second to search fo...
Related Work - LightPeers http://www.daimi.au.dk/~bentor/LightPeers/
Future Work <ul><li>Fix some non-OO API features </li></ul><ul><ul><li>Allow one BService object to create several instanc...
Conclusion <ul><li>New scenario:  highly mobile networks without infrastructure </li></ul><ul><li>Require a new class of a...
Questions <ul><li>Or Suggestions </li></ul>
Backup Slides
Problem <ul><li>Initial version of 7DS (circa 2005) </li></ul><ul><ul><li>“Dumb” multicasting to announce and get informat...
Solution <ul><li>Late 2005 / Early 2006 </li></ul><ul><ul><li>Looked at writing our own framework for solving this problem...
Apple’s Bonjour <ul><li>Implementation of Zero Configuration Networking (ZeroConf) by Apple Computer </li></ul><ul><ul><li...
Apple’s Bonjour <ul><li>Two main components </li></ul><ul><ul><li>mDNS Daemon </li></ul></ul><ul><ul><ul><li>Takes care of...
Apple’s Bonjour <ul><li>Details: Presented in Fall 2006 </li></ul><ul><ul><li>http://developer.apple.com/networking/bonjou...
Apple’s Bonjour <ul><li>Service Discovery: DNS-SD </li></ul><ul><ul><li>DNS PTR records </li></ul></ul><ul><ul><li>Announc...
TXTRecord DNSRegistration RegisterListener serviceRegistered() DNSSDService BrowseListener serviceFound() serviceLost() DN...
BService BListener serviceUpdated() set() register() setListener() serviceExited() BNode get() getHostName() getHostAddres...
Upcoming SlideShare
Loading in...5
×

BonAHA framework - Lab presentation

771

Published on

Overview of the BonAHA framework for applications running in opportunistic wireless ad-hoc networks. Uses Apple's Bonjour (ZeroConf) technology. This was a presentation given to my lab.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
771
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "BonAHA framework - Lab presentation"

  1. 1. BonAHA: A Framework for Ad-Hoc Applications Suman Srinivasan, Henning Schulzrinne Internet Real Time Lab
  2. 2. Introduction <ul><li>Problem </li></ul><ul><li>Approach </li></ul><ul><ul><li>Service discovery and Bonjour </li></ul></ul><ul><ul><li>BonAHA framework </li></ul></ul><ul><li>Demos </li></ul><ul><li>Related Work </li></ul>
  3. 3. Motivation <ul><li>Mobile nodes; highly mobile networks </li></ul><ul><ul><li>No infrastructure </li></ul></ul><ul><li>OLPC; mesh networks </li></ul><ul><ul><li>“Ad-hoc applications” </li></ul></ul><ul><ul><li>“Mobile P2P applications” </li></ul></ul><ul><li>Applications need to </li></ul><ul><ul><li>Be aware of network transitions </li></ul></ul><ul><ul><li>State/metadata of nodes in the network </li></ul></ul>
  4. 4. Background <ul><li>Started out with raw multicast </li></ul><ul><li>Service discovery protocols </li></ul><ul><ul><li>Apple’s Bonjour </li></ul></ul><ul><ul><li>Still requires a learning curve </li></ul></ul><ul><ul><li>Lots of repeated code </li></ul></ul>
  5. 5. Bonjour API <ul><li>Factory class: DNSSD </li></ul><ul><li>Interfaces: Callback functions for events </li></ul><ul><ul><li>BrowseListener : Service browsing </li></ul></ul><ul><ul><li>ResolveListener : Name Resolution </li></ul></ul><ul><ul><li>RegisterListener: Service Registration </li></ul></ul><ul><ul><li>QueryListener : DNS Record Resolution </li></ul></ul><ul><ul><li>DomainListener : Domain Resolution </li></ul></ul>
  6. 6. Bonjour API <ul><li>BrowseListener </li></ul><ul><ul><li>serviceFound() when services appear </li></ul></ul><ul><ul><li>serviceLost() when service leaves </li></ul></ul><ul><li>ResolveListener : </li></ul><ul><ul><li>serviceResolved() to get hostname, TXT records </li></ul></ul><ul><li>RegisterListener: </li></ul><ul><ul><li>serviceRegistered() when registration succeeds (or fails) </li></ul></ul>
  7. 7. Problems <ul><li>Bonjour API </li></ul><ul><ul><li>Three listeners, five function calls </li></ul></ul><ul><ul><li>Have to be completely implemented if an ad-hoc application wants to announce and listen </li></ul></ul><ul><li>Two other major problems </li></ul><ul><ul><li>No internal state maintained by Bonjour for services, related IP address and TXT records </li></ul></ul><ul><ul><li>Resolution can be done only on arrival or exit of services </li></ul></ul>
  8. 8. BonAHA <ul><li>Aim to make a framework that solves these problems </li></ul><ul><li>Much simpler, and more intuitive, API for ad-hoc applications </li></ul><ul><li>Applications need not maintain state or do “resolution” </li></ul><ul><ul><li>BonAHA will maintain state </li></ul></ul><ul><ul><li>No need for resolution; all nodes and metadata are objects </li></ul></ul>
  9. 9. BonAHA <ul><li>For registration </li></ul><ul><ul><li>service = new BService(&quot;7ds_location2&quot;, &quot;tcp&quot;); </li></ul></ul><ul><ul><li>service.set(&quot;Latitude&quot;, lat); </li></ul></ul><ul><ul><li>service.set(&quot;Longitude&quot;, lon); </li></ul></ul><ul><ul><li>service.register(); </li></ul></ul><ul><ul><li>service.setListener(this); </li></ul></ul><ul><li>For network transitions (nodes entering/leaving) </li></ul><ul><ul><li>nodeUpdated() </li></ul></ul><ul><ul><li>nodeExited() </li></ul></ul><ul><li>No need for maintaining state </li></ul>
  10. 10. BonAHA – OO Network Events Node 1 Node 2 key1 = value1 key2 = value2 key3 = value3 key4 = value4 Key2_1 = Value2_1 Key2_2 = Value2_2 Key2_3 = Value2_3 Key2_4 = Value2_4 [2] node1.get(key3) [1] node1.register() [3] data = node1.fileGet( “ filename.doc”);
  11. 11. TXTRecord DNSRegistration RegisterListener serviceRegistered() DNSSDService BrowseListener serviceFound() serviceLost() DNSSDService ResolveListener serviceResolved() DNSSD.resolve() DNSSD.register() TXTRecord Host IP DNSSD.browse() set() Bonjour State Diagram
  12. 12. BService BListener serviceUpdated() set() register() setListener() serviceExited() BNode get() getHostName() getHostAddress() BonAHA State Diagram
  13. 13. Example: LocationFinder <ul><li>Scenario </li></ul><ul><ul><li>Two nodes meet each other </li></ul></ul><ul><ul><li>Lack global knowledge of location </li></ul></ul><ul><ul><li>Each can find out other’s last location information </li></ul></ul>
  14. 14. Code: LocationFinder
  15. 15. Compare: Bonjour Code
  16. 16. Comparison in numbers ~60 ~8 Only ad-hoc application functionality 148 79 Complete class Bonjour Code BonAHA Code LocationFinder Lines of Code
  17. 17. TicTacToe <ul><li>BonAHA sample application </li></ul><ul><li>Shows use in </li></ul><ul><ul><li>Multi-player games </li></ul></ul><ul><ul><li>Mutual awareness </li></ul></ul><ul><li>Demo </li></ul>
  18. 18. Related Work <ul><li>Proem (2001) </li></ul><ul><ul><li>Needs to run on “peerlet engine” </li></ul></ul><ul><ul><li>No public documentation of API </li></ul></ul><ul><li>JXTA </li></ul><ul><ul><li>Excellent for P2P </li></ul></ul><ul><ul><li>Heavyweight for our goals </li></ul></ul><ul><li>Peer2Me </li></ul><ul><ul><li>Only Bluetooth </li></ul></ul>
  19. 19. Related Work <ul><li>LightPeers </li></ul><ul><ul><li>Sep 2007 PhD dissertation (B. Christensen) </li></ul></ul><ul><ul><li>Similar model to BonAHA </li></ul></ul><ul><ul><ul><li>“ Application”: Each application has its own GUID that identifies it </li></ul></ul></ul><ul><ul><ul><li>“ Session”: A group of nodes registered as running the application </li></ul></ul></ul><ul><ul><li>Code </li></ul></ul><ul><ul><ul><li>Application app = new Application(appid); </li></ul></ul></ul><ul><ul><ul><li>lpconn = new Connection(app); </li></ul></ul></ul><ul><ul><ul><li>ses = lpconn.CreateSession(); </li></ul></ul></ul><ul><ul><ul><li>List<Session> sessions = lpconn.GetSessionList(); </li></ul></ul></ul>
  20. 20. Related Work - LightPeers <ul><li>Differences with BonAHA </li></ul><ul><ul><li>PING packet sent every second to search for peers </li></ul></ul><ul><ul><ul><li>In Bonjour, there is exponential backoff </li></ul></ul></ul><ul><ul><li>No library-daemon interface </li></ul></ul><ul><ul><ul><li>LP “server” listens to packets </li></ul></ul></ul><ul><ul><li>Reimplementation of entire architecture (service discovery + framework) </li></ul></ul>
  21. 21. Related Work - LightPeers http://www.daimi.au.dk/~bentor/LightPeers/
  22. 22. Future Work <ul><li>Fix some non-OO API features </li></ul><ul><ul><li>Allow one BService object to create several instances. E.g.: one node may want to serve HTTP on two ports. </li></ul></ul><ul><ul><li>Demarcate BService and BNode objects further to reduce discrepancy in working </li></ul></ul><ul><li>Perhaps add high-level communications API for simple networking tasks. E.g.: getFile() , notifyPeer() , sendObject() </li></ul>
  23. 23. Conclusion <ul><li>New scenario: highly mobile networks without infrastructure </li></ul><ul><li>Require a new class of application – “ad-hoc” or “mobile P2P” apps </li></ul><ul><li>Require a new framework for programming these applications </li></ul><ul><li>BonAHA, built on top of ZeroConf service discovery: a framework towards building such applications </li></ul>
  24. 24. Questions <ul><li>Or Suggestions </li></ul>
  25. 25. Backup Slides
  26. 26. Problem <ul><li>Initial version of 7DS (circa 2005) </li></ul><ul><ul><li>“Dumb” multicasting to announce and get information from peers </li></ul></ul>
  27. 27. Solution <ul><li>Late 2005 / Early 2006 </li></ul><ul><ul><li>Looked at writing our own framework for solving this problem </li></ul></ul><ul><li>But, good news: </li></ul><ul><ul><li>Service discovery does exactly this </li></ul></ul><ul><li>ZeroConf: Most widely implemented </li></ul><ul><ul><li>Apple’s Bonjour, Avahi, … </li></ul></ul>
  28. 28. Apple’s Bonjour <ul><li>Implementation of Zero Configuration Networking (ZeroConf) by Apple Computer </li></ul><ul><ul><li>This is what enables sharing in iTunes, iChat, etc. </li></ul></ul><ul><li>Implemented on Mac OS, Windows, Linux and some other POSIX platforms </li></ul><ul><ul><li>Ported to Windows CE as well </li></ul></ul>
  29. 29. Apple’s Bonjour <ul><li>Two main components </li></ul><ul><ul><li>mDNS Daemon </li></ul></ul><ul><ul><ul><li>Takes care of all Zeroconf events </li></ul></ul></ul><ul><ul><ul><li>Listens to network events (link up, down, …) </li></ul></ul></ul><ul><ul><ul><li>Listens to mDNS traffic and keeps track of all service announcements and requests </li></ul></ul></ul><ul><ul><li>Library (Interfaces for C, Java, …) </li></ul></ul><ul><ul><ul><li>Allows applications to announce, browse for and resolve services </li></ul></ul></ul>
  30. 30. Apple’s Bonjour <ul><li>Details: Presented in Fall 2006 </li></ul><ul><ul><li>http://developer.apple.com/networking/bonjour/ </li></ul></ul><ul><li>Important things to remember </li></ul><ul><ul><li>IP address autoconfiguration: Link-local addressing </li></ul></ul><ul><ul><ul><li>Pick random from 169.254/16 </li></ul></ul></ul><ul><ul><li>Hostname resolution: mDNS </li></ul></ul><ul><ul><ul><li>DNS-like protocol, each host listens on 224.0.0.251, port 5353 </li></ul></ul></ul>
  31. 31. Apple’s Bonjour <ul><li>Service Discovery: DNS-SD </li></ul><ul><ul><li>DNS PTR records </li></ul></ul><ul><ul><li>Announcement of form: ServiceName._http._tcp.local. </li></ul></ul><ul><ul><li>Browsing for _http._tcp.local. gives list of web service instances </li></ul></ul><ul><ul><li>Resolving ServiceName yields hostname, TXT records, etc. </li></ul></ul>
  32. 32. TXTRecord DNSRegistration RegisterListener serviceRegistered() DNSSDService BrowseListener serviceFound() serviceLost() DNSSDService ResolveListener serviceResolved() DNSSD.resolve() DNSSD.register() TXTRecord Host IP DNSSD.browse() set() Bonjour State Diagram
  33. 33. BService BListener serviceUpdated() set() register() setListener() serviceExited() BNode get() getHostName() getHostAddress() BonAHA State Diagram
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×