Wireless Sensor Network Issues 김기형 (kkim@yu.ac.kr) Network Computing Lab 영남대학교 Middleware in MANET (KRNET2004) Contents http://folk.uio.no/paalee z Introduction to middleware technologies for MANET z Related works on service discovery protocols • • • • • • Blutooth SDP SLP (IETF RFC2608) Jini (http://www.jini.org ) Salutation (http://www.salutation.org ) UPnP (http://www.upnp.org ) JXTA z Service advertisement and discovery mechanisms in Ad Hoc networks z Proposed service discovery mechanism in MANET http://www.unik.no/personer/paalee Middleware in MANET (KRNET2004) Characteristics and Core Middleware Services for MANET http://folk.uio.no/paalee z Characteristics of MANET ▬ Ref: T.Plagemann et.al., “Towards Middleware Services for Mobile Ad-hoc Network Applications,” Proceedings of the Ninth IEEE Workshop on Future Trends of Distributed Computing Systems(FTDCS’03) ▬ Typical application scenarios for MANET – Emergency situations, Business meetings – Æ Common key element of MANET is Information access and sharing ▬ Three different types of information sources – Mobile end-user devices, stationary devices, and the Internet z Core Middleware Services in MANET ▬ M. Avvenuti et. al., “Core Services in a Middleware for Mobile Ad Hoc Networks, FTDCS’03 ▬ Logical mobility ¾ Object communication and migration (e.g. via RMI)) ▬ Lookup service http://www.unik.no/personer/paalee Middleware in MANET (KRNET2004) Searching for Peers z Searching for peers is like trying to call someone by phone z Reasons for calling a peer ▬ ▬ ▬ ▬ To give information To get information To ask for a service To ask for content z Where is the peer information stored? (Peer advertisement) ▬ Locally (local address book) ▬ Centrally (Centralized directory service: phone book) ¾ ¾ ¾ ¾ Napster (indexing by content id) IRC, Skype (indexing by username) DNS (DNS server: indexing by machine name) SIP (indexing by SIP address) ▬ Remotely(friends’ address book) ¾ ¾ ¾ ¾ ¾ ¾ Peer (or service) advertisement, peer discovery Distributed directory service SLP (passive advertising) JXTA (PDP) SSDP Salutation Ref: T. Saridakis, “Peer advertisement, discovery and Inquiry”, Nokia 2003 Middleware in MANET (KRNET2004) P2P Network Protocols z Two main protocols ▬ Node Discovery: Used by a new node joining the network to discover existing nodes in the network and connect to them ▬ Service(Resource) Discovery: Used by a node to locate resources present on other nodes Middleware in MANET (KRNET2004) Node Discovery Protocol Address Server (contains addresses of 2. Return node well known nodes) address 1. Request address of at least one existing node from Address Server Newly Joining Node Ping Message Pong Message Ref: http://faculty.ist.unomaha.edu/pdasgupta/courses/spring2004/csci3830/slides/lec19.ppt Middleware in MANET (KRNET2004) Service (Resource) Discovery Protocol Node Starting Query Query Message QueryHit Message Middleware in MANET (KRNET2004) Related Works on Service Discovery Protocols •Blutooth SDP •SLP (IETF RFC2608) •Jini (http://www.jini.org ) •Salutation (http://www.salutation.org ) •UPnP (http://www.upnp.org ) •JXTA (http://www.jxta.org ) Middleware in MANET (KRNET2004) Comparison of Existing Service Discovery Protocols SLP2 JINI Salutation UPnP Bluetooth SDP (main) developer IETF Sun Salutation consortium Microsoft Microsoft + Intel Network transport TCP/IP Independent Independent TCP/IP Bluetooth OS & platform dependent Independent Independent dependent Independent Programming language Independent java Independent Independent Independent Attributes searchable yes yes yes no yes Service cache manager optional optional mandatory no no scoping scopes groups no no Not necessary characteristics Very lightweight Code mobility, java integration Network independence, service access Focus on hardware High integration Qualification for ad hoc - + + - + integration - + - - ++ scalability + + + - -- Michael Dyrna , Peer2peer Network Service Discovery for Ad-hoc Networks Hauptseminar im Wintersemester 2003 / 2004 11.12.2003 Middleware in MANET (KRNET2004) Bluetooth: Piconets for wireless devices z Low-power, short-ranger(10meter), wireless ratio system z 2.4GHz ISM (Industrial Scientific and Medical) band z Supports Isochronous and asynchronous service z Bluetooth devices can form ad hoc network called piconets. z States ▬ ▬ ▬ ▬ ▬ standby – conserving power & waiting to connect inquire – searching for nearby Bluetooth devices page – connecting to another Bluetooth device. connected – connected to another Bluetooth device hold & park – participating in a piconet Middleware in MANET (KRNET2004) Bluetooth SDP (Service discovery protocol) SDP uses a request/response mode Request PDU (Protocol Data Unit) - Response PDU Bluetooth L2CAP transport protocol SDP provides a simple API for enumerating the devices in range and browsing available services z SDP server contains Service records (service attribute, service class) z z z z Client application uses API to search for available services Client application Server Application SDP requests SDP SDP Client Client SDP responses Middleware in MANET (KRNET2004) SDP SDP Server Server SLP Overview z SLP is natural and now standardized scheme for find services z Service Location is one of the next big problem areas for mobile computing z Implementation and deployment can be very simple or much more sophisticated z SLP provides a dynamic configuration mechanism for applications in LAN z User Agent (UA) : application ask for service z Service Agent (SA) : provide service, advertises service handles containing the necessary locator information. z Directory Agent (DA) : centralized repository for advertised service. z SLP allows 9 Clients to find Servers by type and desired attributes 9 Service to advertise themselves 9 Scope to organize services using arbitrary polices Middleware in MANET (KRNET2004) SLP Agent Model Directory Directory Agent Agent Service Service Agent Agent Corporate Corporate intranet intranet DHCP DHCP Middleware in MANET (KRNET2004) User User Agent Agent Interactions among DA, UA and SA Client Service Service Request (Multicast) UA SA Service Reply Se R e rvi qu ce es t Se rv ic e Re e c i rv ster e S gi Re pl y DA DA ce i rv e S Middleware in MANET (KRNET2004) e g ed l w o kn c A URLs used with Service Location General form “service:”<srctype>”://”<addrspec> addrspec – DNS, IP (ex) “service:tftp://myhost” “service:tftp://bad.glad.org:8080” “service:printer://hostname” “service:lpr://motels.eng.sum.com/MPK15-214 Middleware in MANET (KRNET2004) SLP Message Type Version Function Length, contd. O F R Length reserved Next Ext offset Next Extension offset, contd. XID Language Tag Length Language Tag Length – entire SLP message O(overflow) – is set when a message’s length exceeds F(Fresh) – is set on every new SrvReg R(request multicast) - is set when multicasting or broadcasting request. XID is set to a unique value for each unique request Middleware in MANET (KRNET2004) Jini: Mobile Java Code z Jini is a service discovery and advertisement system. z Platform independence z Required each device either to run a java virtual machine (JVM) or to associated itself with a device. z Consist of services, lookup servers that catalog available services, and Clients that require services. z Lookup server : multicast announcement protocol z Services or client : multicast request protocol z Java’s security model (digital certificate, encryption) Middleware in MANET (KRNET2004) Operation of Jini Lookup server Client Lookup table Service Java code (proxy) register() method : ServiceItem ServiceRegistration loopkup() method :ServiceTemplate ServiceMatches Middleware in MANET (KRNET2004) Operation of Jini (II) Lookup Service Lookup Service Service object Service attributes Service object Service attributes Client (1) Service provider Service object Service attributes A service provider register a service object and its service attributes with the lookup service Client (2) Service provider Service object A client requests a service from service attributes, and a copy of the service object moves to the client Middleware in MANET (KRNET2004) Salutation: a Network independent architecture z An architecture for service discovery z Salutation consortium (IBM, HP, Sun, Cisco, ..) ▬ Goal : build a royalty-free architecture for service & discovery that is independent of a particular network transport. z Services ▬ Printing, faxing, document storage,.. z Salutation manager ▬ Service broker ▬ helps clients finds needed service & let services registers their availability. It role similar to lookup servers in Jini, it can also manager the connection between clients and services. z Transport manager ▬ provides reliable communication channels, regardless of the underlying network transport. Middleware in MANET (KRNET2004) Salutation Operation Service Service slmRegisterCapabilityes() Service slmUnregisterCapabilityes() Client query Client slmSeaechCapabilityes() Salutation manager protocol SLM-API SLM-API Salutation manager Salutation manager RPC (remote procedure call) SLM-TI SLM-TI Transport manager Implementation : IP & IrDA Transport manager z Provides a transport-independent interface to server and client application. This interface (SLM-API) includes service registration, service discovery and service access function. z SLM-TI between the Salutation manager and Transport manager achieves communication protocol independence in the Salutation architecture Middleware in MANET (KRNET2004) UPnP z Supported by the UPnP Forum, headed Microsoft. z UPnP aims to standardize the protocols used by devices to communicate using XML. z UPnP’s device model is hierarchical. Discovery Server Control point (Client) Application command Rehydrator Presentation Server Service The discovery server sends the URL for the device’s description document in response to the client’s multicast message The control point generates the service control protocol from information in the description document SCP Middleware in MANET (KRNET2004) UPnP Stack UPnP Vendor UPnP Forum UPnP device architecture HTTPMU HTTPU (unicast) SSDP GENA SSDP UDP HTTP SOAP GENA HTTP TCP IP GENA : General Event Notification Architecture SOAP : Simple Object Access Protocol SSDP : Simple Service Discovery Protocol UDPs : User Datagram packets Middleware in MANET (KRNET2004) UPnP Service Discovery z UPnP Service Discovery ▬ Use SSDP (Simple Service Discovery Protocol) ▬ Î HTTP over multicast (HTTPMU) and Unicast UDP (HYYPU) z Using XML to describe device feature and capabilities. z SOAP(simple object access protocol) object and URL in XML format z Automatic configuration of IP Middleware in MANET (KRNET2004) JXTA z JXTA is a platform for developing a P2P network. z JXTA Virtual Network Middleware in MANET (KRNET2004) JXTA Protocol Stack Middleware in MANET (KRNET2004) JXTA v2.0 Protocols Specification z http://www.jxta.org z http://spec.jxta.org/v1.0/docbook/JXTAProtocols.html ▬ The name is short for juxtapose (tr. v.To place side by side, especially for comparison or contrast ) ▬ peer to peer is juxtapose to client server or Web based computing z Defines a suite of six XML-based protocols that standardize the manner in which peers self-organize into peergroups, publish and discover peer resources, communicate, and monitor each other. z The Endpoint Routing Protocol (ERP) ▬ the protocol by which a peer can discover a route (sequence of hops) to send a message to another peer potentially traversing firewalls and NATs. z The Rendezvous Protocol (RVP) ▬ used for propagating a message within a peergroup. z The Peer Resolver Protocol (PRP) ▬ the protocol used to send a generic query to one or more peers, and receive a response (or multiple responses) to the query. z The Peer Discovery Protocol (PDP) ▬ used to publish and discover resource advertisements. z The Peer Information Protocol (PIP) ▬ the protocol by which a peer may obtain status information about another peers. z The Pipe Binding Protocol (PBP) ▬ the protocol by which a peer can establish a virtual communication channel or pipe between one or more peers. Middleware in MANET (KRNET2004) JXTA Advertisement and Discovery z JXTA Advertisement ▬ An advertisement is a structured representation of a JXTA entity (peer, peer-group, endpoint, message, pipe), service, or resource on a node ▬ Example of advertisement for a resource: {Type: resource, resource-name: mysong.mp3, resource-type: mp3audio, resource-location: someaddr, resource-file-size: 3.2MB} ▬ The response to a resource query in a JXTA P2P network is one or more advertisements ▬ All user-level JXTA messages are advertisements z JXTA supports three types of node discovery ▬ ▬ ▬ ▬ No discovery Direct discovery Indirect discovery (Last two are together called active discovery protocols) Middleware in MANET (KRNET2004) JXTA No Discovery Protocol z Newly joined node does not send out ping advertisement z Newly joined node only accesses a cache (similar to a lookup service) to get addresses of existing nodes z Napster uses this protocol Address Server (contains advertisements with addresses of existing nodes) 1. Send an advertisement requesting addresses of existing nodes 2. Respond with advertisements of addresses from existing nodes Newly joining node Middleware in MANET (KRNET2004) JXTA No Discovery Protocol Issues z Advantages ▬ Simple ▬ Creates less traffic since there is no flooding z Disadvantages ▬ Addresses-advertisements returned by address server might be stale (The nodes that earlier made those advertisements might have already left the network) ▬ Solution: Cache uses an aging mechanism for address-advertisements. Old advertisements are expired. ▬ Aging schemes: tag with expiry date, FIFO stack Middleware in MANET (KRNET2004) JXTA Active Discovery Protocols z Direct Discovery ▬ Same protocol as on slide 3 ▬ Decrement a time-to-live (TTL) field on ping advertisement to prevent loops ▬ Does not work across firewalls z Indirect Discovery ▬ Same protocol as on slide 3 ▬ Uses rendezvous/router peer to discover nodes outside firewall ▬ How does a new node find a rendezvous/router peer? Answer: Use cache (address server). Middleware in MANET (KRNET2004) JXTA for Wireless Networks z JXTA for J2ME™ ▬ Extending the Reach of Wireless With JXTA Technology ▬ http://www.jxta.org/project/www/docs/JXTA4J2ME.pdf ▬ http://www.jxta.org/docs/jxta-dht.pdf ▬ Design Goals ¾ ¾ ¾ ¾ ¾ ¾ . Be interoperable with JXTA on desktops and workstations . Provide a P2P infrastructure for small devices . Be simple and easy to use by developers . Be small enough to be used with cellular phones and PDAs . Allow the creation of applications that provide a good user experience . Be MIDP-1.0 compliant ▬ JXTA for J2ME peers can only act as edge peers. ▬ Introduce JXTA Relay (Proxy relay) Middleware in MANET (KRNET2004) Proem: Mobile Peer-to-Peer Platform z Peer-to-Peer Computing ▬ Any relationship in which multiple, autonomous hosts interact as equals ▬ Characteristics of Wired Peer-to-Peer Environment ¾ Ease of interconnection, Expansion of bandwidth, Wealth of cycles ¾ Æ Napster(, Gnutella(Decentralized Peer-to-Peer Search), Freenet, Groove ▬ Characteristics of Mobile Peer-to-Peer Environment ¾ Opposite to the wired case ¾ Æ Proem z Proem ▬ ▬ ▬ ▬ ▬ http://www.cs.uoregon.edu/research/wearables/Papers/p2p2001.pdf Use the decentralized search like Gnutella Focuses on collaboration of peers (like mobile groupware) Designed for highly dynamic environments of MANET Major Services ¾ ¾ ¾ ¾ ¾ Presence manager (peer discovery) Dataspace manager (Persistent storage of data spaces) Community manager (peer’s membership management) Peer database Event bus Middleware in MANET (KRNET2004) Service Discovery in MANET Middleware in MANET (KRNET2004) Requirement of Middleware in MANET Decentralized approach Lightweight for implementation Minimize the flooding of the service request message Obtain service location information using passive approach & active approach z Fast turn around time for service reply massage z z z z Middleware in MANET (KRNET2004) Caching Mechansim Approach z S. Motegi et. al.,“Service Discovery for Wireless Ad Hoc Networks,” The 5th International Symposium on Wireless Personal Multimedia Communications, 2002 z Multi hop wireless MANET : infrastructureless (no fixed routers, nodes & base stations) z Service discovery method ▬ Service Location Protocol (SLP), Salutation, and Jini : fixed infrastructure network ▬ Use centralized nodes that store configuration information (IP address, URL, attributes etc.) of the services. : centralized approach z Service discovery in MANET ▬ decentralized approach ▬ client broadcast/multicast : expensive process ▬ Minimize spreading of broadcast messages (service request msg, service reply msg) by using a caching mechanism z Caching mechanism ▬ Intermediate nodes respond with configuration information on services from cache. ▬ Do not rebroadcast the request messages. ▬ Potential drawback : lowering the number of discoverable services Middleware in MANET (KRNET2004) Caching Mechanism Approach II z Reduced SrvRqst z Intermediate nodes respond with a SrvRply z Disadvantage: Lowering the number of discoverable services (11) SrvrRqst S1 Cache Cache (12) Srvrply S1 S1 (3) S1 (8) (6) (3) C2 N1 (4) N2 (7) (1) S1 (5) (9) SrvRqst (1) C1 S2 SrvRply (2) C2 can not discover S2 because C2 received SrvRply which contains just one configuration of S1. Middleware in MANET (KRNET2004) Using Multicast for Service Advertisement z L. Cheng, Workshop on Ad Hoc communications and collaboration in ubiquitous computing environments, ACM 2002 conference, New Orleans, USA, November 16-20, 2002 z Lightweight service advertisement and discovery protocol for MANET z Based on ODMRP (On-demand Multicast Routing Protocol) z Service advertisement & discovery information is piggybacked ODMRP routing control packets. z Bootstrapping mechanism (push model) z Query/reply mechanism (pull model) Middleware in MANET (KRNET2004) Service Discovery in MANET z Multicast is used for service discovery in MANET. ▬ Broadcast nature of wireless communication environment ▬ Infrastructureless feature of MANET ▬ One-to-many character of service advertisement & discovery z Multicast protocol for MANET ▬ AMRoute (Ad Hoc multicast routing) ▬ ODMRP (On-Demand Multicast routing protocol) ▬ Î very effective and efficient in most simulation scenarios compare to other ▬ AMRIS (Ad Hoc multicast protocol utilizing increasing idnumbers) ▬ CAMP (core-assisted mesh protocol) ▬ flooding Middleware in MANET (KRNET2004) Service Location Protocol Overhead in the Random Graph Model for Ad Hoc Networks z Hend Koubaa, Eric Fleury, Proceedings of the Seventh international Symposium on computers and communications (ISCC’02) z Mediator Approach ▬ MANET can be viewed as a set of cluster. ▬ Mediator must allow services to be declared without having recourse to broadcast and must allow a client to search for services in their local area. ▬ Provider : a cluster-head of its cluster, each provider periodically declares its identity and its services to all its neighbors. ▬ Problem : election Mediator & provider, traffic concentration to the Mediator Middleware in MANET (KRNET2004) Mediator Approach M1 P1 M3, P5 P2 M2 P4 M4,P6 M5 Mediator Provider Middleware in MANET (KRNET2004) P3 Requirement of SLP on MANET z z z z Decentralized approach Lightweight for implementation Minimized flooding the service request message Obtained service location information using passive approach & active approach z Fasted turn around time for service reply massage Î Consist of only SA and UA, DA is no need Î SA broadcast its service information within n hop Î Every mobile node caching the SA’s service information Middleware in MANET (KRNET2004) SLP on MANET Registered RegisteredSA SAlist list DA DA(Directory (Directory Agent) Agent) (2) Finding a service (1) Service registration (3) Response (URL) UA UA(User (User Agent) Agent) (4) Request service SA SA(Service (Service Agent) Agent) Printer Middleware in MANET (KRNET2004) Proposed Service Discovery Architecture zH.G. Seo and K.H. Kim, “Mobility Agent Advertisement Mechanism for Supporting Mobile IP in Ad Hoc Networks”, LNCS (to be published) DA Sports News service Service register Local network (2-3) Service Print service Co_workin g Service register MDA (1-1)VOD Service request (2-1)Print Service request (1-2) Service reply (1-3) Service UA 1 VOD service Servic e registe r GIS service Middleware in MANET (KRNET2004) (2-2)Service reply UA 2 원하는 서비스가 같은 MANET 에 있을 경우 경로 생성 과정 DHCP DA MSA4 Local network MDA MSA3 (1)SrvRqst : VOD service (2)SrvRply : MSA2 MN1 (3)Route request to MSA2 MN2 MN3 MN4 MSA1 MP3 service MN5 MN6 MSA2 VOD service MN7 Middleware in MANET (KRNET2004) (4)Route reply & route establishment 원하는 서비스가 다른 외부 네트워크에 있을 경우 DHCP DA MSA4 Local network (2)SrvRqst :co_working (4)Route establishment MDA MSA3 Print service (1)SrvRqst : print service MN1 (3)SrvRplyMN2 MN3 MN4 MSA1 MP3 service MN5 MN6 MSA2 MN7 Middleware in MANET (KRNET2004) Conclusions z Survey of existing service discovery protocols • • • • • • Blutooth SDP SLP (IETF RFC2608) Jini (http://www.jini.org ) Salutation (http://www.salutation.org ) UPnP (http://www.upnp.org ) JXTA z Service advertisement and discovery mechanisms in Ad Hoc networks z Proposed service discovery mechanism in MANET Middleware in MANET (KRNET2004) References z z z z z z z z z z z z z z z z T.Plagemann et al., “Towards Middleware Services for Mobile Ad-hoc Network Applications,” Proceedings of the Ninth IEEE Workshop on Future Trends of Distributed Computing Systems(FTDCS’03) M. Avvenuti et al., “Core Services in a Middleware for Mobile Ad Hoc Networks, FTDCS’03 M. Dyrna, Peer2peer Network Service Discovery for Ad-hoc Networks Hauptseminar im Wintersemester 2003 / 2004 http://www.jxta.org http://spec.jxta.org/v1.0/docbook/JXTAProtocols.html http://www.jxta.org/project/www/docs/JXTA4J2ME.pdf M. Bisignano et al., Expeerience: a Jxta middleware for mobile ad-hoc networks, Proceedings of the Third International Conference on Peer-to-Peer Computing (P2P’03) P. Engelstad et al., Service Discovery and Name Resolution Architectures for On-Demand MANETs, 23rd International Conference on Distributed Computing Systems Workshops (ICDCSW'03) May 19 - 22, 2003 Providence, Rhode Island, USA http://www.jxta.org/docs/jxta-dht.pdf http://www.cs.uoregon.edu/research/wearables/Papers/p2p2001.pdf G. Guichal and C-K Toh, An Evaluation of Centralized and Distributed Service Location Protocols for Pervasive Wireless Networks, “ Guichal, G.; Toh, C.-K., An evaluation of centralized and distributed service location protocols for pervasive wireless networks, Personal, Indoor and Mobile Radio Communications, 2001 12th IEEE International Symposium on , Volume: 2 , 30 Sept.-3 Oct. 2001, Pages:E-55 - E-61 vol.2 S. Motegi et al.,“Service Discovery for Wireless Ad Hoc Networks,” The 5th International Symposium on Wireless Personal Multimedia Communications, 2002 L. Cheng, Service Advertisement and Discovery in Mobile Ad hoc Networks, Workshop on Ad Hoc communications and collaboration in ubiquitous computing environments, ACM 2002 conference, New Orleans, USA, November 16-20, 2002 Hend Koubaa and Eric Fleury, Service Location Protocol Overhead in the Random Graph Model for Ad Hoc Networks, Proceedings of the Seventh international Symposium on computers and communications (ISCC’02) H.G. Seo and K.H. Kim, “Mobility Agent Advertisement Mechanism for Supporting Mobile IP in Ad Hoc Networks”, LNCS (to be published) Middleware in MANET (KRNET2004)