BonAHA framework - IEEE CCNC 2009

551 views
514 views

Published on

Overview of the BonAHA framework for applications running in opportunistic wireless ad-hoc networks. Uses Apple's Bonjour (ZeroConf) technology. This was the presentation made at the IEEE CCNC 2009 conference.

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

No Downloads
Views
Total views
551
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

BonAHA framework - IEEE CCNC 2009

  1. 1. BonAHA : Service Discovery Framework for Mobile Ad-Hoc Applications Suman Srinivasan, Arezu Moghadam, Henning Schulzrinne Internet Real Time Lab, Columbia University, New York, USA IEEE CCNC 2009: M1-2 Personal Ad Hoc and Sensor Networks
  2. 2. Topics <ul><li>Problem/motivation </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>Applications developed </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><li>New class of applications </li></ul><ul><ul><li>“ Ad-hoc/Mobile-P2P applications” </li></ul></ul><ul><ul><li>Opportunistic networks </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. Examples of applications <ul><li>Group chat </li></ul><ul><li>File transfer </li></ul><ul><li>File synchronization </li></ul><ul><li>Local multiplayer games </li></ul>
  5. 5. Solution 1: Raw multicast <ul><li>Initial solution </li></ul><ul><ul><li>“ Dumb” multicasting to announce and get information from peers </li></ul></ul>
  6. 6. Solution 2: Service Discovery <ul><li>Looked at writing our own framework for solving this problem </li></ul><ul><li>But, good news: </li></ul><ul><ul><li>Service discovery does exactly this </li></ul></ul><ul><ul><li>Actually, something very similar </li></ul></ul><ul><li>ZeroConf: Most widely implemented </li></ul><ul><ul><li>Apple’s Bonjour, Avahi, … </li></ul></ul><ul><li>Apple’s Bonjour </li></ul><ul><ul><li>Still requires a learning curve </li></ul></ul><ul><ul><li>Developer has to rewrite code </li></ul></ul>
  7. 7. Problems <ul><li>Bonjour API </li></ul><ul><ul><li>Three event 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/nodes </li></ul></ul>
  8. 8. BonAHA <ul><li>Aim to create 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. register() function
  11. 11. BonAHA framework Node 2 Node 1 key21 = value21 key22 = value22 key23 = value23 key24 = value24 key11 = value11 key12 = value12 key13 = value13 key14 = value14 [2] node1.get(key13) [1] node1.register() [3] data = node1.fileGet( value13);
  12. 12. TXTRecord DNSRegistration RegisterListener serviceRegistered() DNSSDService BrowseListener serviceFound() serviceLost() DNSSDService ResolveListener serviceResolved() DNSSD.resolve() DNSSD.register() TXTRecord Host IP DNSSD.browse() set() Bonjour State Diagram
  13. 13. BService BListener serviceUpdated() set() register() setListener() serviceExited() BNode get() getHostName() getHostAddress() BonAHA State Diagram
  14. 14. Example: LocationFinder <ul><li>Very simple, impractical application </li></ul><ul><ul><li>Only for providing a quick code sample </li></ul></ul><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 and update their own location </li></ul></ul>
  15. 15. Code: LocationFinder
  16. 16. Compare: Bonjour 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>
  18. 18. BonAHA Applications <ul><li>BBS application </li></ul><ul><li>Runs on iPod/iPhone </li></ul><ul><li>Allows users to upload “posts” </li></ul><ul><li>Other users can pick up “posts” and share their own </li></ul><ul><li>Information on events, etc that they are interested in sharing </li></ul>
  19. 19. BonAHA Applications <ul><li>BBS Application </li></ul>
  20. 20. BonAHA Applications <ul><li>Group chat </li></ul><ul><li>Allows users to discover peers in local network and chat </li></ul><ul><li>Rooms can be set up for private chats </li></ul>
  21. 21. BonAHA Applications <ul><li>File Sharing </li></ul><ul><li>Users can share files with each other by dragging and dropping files onto peers’ computers </li></ul><ul><li>Handles peers entering and leaving network </li></ul>
  22. 22. 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>File transfer on Bluetooth </li></ul></ul>
  23. 23. 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>
  24. 24. 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>
  25. 25. Future Work <ul><li>Develop useful applications </li></ul><ul><li>Fix some 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><li>Perhaps add high-level communications API for simple networking tasks. E.g.: getFile() , notifyPeer() , sendObject() </li></ul>
  26. 26. 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><ul><li>BonAHA , built on top of ZeroConf service discovery: a framework towards building such applications </li></ul></ul>Questions?
  27. 27. Backup Slides
  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. 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>
  33. 33. 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>
  34. 34. Related Work - LightPeers http://www.daimi.au.dk/~bentor/LightPeers/
  35. 35. TXTRecord DNSRegistration RegisterListener serviceRegistered() DNSSDService BrowseListener serviceFound() serviceLost() DNSSDService ResolveListener serviceResolved() DNSSD.resolve() DNSSD.register() TXTRecord Host IP DNSSD.browse() set() Bonjour State Diagram
  36. 36. BService BListener serviceUpdated() set() register() setListener() serviceExited() BNode get() getHostName() getHostAddress() BonAHA State Diagram

×