Service discovery i ad hoc etworks Mohammed Haddad ad Hamamache Kheddouci Laboratoire PRISMa - Uiversité Claude Berard Lyo, Bât. 7, 843, Bd. du ov. 98, 69622 Villeurbae Cedex Abstract. Various researches treatig of the commuicatio protocols try to defie a certai orgaizatio over the etwork to improve its geeral behavior. The cocept of service is frequetly used as a abstractio of software ad hardware resources. Service discovery offers service advertisemet ad locatio mechaisms. So, it represets a major challege i highly dyamic etworks. I this paper, we preset a ew service discovery protocol for ad hoc etwork. This protocol, first, costructs ad maitais a adapted dyamic virtual topology, the, it achieves service discovery o it. We propose a ew costructio method for the topology. This method is fully distributed ad based o the cocepts of idepedet sets ad cliques. Also, we propose the itroductio of various mechaisms allowig the improvemet of service discovery. I additio, our protocol was simulated o NS-2. Key words: ad hoc etworks, service discovery, dyamic virtual topologies.. Itroductio A challegig research area i computer etworks is Ad hoc etworks (or MANETs: Multihop Ad hoc NETworks). These are defied to be spotaeous ad totally autoomous etworks. Nodes ca move radomly ad so, etwork coectivity may chage frequetly. Various commuicatios protocols such as the routig, the resource sharig, the service discovery, mobility predictio etc. uses the floodig to broadcast or gather iformatio. For this reaso, recet works try to optimize these exchages of data flows. Ideed, various researches treatig of the commuicatios protocols try to defie a certai orgaizatio over the etwork. Differet protocols of routig, resource allocatio ad maagemet etc. use the cocept of virtual dyamic topology to improve the geeral behavior of the etwork. Ideed, if the various exchages of data flows are doe via a adapted virtual topology, the total performace of the etwork may icrease cosiderably. I additio, the cocept of service is used as abstractio of the resources (software or hardware). The service discovery offerig of the mechaisms of publicatio ad localizatio represets a major problem which must be solved to succeed i implemetig very dyamic etworks such as the ad hoc etworks. The majority of the service discovery protocols are based o the Cliet/Server paradigm. I this last, the Cliets ca sed their requests i a reactive way (Pull model) or ca remai, proactively, listeig to the advertisemets of the geerated services (Push model). I these two models, the adopted approach is decetralized. Salutatio [] ad UPP [2] use this approach. A alterative scheme would imply a cetral directory which would have the resposibility of idex all the services preset i the etwork. Protocols like Jii [3] ad SLP [4] specify the presece of such a server. However, these various protocols caot be directly applied i dyamic eviromets such as the ad hoc etworks. For that, several protocols were proposed: Allia [5], GSD [6] ad Koark [7] offer solutios holdig ito accout the peep to peer ature of the ad hoc etworks. The protocol of Kozat et al. [8] defies a mesh structure based o the cocept of domiat sets. The protocol of Leders et al. [9] uses a electrostatic modelig of the services i order to illustrate their availability. We studied the whole of works beig based o dyamic virtual topologies. We classified them i two great families. The first gathers the techiques basig o coverig odes which seek to build a virtual support of commuicatio (virtual backboe). The secod gathers the techiques seekig to miimize the umber of liks used i commuicatio. I this paper, we preset a ew protocol of service discovery for the mobile ad hoc etworks which is based o a mixed topology. This topology aims at combiig the advatages offered by the two classes of topologies (to miimize the umber of participatig odes i topology as well as the umber of used liks). The protocol thus proposed builds ad maitais, iitially, a adapted virtual dyamic topology the achieves the service discovery itself via the latter. 2. Our Solutio I our approach, we traslate the fact of idexig the services to a problem of cover i.e to fid a subset such as if each oe of its odes kew oly the services offered i its eighborhood, the uio of collected iformatio would iclude all the services of the etwork. From the service discovery poit of view, this subset plays the part of a distributed directory o the etwork. As, we admit as i additio to its property of cover, the iduced subgraph of the - -
subset must be coected. Ideed, that is ecessary to esure a lower cost itra-directory commuicatio, to esure access ad exchage of iformatio (gradually betwee direct eighbors) ad to balace the loads i the etwork. For that, we propose the adoptio of the cocept of coected domiatig sets (CDS). These odes will have the resposibility to record ad seek the services. Each ode of the etwork will have at least a ode of the CDS i its eighborhood. The odes of the CDS form, betwee them, a peer to peer etwork. They maitai local caches which are useful, maily, to record iformatio cocerig the services. The sectios which follow preset the detailed operatio of the protocol. 2.. Costructio ad maiteace of the virtual topology (b) (c) (d) Virtual lik Itermediate ode Elected coector ode Dyamic virtual topology cosists of a coected domiatig set. To build it we choose a rather traditioal approach. The latter seeks, iitially, to determie a Maximal Idepedet Set (MIS) the to iter-coect it. However, the pricipal difficulty i our problem is that this costructio must be doe by miimizig the umber of coectors ad i distributed way. Costructio is doe as follows (see Figure ): a) Choose a subset which forms a MIS. b) Form the 3-closure (to add virtual liks betwee ay pair of remote odes withi two or three hops oe from the other) of the graph modelig the etwork (but we do this oly for the iduced subgraph by the MIS odes). c) Regroup MIS odes ito cliques i the 3- closure. d) Fid a miimal core of coectors for each clique i the 3-closure. e) The uio of the MIS odes ad the coectors thus selected forms the CDS. (a) Amog the whole of itermediate odes formig the virtual liks (routes) betwee the MIS odes, we choose oly some which will be eough to avoid, as possible, the presece of redudat routes. (e) Figure : Virtual topology costructio. To select the MIS, we privilege the odes which cover the most eighbors. Iitially, all the odes are regarded as potetially idepedet. A ode remais idepedet oly if it has a maximum degree amog its idepedet eighbors (Step a). I the case of equality, we use a rule to decide betwee the eighbors who are i coflict. The latter ca be based o the idetifiers of the odes. I the phase of itercoectio of the MIS odes, we rest o the priciple that the distace betwee two complemetary partitios of the MIS is 3 hops at maximum. I order to reduce the size of the built CDS, we proposed a optimizatio which reduces the umber of coector odes. Each ode ot belogig to the MIS is regarded as potetially coector. We cosider the virtual liks formed by the 3-closure of the graph modelig the etwork, i particular those relatig to the MIS odes (Step b). We regroup these odes ito cliques i the 3-closure. It is importat to ote that ay distributed algorithm of maximal cliques determiatio ca be used (Step c). At this stage, it is a questio of fidig a core of coectors for each clique i the 3-closure (Step d). This last must guaratee the coexity of the odes of cliques i the 3-closure. Oly oe MIS ode by clique is elected to select the itermediate odes which will joi the CDS. I the phase of maiteace of topology, we privilege the maiteace of MIS because these odes form lad marks i the topology. The maiteace of coectios betwee these lad marks is the performed. The same rule by which we select the MIS - 2 -
odes, maitais it i time. Ideed, if two or several idepedet odes are foud i the same locality, oly oe of them remais idepedet ad the others lose this privilege. If, o the cotrary, a ode is foud without ay eighbor who domiates it the it proposes itself for becomig idepedet. I additio, a coector ot receivig coectio messages, lastig certai time duratio, leaves the CDS. This mechaism is implemeted to offer a certai latecy which is useful durig the data exchages of service discovery. Let G = (V, E) be the graph modelig the etwork. We defie as beig the maximum degree i the graph ad MIS the maximum degree i the graph of 3-closure iduced by the MIS odes. O the level of each ode, the steps (a) ad (b) are doe out of O( 3 ), the step (c) is doe out of O( MIS ²), it is the same for the stage (D). 2.2 Service Discovery Peers: servers/cliets Service discovery protocol Dyamic topology CDS MAC layer LL Physical layer () Recordig message Directory Aget Recordig Peer (2) Requestig Peer Requestig Message Others (3) Figure 2: Architecture ad mechaisms of service discovery. The figure 2. illustrates the total architecture which we propose for our protocol of service discovery. The lik layer is resposible for the hello messages ad the eighborhood tables (tables used by the upper layer). The dyamic topology layer offers the access to the distributed directory ad esures that each ode is, at most, withi oe hop of this last. The service discovery layer receives the recordigs of the services, the requests ad the replies. These messages are coveyed via the topology. With each ode of the CDS a directory aget (or DA) is associated. The directory agets form betwee them a peer to peer etwork which esures the correct operatio of all the mechaisms of service discovery. A peer watig to make available oe of its services, must register it. For that, it chooses a directory aget (local or eighbor, iformatio provided by the topology layer) the seds a registerig message to it (see Figure 2.2). By receivig this message, the cocered aget saves the iscriptio i its services cache. I additio ad because of dyamic ature of ad hoc etworks, the directory agets do ot tolerate a service registratio whose lifetime is higher tha a certai value TTLmax (maximum Time to live). This value represets a refresh timer (for example, if a service has lifetime equivalet to four times the refresh timer, the the service will have to be registered oce ad to be refreshed three times). I order to optimize its services re-registratios, a server calculates a umber of hops (radius of the cocered locality). This last relates to the umber of service access durig the previous refresh timer. I fact, more a service is requested, more it should be diffused o the etwork. A peer seekig access to a service chooses a directory aget (local or eighbor) the asks it. The aget thus chose is regarded as the oe i charge for this request. At receivig the latter, the aget cosults its cache of services. I the case where desired iformatio is ot available locally, the aget diffuses that request o the backboe (liks i clear gray i Figure 2.3). So, to optimize this diffusio, the aget calculates a research radius from the cache of requests without replies. Ideed, if aother ode has previously formulated a similar request, the there would be strog chaces that iformatio is preset i its locality. Itermediate agets receivig requests havig a ifiite research radius, ca try to calculate a local radius. However, the aget resposible for the request egages a timer. At the ed of this timer, if o reply has bee obtaied, it geerates aother type of request message which will ot be limited i hops. This last esures the request diffusio o all the backboe. If after a certai time, o reply arrived, the aget aswers its cliet by o-presece of requested service. The replies are routed accordig to the opposite directio of routes take by the requests. If a ode hostig a directory aget leaves the backboe (CDS), it must try to trasfer its caches to aother CDS ode (for this reaso, at the phase of topology maiteace, we let sped a certai latecy time before a ode leaves the CDS). To achieve this treatmet, the ode privileges its "substitute" eighbors. We defie these odes as beig the odes which recetly joied the CDS. The reaso of this choice is that these odes have a great chace to ot hold much iformatio. Therefore, each ode of the CDS maitais a list of eighbors thus defied. - 3 -
State chages Hops per Reply Hello Cycles CDS Ratio 2.3 Protocol Simulatio I this sectio, we evaluate the performace of our implemetatio with a etwork simulator. Two mai aspects are evaluated. We look at topology layer performace by varyig etwork desity ad mobility, the, the behavior of service discovery mechaisms which ru over the topology. Let G = (V, E) be the graph, o order V = N, modelig the etwork. Let A x (t) be the average of the distaces separatig a ode x from all the other odes at the time t ( is the umber of odes). Let M X be the average mobility of a ode x durig the simulatio (i the followig formula t represets the step of calculatio) Ax( t) Dist( x, i) i T t Mx Ax( t t) Ax( t) T t t So, average mobility is: Mob Mi i For our simulatios, we proposed three values of mobility:, 3.5 ad 7. These lasts correspod respectively to low, medium ad high mobility. So to evaluate the impact of the mobility of the odes o topology, we propose to measure the umber of state chages of a ode (state of the ode = i backboe or out of backboe) accordig to mobility. 6 4 2 8 6 4 2 2 4 6 8 Mobility Figure 3: Mobility impact More mobility icreases more the umber of state chages per ode icreases. The graph shows that this icrease is liear. The pricipal goal of our dyamic topology is to offer, to each ode, a access poit to a backboe icludig all iformatio of service discovery. The graph shows the mobility impact absorbed by the virtual topology. Ideed, theses chages occur trasparetly to service discovery layer. Also, i additio to the mobility, we vary the followig parameters: - Network desity: betwee 2% ad 8% - Network odes umber: 2, 4 ad 6 odes To calculate the followig Metrics: - Backboe (CDS) odes ratio - Backboe stabilizatio time - The average umber of hops carried out per reply 5 4 3 2 6 2 3 2 8 4 % 2% 4% 6% 8% % Desity Figure 4: Backboe odes ratio % 2% 4% 6% 8% % Desity Figure 5: Stabilizatio time 2 4 6 Load Figure 6: Average hops per reply 2 4 6 2 4 6 Mob= Mob=3,5 Mob=7 The groups of Figure 4 curves are decreasig. This shows that the umber of odes belogig to backboe decrease as the desity icrease. This result is completely ormal cosiderig the way i which odes are chose. Ideed, ode s coverig capacity allows it to maximize its chaces to joi backboe. Icreasig desity ivolves reducig the umber of ecessary odes to cover the etire etwork. From the groups of curves of Figure 5, we ca ote that the umber of odes composig the etwork do ot ifluece much over the stabilizatio times. The total stabilizatio time is of twelve cycles for 2% ad 4% desity, ad the decreases gradually util reachig the value of six cycles for 8% of desity. - 4 -
Figure 6 shows that the umber of hops carried out by a reply is stable eough for various mobility levels. This umber varies betwee.5 ad 2.5 hops for all load values. This is due to diffusio of the most asked services. 3. Coclusio The first objective of this work was to give a ew solutio to service discovery problem i ad hoc etworks. I fact, i additio to kow problems of static etworks, mobile ad hoc etworks are characterized by mobility, absece of ifra-structures ad limited capacities i badwidth ad eergy... etc. This makes more difficult the desig of commuicatio ad cotrol protocols. The preseted protocol build, iitially, a virtual dyamic topology, maitais it i time the completes service discovery. The basic idea of our protocol of service discovery is based o cocept of coected domiatig sets (for their coverig ad coectio properties). The odes of the coected domiatig set (CDS) form a etwork backboe (i our case, a coected sub-etwork cotaiig all iformatio cocerig the services). These odes will have the resposibility to register ad seek the services. Each ode will have at least oe CDS ode i its eighborhood. For ay operatio cocerig the services, a ode chooses a CDS ode to represet it i the backboe. For the topology costructio, we propose a origial method. This method is completely distributed ad based o the cocepts of idepedet sets ad cliques. Also, we proposed the itroductio of various mechaisms allowig the improvemet of service discovery (to wide the diffusio of the most asked services, to seek the services where they were recetly asked... etc.). The protocol esures symmetry of the roles played by the differet odes. Ideed, all the odes are able, at various momets, to joi or leave the CDS. Also, all odes ca be servers ad/or cliets ad, therefore, form a peer to peer etwork. The use of dyamic virtual topology makes service discovery easier. Ideed, it is just eough to reach the backboe. The services declaratio ad locatio are doe gradually o the backboe. The fact that a ode ca be covered by several backboe odes offers some robustess ad decreases collisio risks. The CDS quality ca oly improve the service discovery. The suggested approach remais compatible with commuicatio ad service pilotig techiques used i the directory orieted protocols such as: Jii, SLP... etc. mobility. The umber of odes formig the backboe is rather weak ad this for differet etwork desities ad sizes. The stabilizatio times are also reasoable. Number of hops carried out by a reply is relatively weak. Amog the prospects for our work, thorough simulatios are cosidered. It would be iterestig to evaluate the protocol i greater scale dyamic eviromets. Thus, a compariso with the other existig protocols of service discovery for the mobile ad hoc etworks, would allow a better evaluatio of our protocol. I additio, we estimate that the itegratio of odes eergy cosumptio i their domiace ad coectio factors would allow a better load balacig betwee odes. Refereces [] Salutatio Architecture Specificatio Versio 2., the Salutatio Cosortium, 999. [2] Uderstadig Uiversal Plug ad Play White Paper, Microsoft Corporatio, Jue 2. [3] Jii Architecture Specificatio, Su Microsystems, Jue 23. [4] Erik Guttma, The Service Locatio Protocol, IEEE Iteret Computig July 999. [5] O. Ratsimor, D. Chakraborty, S. Tolia, D. Kushraj, A. Kujithapatham, G. Gupta, A. Joshi, T. Fii, Allia: Alliace-based Service Discovery for Ad-Hoc Eviromets, Secod ACM Iteratioal Workshop o Mobile Commerce, i cojuctio with Mobicom 22, Sep 28, 22, Atlata GA, USA. [6] D. Chakraborty, A. Joshi, GSD: A Novel Groupbased Service Discovery Protocol for MANETS, 4th IEEE Coferece o MWCN. Stockholm. Swede. September 22. [7] S. Helal, N. Desai, V. Verma ad C. Lee, Koark--A Service Discovery ad Delivery Protocol for Ad-hoc Networks, Proceedigs of the Third IEEE Coferece o WCNC, New Orleas, March 23. [8] U C. Kozat ad L Tassiulas, Service discovery i mobile ad hoc etworks: a overall perspective o architectural choices ad etwork layer support issues, Ad Hoc Networks, Volume 2, Issue, Jauary 24, Pages 23-44. [9] V. Leders, M. May., B. Platter. Service discovery i mobile ad hoc etworks: A field theoretic approach, Pervasive ad Mobile Computig (25) 343 37. Simulatio showed that our protocol gives well satisfyig results. Ideed, from differet test series, it releases a rather good adaptatio to the various costraits imposed by etwork load, desity ad - 5 -