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

More Related Content

What's hot (20)

PDF
RARP, BOOTP, DHCP and PXE Protocols
Peter R. Egli
 
PPT
Introduction to TCP/IP
Frank Fang Kuo Yu
 
PPT
TCP IP
hivasu
 
PPTX
Tcp/ip server sockets
rajshreemuthiah
 
PPT
Network programming in Java
Tushar B Kute
 
PPT
Day-3 PowerPoint
Nan Thin Ei Khin
 
PPT
Networking Java Socket Programming
Mousmi Pawar
 
PPT
Socket Programming Tutorial
Jignesh Patel
 
DOCX
Simple chat room using python
VISHAL VERMA
 
PPTX
Network programming in java - PPT
kamal kotecha
 
PPTX
Socket programming in Java (PPTX)
UC San Diego
 
PPT
Comparing Cpp And Erlang For Motorola Telecoms Software
l xf
 
PPTX
Multiplayer Java Game
karim baidar
 
PPTX
Java socket programming
Mohammed Abdalla Youssif
 
PDF
Koha Integration: RFID and SIP2
ohiocore
 
PDF
Chap 1 Network Theory & Java Overview
Ministry of Higher Education
 
DOC
Itep
Sofia Palawan
 
PPTX
Bulb Control using Web App with Raspberry Pi
Sanjay Kumar
 
PPSX
Network protocols and Java programming
difatta
 
RARP, BOOTP, DHCP and PXE Protocols
Peter R. Egli
 
Introduction to TCP/IP
Frank Fang Kuo Yu
 
TCP IP
hivasu
 
Tcp/ip server sockets
rajshreemuthiah
 
Network programming in Java
Tushar B Kute
 
Day-3 PowerPoint
Nan Thin Ei Khin
 
Networking Java Socket Programming
Mousmi Pawar
 
Socket Programming Tutorial
Jignesh Patel
 
Simple chat room using python
VISHAL VERMA
 
Network programming in java - PPT
kamal kotecha
 
Socket programming in Java (PPTX)
UC San Diego
 
Comparing Cpp And Erlang For Motorola Telecoms Software
l xf
 
Multiplayer Java Game
karim baidar
 
Java socket programming
Mohammed Abdalla Youssif
 
Koha Integration: RFID and SIP2
ohiocore
 
Chap 1 Network Theory & Java Overview
Ministry of Higher Education
 
Bulb Control using Web App with Raspberry Pi
Sanjay Kumar
 
Network protocols and Java programming
difatta
 

Viewers also liked (7)

PPT
7DS Version 1
Suman Srinivasan
 
PPTX
OSGi summary
Suman Srinivasan
 
PPTX
ActiveCDN on NetServ
Suman Srinivasan
 
PPT
Suman's PhD Candidacy Talk
Suman Srinivasan
 
PDF
My PhD Thesis
Suman Srinivasan
 
PDF
My PhD thesis defense presentation
Suman Srinivasan
 
PPT
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
Suman Srinivasan
 
7DS Version 1
Suman Srinivasan
 
OSGi summary
Suman Srinivasan
 
ActiveCDN on NetServ
Suman Srinivasan
 
Suman's PhD Candidacy Talk
Suman Srinivasan
 
My PhD Thesis
Suman Srinivasan
 
My PhD thesis defense presentation
Suman Srinivasan
 
Real-Time Video Analytics Using Hadoop and HBase (HBaseCon 2013)
Suman Srinivasan
 
Ad

Similar to BonAHA framework - Lab presentation (20)

PDF
X-Device Service Discovery
TekObserver
 
PPT
Mba admission in india
Edhole.com
 
PDF
Design patternsforiot
Michael Koster
 
PDF
Mobile ad hoc networks (MANET) for KTU
Vinish Alikkal
 
PDF
Mobile ad hoc networks (manet)
Vinish Alikkal
 
PDF
Pervasive Computing
UCL-CS MobiSys
 
PDF
MobiSys Group Presentation
Neal Lathia
 
PDF
Apple bonjour
Purvik Rana
 
PDF
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Anne Nicolas
 
PDF
Architectures of Distributed Systems.pdf
cAnhTrn53
 
PPTX
Future Internet
Saber Ferjani
 
PPTX
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
Javier García Magna
 
PPTX
Mane ts
Nunna Swathi
 
PPSX
Adhoc and routing protocols
shashi712
 
PPTX
Asn unit 1
Kiriti Varkur
 
PPT
Unit-1 (1).ppt
ARIVAZHAGANPASUPATHI
 
PPT
Unit-1.ppt
ARIVAZHAGANPASUPATHI
 
PPT
Session18 Madduri
ISSGC Summer School
 
PPT
Bonjour protocol
Salah Amean
 
X-Device Service Discovery
TekObserver
 
Mba admission in india
Edhole.com
 
Design patternsforiot
Michael Koster
 
Mobile ad hoc networks (MANET) for KTU
Vinish Alikkal
 
Mobile ad hoc networks (manet)
Vinish Alikkal
 
Pervasive Computing
UCL-CS MobiSys
 
MobiSys Group Presentation
Neal Lathia
 
Apple bonjour
Purvik Rana
 
Kernel Recipes 2014 - NDIV: a low overhead network traffic diverter
Anne Nicolas
 
Architectures of Distributed Systems.pdf
cAnhTrn53
 
Future Internet
Saber Ferjani
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
Javier García Magna
 
Mane ts
Nunna Swathi
 
Adhoc and routing protocols
shashi712
 
Asn unit 1
Kiriti Varkur
 
Unit-1 (1).ppt
ARIVAZHAGANPASUPATHI
 
Session18 Madduri
ISSGC Summer School
 
Bonjour protocol
Salah Amean
 
Ad

Recently uploaded (20)

PPTX
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
PPTX
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
PPTX
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PDF
Kubernetes - Architecture & Components.pdf
geethak285
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PDF
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
Simplifica la seguridad en la nube y la detección de amenazas con FortiCNAPP
Cristian Garcia G.
 
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Priyanka Aash
 
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
Paycifi - Programmable Trust_Breakfast_PPTXT
FinTech Belgium
 
01_Approach Cyber- DORA Incident Management.pptx
FinTech Belgium
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
Kubernetes - Architecture & Components.pdf
geethak285
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
My Journey from CAD to BIM: A True Underdog Story
Safe Software
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
Unlocking FME Flow’s Potential: Architecture Design for Modern Enterprises
Safe Software
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 

BonAHA framework - Lab presentation

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