22
Research Article A Collaborative Self-Governing Privacy-Preserving Wireless Sensor Network Architecture Based on Location Optimization for Dynamic Service Discovery in MANET Environment Cong Gao, Jianfeng Ma, and Shangwei Zhang School of Computer Science and Technology, Xidian University, Xi’an 710071, China Correspondence should be addressed to Cong Gao; [email protected] Received 2 July 2014; Revised 23 August 2014; Accepted 9 September 2014 Academic Editor: Rongbo Zhu Copyright © 2015 Cong Gao et al. is is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Due to the characteristics of a MANET, none of the existing solutions for service discovery work well in decentralized mobile environments. In this paper, we propose a collaborative self-governing privacy-preserving wireless sensor network architecture to address the issue of service discovery in MANET environment. e proposed architecture is able to dynamically adjust the working modes between directory-based and directory-less modes according to the network status of a MANET. e dynamic network status of a MANET is monitored by a wireless sensor network. Two location optimization algorithms are developed for topology control and the preservation of user location privacy. Simulation results show that the proposed architecture can greatly improve the performance of service discovery. 1. Introduction With the booming development of the Internet, more and more services are deployed on the web. Hence, the need for service discovery mechanisms is becoming increasingly urgent. Much research attention has been drawn to the designing of service discovery mechanisms. Meditskos and Bassiliades [1] developed a web service discovery framework using OWL-S advertisements. Junghans et al. [2] provided a review of formalisms for semantic web service discovery and developed distinct formalisms to describe functionalities and service requests. e proposal presented by Santhana and Balasundaram [3] employed -means clustering to address the problem of web service discovery. In addition, service discovery methods which deal with functional and nonfunc- tional properties of services were also extensively studied [4]. Some techniques for web service discovery were contributed in the form of a patent [5]. In general, the service discovery could be conducted in three styles: reactive way, proactive way, and hybrid way. In reactive way, a user node which has a need of some kind of service issues a service query. Other nodes which received the service query may answer it by issuing a service reply. e nodes which answer the service query could be a directory node, service node, or user node. In proactive way, service information is periodically advertised by service nodes. Both directory nodes and user nodes will receive the service advertisements. If a user node which has a potential need of service happens to receive an appropriate service advertisement could directly use the service information, rather than issuing a service query to search service information. Generally, the reactive way only generates network traffic when there is a need. To some degree, this leads to as less message overhead as possible. During the query process, the original service query might be forwarded by a node which is unable to answer it. In order to avoid flooding the whole network, it is necessary that a subtle time-to- live (TTL) value should be set. Here, the dilemma is that a small TTL value will limit the transmission range and then brings bad influence in the service discovery, while a large TTL value will expand the transmission range and then floods the query to a wide area. Since service nodes do not actively issue service advertisements in reactive way, both the latency and the failure rate of the service discovery are high. Similarly, the TTL value of periodic service advertisements should be cautiously selected in proactive way. Moreover, in Hindawi Publishing Corporation International Journal of Distributed Sensor Networks Volume 2015, Article ID 456146, 21 pages http://dx.doi.org/10.1155/2015/456146

Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

Research ArticleA Collaborative Self-Governing Privacy-Preserving WirelessSensor Network Architecture Based on Location Optimizationfor Dynamic Service Discovery in MANET Environment

Cong Gao Jianfeng Ma and Shangwei Zhang

School of Computer Science and Technology Xidian University Xirsquoan 710071 China

Correspondence should be addressed to Cong Gao glidergaogmailcom

Received 2 July 2014 Revised 23 August 2014 Accepted 9 September 2014

Academic Editor Rongbo Zhu

Copyright copy 2015 Cong Gao et al This is an open access article distributed under the Creative Commons Attribution Licensewhich permits unrestricted use distribution and reproduction in any medium provided the original work is properly cited

Due to the characteristics of a MANET none of the existing solutions for service discovery work well in decentralized mobileenvironments In this paper we propose a collaborative self-governing privacy-preserving wireless sensor network architectureto address the issue of service discovery in MANET environment The proposed architecture is able to dynamically adjust theworking modes between directory-based and directory-less modes according to the network status of a MANET The dynamicnetwork status of a MANET is monitored by a wireless sensor network Two location optimization algorithms are developed fortopology control and the preservation of user location privacy Simulation results show that the proposed architecture can greatlyimprove the performance of service discovery

1 Introduction

With the booming development of the Internet more andmore services are deployed on the web Hence the needfor service discovery mechanisms is becoming increasinglyurgent Much research attention has been drawn to thedesigning of service discovery mechanisms Meditskos andBassiliades [1] developed a web service discovery frameworkusing OWL-S advertisements Junghans et al [2] provideda review of formalisms for semantic web service discoveryand developed distinct formalisms to describe functionalitiesand service requestsThe proposal presented by Santhana andBalasundaram [3] employed 119896-means clustering to addressthe problem of web service discovery In addition servicediscovery methods which deal with functional and nonfunc-tional properties of services were also extensively studied [4]Some techniques for web service discovery were contributedin the form of a patent [5] In general the service discoverycould be conducted in three styles reactive way proactiveway and hybrid way In reactive way a user node whichhas a need of some kind of service issues a service queryOther nodes which received the service query may answerit by issuing a service reply The nodes which answer the

service query could be a directory node service node or usernode In proactive way service information is periodicallyadvertised by service nodes Both directory nodes and usernodes will receive the service advertisements If a user nodewhich has a potential need of service happens to receivean appropriate service advertisement could directly use theservice information rather than issuing a service query tosearch service information

Generally the reactive way only generates network trafficwhen there is a need To some degree this leads to as lessmessage overhead as possible During the query processthe original service query might be forwarded by a nodewhich is unable to answer it In order to avoid floodingthe whole network it is necessary that a subtle time-to-live (TTL) value should be set Here the dilemma is thata small TTL value will limit the transmission range andthen brings bad influence in the service discovery while alarge TTL value will expand the transmission range and thenfloods the query to a wide area Since service nodes do notactively issue service advertisements in reactive way both thelatency and the failure rate of the service discovery are highSimilarly the TTL value of periodic service advertisementsshould be cautiously selected in proactive way Moreover in

Hindawi Publishing CorporationInternational Journal of Distributed Sensor NetworksVolume 2015 Article ID 456146 21 pageshttpdxdoiorg1011552015456146

2 International Journal of Distributed Sensor Networks

order to mitigate the flooding effect caused by periodic ser-vice advertisements the frequency of service advertisementshould be elaborately tuned As service nodes periodicallyissue service advertisements no matter whether there is aneed for service information both the latency and the failurerate of the service discovery in proactive way are lowerthan that in reactive way However this in turn constantlyimposes a certain amount of message overhead on the wholenetwork As both the reactive way and the proactive way haveadvantages and disadvantages the hybrid way combines thetwo complementary ways However since disadvantages ofboth ways are introduced how to achieve a tacit cooperationof the two ways is challenging

In this paper we propose a collaborative self-governingprivacy-preserving wireless sensor network (WSN) architec-ture for dynamic service discovery in MANET environmentOur model is based on the famous Chord protocol andcould operate in both directory-based mode and directory-lessmodeTheWSNwhich consists of directory nodes greatlyfacilitates the service discovery The topology control for theWSN is conducted through local location optimization andglobal location optimizationThe location privacy of a user ispreserved based on a direction-probing algorithmused in thelocal location optimization The key function of our modelis the autonomic mode switch between the directory-basedmode and the directory-less mode

The rest of this paper is organized as follows Section 2provides the related works about service discovery architec-tures and discusses the existing problems Section 3 elab-orates our collaborative self-governing privacy-preservingservice discovery architecture In Section 4 we evaluate theproposedmodel by simulation and present a detailed analysisof the simulation results Section 5 concludes the paper andhighlights the future work

2 Review of Service Discovery Architectures

Traditionally service discovery architectures are classifiedinto two types directory-based architecture and directory-less architecture

21 Directory-Based Architecture In directory-based archi-tecture a directory structure could be implemented either incentralized manner or in distributed manner

For a centralized directory all service information isstored in the same place All services in the whole networkshould be registered with a centralized repository At thesame time the centralized repository is responsible for allservice queries Examples of centralized directory are asfollows the service location protocol (SLP) [6] suggested byIETF the Jini technology [7] developed by SunMicrosystemsthe salutation protocol [8] proposed by IBM the universalplug and play device architecture (UPnP) [9] specified byMicrosoft the Bluetooth service discovery protocol [10]presented by Bluetooth consortium the secure wide-areaservice discovery service (SDS) [11] and the intentionalnaming system (INS) [12] Generally speaking a centralizedmanner means attractive simplicity inevitable single point offailure poor scalability and weakmobility On the contrary a

distributed manner indicates certain complexity robustnessgood scalability and strong mobility Taking the characteris-tics of a MANET environment into consideration we holdthat the distributed manner is preferable Hence we omit thedetails of the above centralized directories and focus on theinstances of distributed directory

For a distributed directory the problem of wide-areaservice discovery needs to be focused on There are twoaspects to the concept of wide-area service discovery oneis the replication of service registration and the second isthe forwarding of service query Since directory agents residein various locations the service registrations they receivedare usually different Then each directory agent only knowsabout a portion of service information in the whole networkIf there is no replication scheme in a distributed directoryservice information is only locally available around the par-ticular directory agent with which it was registered Rather adistributed directory with a replication scheme enables thecommunication among directory agents By replication ofservice information each directory agent becomes aware ofall services registered in the whole network Suppose thereis a distributed directory which does not support replicationof service registration For the purpose of improving thesuccess rate of the service discovery it is reasonable that aservice query which could not be answered locally should beforwarded to another directory agentThis operation relies ona forwarding scheme provided by the distributed directoryRecently a considerable amount of work has been done onthe distributed directory Based on the organization of thedirectory agents distributed directory could be divided intofour categories backbone-based [13ndash15] cluster-based [16ndash19] DHT-based [20 21] and other distributed directories[22 23]

Kozat and Tassiulas [13] provided a virtual backbonewhich facilitates the registration and search of services Thevirtual backbone is constructed by a subset of nodes in thenetwork and these nodes compose a dominating setThoughthere is no replication scheme nodes belong to the backboneforward service queries to each other when they cannot beanswered locally However there is a flaw that the destinationof the forwarding operation is random The proposal [14]presented by Sailhan and Issarny remedied the flaw byforwarding an unsolved service query to the nodes which areexpected to possess the corresponding service informationThe selection of destination to which a service query isforwarded is based upon the exchange of profiles amongdirectory agents The protocol [15] proposed by Koubaa andFleury aimed to build a backbone which could cover allservice information in the whole network Nevertheless asonly a service provider is allowed to join the backbone it islikely that an integral backbone might be broken down intoseveral isolated parts In this case the global communicationof the backbone is cut off Consequently the disposal ofservice queries is crippled

Klein et al [16] presented a semantic overlay of hierar-chical service rings A service ring is composed of a clusterof service providers and is considered to be a directory sincethe functions of accepting service registration and answeringservice query are contributed in the form of a service ring

International Journal of Distributed Sensor Networks 3

Although replication is not supported a service ring forwardsa service query which it is unable to answer Klein andKonig-Ries [17] proposed that services are dynamically organizedinto multilayer clusters The authors make an assumptionthat there exists a common ontology which could be usedto describe the services within the whole network Uponreceiving a service query a node checks its leaf-level clusterIf the service query cannot be answered higher-level clustersare examined in the pursuit of a suitable service It is worthmentioning that nodes are clustered based on the physicalproximity and the semantic proximity [16 17] Schiele et al[18] suggested that clusters are formed according to the sim-ilarity of mobility patterns A clusterhead is always ready toanswer service queriesThe remaining nodes in a cluster go tosleep when idle Tyan andMahmoud [19] presented a servicediscovery approach which clusters the nodes according tophysical proximity A gateway of each cluster plays the roleof a directory Wide-area service discovery is feasible sincean unsolved service query could be forwarded to anothergateway

As mentioned above when a replication scheme is notpresent an unsolved service query should be forwardedto other nodes However it is not easy to determine anappropriate destination for an unsolved service query Unlikebackbone-based and cluster-based models an exciting fea-ture that the DHT-based approaches inherently possess ishash techniques which could facilitate the provision oflocation information Seada and Helmy [20] developed arendezvous-based architecture The basic idea is that thewhole network is divided geographically and each geograph-ical area is responsible for a portion of service information inthe network Service information ismapped to a geographicalarea according to a hash-table-likemapping schemeA part ofnodes within a geographical area are selected to maintain themapped information Since the hash function used by servicequery is the same as the hash function used in the mappingof service information the proper forwarding destinationof a service query could be readily obtained by a directoryagent Sivavakeesar et al [21] described a mechanism whichis similar to the approach proposed in [20] except for the factthat the mapped information is handled by all nodes withina geographical area

Other approacheswhich do not involve backbone clusteror DHT techniques are also notable Lee et al [22] presenteda service discovery and delivery protocol called KonarkThe proposed method is decentralized and targeted at aMANET environment Under a pure peer-to-peer designeach node in the network has a database which stores theservice information provided by other nodes Jeong et al[23] developed an ad hoc name service (ANS) system forIPv6 MANET to facilitate the service discovery and name-to-address resolution It is assumed that each node could beconfigured with a site-local scoped IPv6 unicast address byad hoc stateless address autoconfiguration [24 25]

22 Directory-Less Architecture As a MANET environmentis born with no infrastructure it is argued that a directory-less architecture is more appropriate than a directory-basedarchitecture [26] However there is an important distinction

between a directory-less architecture and a directory-basedarchitecture there are no directory agents in a directory-lessarchitecture Namely there are only user agents and serviceagents in the whole networkThe missing of the organizationandmaintenance for directory agents reduces the complexityof service discovery architecture user agents issue servicequeries and service agents issue service advertisementsThough service queries are generated ondemand the numberof replicates of a service query during the forwarding processcould become very large Furthermore in order to achieve adecrease in latency and an increase in service availability thenumber of service advertisements is also considerable In thiscase a pursuit of good service discovery performance mightbe prone to bring about a serious flooding problem

Much research attention has been drawn to the operationsof service queries and service advertisements Chakrabortyet al [27] proposed a group-based service discovery (GSD)protocol for pervasive environment In general the protocolconsists of two components The first component is a P2Pcaching scheme dealing with the spread of service adver-tisements A node stores the received service advertisementsin a local database called service cache A least-remaining-lifetime cache replacement policy is used to update thecache The second component is a group-based intelligentforwarding strategy for regulating the forwarding of ser-vice queries In specific an unsolved service query is justforwarded to the nodes which possess matching serviceinformationThe determination of destination nodes is basedon the information contained in the service cache The replyinfo caching enhanced flexible forward probability (RICFFP)service discovery protocol presented by Gao et al [28] alsoconsists of two parts reply info caching (RIC) and flexibleforward probability (FFP) The RIC is a technique similar tothe P2P caching scheme in [27] In particular a node couldcache the service information in a received service reply For areceived service query if there exists amatch in the cache theservice query could be answered convenientlyThe essence ofthe FFP is that the forward probability of a service query isin reverse proportion to the number of hops it has alreadytraveled Nedos et al [29] introduced an optimal forwardingmechanism for service advertisements By monitoring theneighbors a nodemerely forwards the received service adver-tisements to a part of its one-hop neighbors Therefore thebroadcasting of service advertisements is turned into severalunicasts Nidd [30] set the target application environment tosingle-hop short-range wireless systems For each node thebroadcasting of service advertisements is scheduled to takeplace at regular intervalsThe task of scheduling is performedby an exponential back-off algorithm The disseminationstrategies proposed by Campo et al [31] and Lee et al [32] aresimilar that they both cache service information containedin received service advertisements Moreover only serviceadvertisements which are not expired and have not been seenrecently are broadcasted

23 Problems As the directory-based architecture and thedirectory-less architecture are complementary hybrid archi-tecture is another option for service discovery in a MANETenvironment For a node in hybrid architecture if there

4 International Journal of Distributed Sensor Networks

is no directory agent within its radio range both serviceadvertisements and service queries are sent in the same wayof directory-less architecture Otherwise service informa-tion contained in service advertisements is registered withdirectory nodes Service queries could be answered by bothdirectory agents and service agents Though a great deal ofresearch has been done to the above three types of servicediscovery architectures it is still controversial that whichone is superior to the other two It is recognized that thedifficulty of comparison is largely due to the characteristics ofaMANET environment For instance the nodes in aMANETmight possess various degrees ofmobilityMoreover both thevelocity and themoving direction of a node are unpredictableThe regular communication among nodes in the wholenetwork should not be interrupted by the node mobilitySince a MANET is self-organized there are no constraintson the joining and leaving of a node The appearance ofa new participator or departure of an existing participatorcould bring a significant change to the network topologyAgain the communication in the whole network should notbe influenced

Considering a MANET with directory-based architec-ture the TTL value of service query should at least guaranteethat a service query could arrive at a directory node If thefrequency of service query is low the message overheadintroduced by service registration and directorymaintenanceis likely to surpass the message overhead brought in byservice advertisement with a directory-less architecture Fordirectory-less and hybrid architectures large TTL values ofboth service query and service advertisement could improvethe performance of service discovery However there is acompromise between flooding problem and performanceenhancement When there are a large number of servicequeries a directory-less architecture has to increase thenumber of service advertisements But since both servicequery and service advertisement are simply broadcasteda risk of network congestion still could not guarantee asatisfactory performance of service discovery Ververidis andPolyzos [33] pointed out that it could be useful to develop aflexible architecture which is able to adjust its parameters andworking modes between directory-based and directory-lessmodes according to the status of a MANET

3 A Collaborative Self-GoverningPrivacy-Preserving WSN Architecture forDynamic Service Discovery

31 Network Model

311 Nodes In our architecture there are three possibleroles for a mobile node service provider service requestorand service directory In order to perform the operationswhich facilitate the service discovery process the above threetypes of nodes are equipped with three key componentsservice agent (SA) user agent (UA) and directory agent(DA) respectively For the sake of simplicity in the remainderof this paper we refer to service provider nodes servicerequestor nodes and service directory nodes as SAs UAs

and DAs respectively To facilitate the presentation of ourmodel we consider aMANET consists of DAs SAs andUAsIn addition there is a WSN composed of all DAs

312 Directory Agent Each DA is a wireless sensor nodeDAs offer a place storing service information and SAs registerservice information with DAs Then DAs answer the servicequeries issued by UAs based on the service information theyhaveThe existence ofDA is to improve the effectiveness of theservice discovery architectureTheWSNconstituted by all theDAs is based on Chord [34] Chord is a scalable distributedlookup protocol which has been applied to service discovery[35ndash37] The most important operation that Chord providesis mapping a given key onto a node By consistent hashingeach data item could be associated with a unique key The⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pair is stored at the corresponding node towhich the key maps The mechanisms facilitating the joiningand leaving of node could guarantee the normal operationsof the whole network In classic sensor networks all sensornodes are scheduled to send the obtained information to asingle sink node Though this approach eases the routingwork authors of [38 39] point out that the nodes which arein vicinity of the sink node bear heavy work load of relayingAs a result the batteries of these nodes are drained out muchearlier than other nodesThus there is no sink in ourWSN ofall the DAs The status of the whole network is summarizedand presented in a monitoring token In clustered sensornetworks the principle of clusterhead rotation is studiedextensively in [40ndash42] However the election and rotationof clusterhead inevitably introduce extra overhead On thecontrary since the consistent hashing mechanism employedby Chordmaps the keys of data items uniformly the queryingprocess of service is inherently load-balanced for all the DAsThis feature also helps to avoid a quick energy exhaustion ofcertain DAs

313 Unified Service Information Management Our servicediscovery architecture employs a unified service informationmanagement scheme It is necessary that all DAs SAs andUAs which participated in the architecture are aware of thescheme In particular there is a list of properties which isused for profiling a service Each property has a number ofvalues We denote the list of properties and values by 119871 andall nodes in the network have knowledge of this list Forexample a property called scopemay indicate the applicationdomain of a service such as search engine news archiveand anonymous FTP We assume that there exists a prede-termined list of properties and the corresponding valuesTheproperties are denoted by set property = pr

1 pr2 pr

119899119901

The corresponding values of pr119894are denoted by set 119901

119894=

119901V1198941 119901V1198942 119901V

119894119898We suggest that one property consumes

one byte Then there could be 119898 = 256 different valuesfor a property Now we introduce the definition of servicedescription

Definition 1 By description of a servicewemean the characterstring desp = 119901V

1119904 119901V2119895 119901V

(119899119901minus119894)119896which is formed by

concatenating the values of 119899119901 minus 119894 properties sequentiallywhere 0 ⩽ 119894 lt 119899119901 and 1 ⩽ 119904 119895 119896 ⩽ 256 When 119894 = 0 we

International Journal of Distributed Sensor Networks 5

middot middot middot

np minus i bytes

pv1s pv2j pv(npminusi)k

Figure 1 Service description

ID URL

npbytes 32bytes 2048bytes

middot middot middotpv1s pv2j pvnpk

Figure 2 Service registration

call desp a complete description Otherwise we call desp anincomplete description

Then we know that there are totally prod119899119901

119894=1|119901119894| different

complete descriptions for profiling services The format ofservice description is shown in Figure 1

32 Directory-BasedMode In directory-basedmode all DAsin the MANET form a Chord network All nodes in theMANET are mobile SAs register their service informationwith DAs A service query issued by a UA is handled by DAs

321 Service Registration and Deregistration in WSN Forservice registration the service information submitted to aDA consists of three parts description of the service ID of theservice provider (eg company name) andURL for accessingthe service Note that only a complete service descriptioncan be used for service registration There are 32 bytes toaccommodate the ID of service provider Though the HTTPprotocol does not stipulate the maximum length of a URLwe limit it to a maximum of 2048 bytesThe format of serviceregistration is shown in Figure 2

Since theWSN is based onChordwe denote the identifierspace of the Chord network by 2119898 In order to accommodatethe totalprod119899119901

119894=1|119901119894| different complete descriptions for profiling

services the inequality 2119898 ⩾ prod119899119901

119894=1|119901119894| should be satisfied

In our model we use the SHA-1 [43] as the consistenthash function to generate keys for both DAs and services Wedenote the hash function by 119904119867119886119904ℎ(119904119905119903119894119899119892) Upon receivinga valid service registration a DA first sends a service regis-tration acknowledgment to the SA which issued the serviceregistration Then the DA extracts the description and theID parts as a character string 119904119905119903 The key of the serviceis obtained by 119896119890119910 = 119904119867119886119904ℎ(119904119905119903) The ⟨119896119890119910URL⟩ pair isthen sent to the DA which is responsible for the key An SAcould register its service information with an arbitrary DAwithin its radio range As long as an SA receives a serviceregistration acknowledgment there is no need to register theservice again If the corresponding DA becomes out of theradio range when an SA is registering a series of services

the SA could contact another DA to register the remainingservices The service deregistration is conducted in a similarway to the service registration

322 KeyGeneration and Searching inWSN In unstructuredP2P network the searching based on a keyword is feasibleHowever the consistent hashing of filename in structuredDHT prohibits such operation in Chord As a result only theapproach of exact match worksThe inverted index proposedin [44] employs the mapping of ⟨119896119890119910119908119900119903119889 119899119900119889119890⟩ Then thesearching based on a keyword is implemented by redundancystorage The major drawback of this approach is the problemof common keywords The nodes which are responsible forcommon keywords suffer from heavy burden In our modela key is generated by hashing the character string of thedescription of a service concatenated by the service providerIDThe inclusion of the service provider ID resolves the aboveproblem of common keywords

When there is a potential need of certain service severalinterested values are selected from the list 119871 by a UAThen aservice query with the same format as a service descriptionis sent to a DA Upon receiving a service query a DAfirst checks whether there are missing values for propertiesFor a complete description the DA which received theservice query simply appends the IDs of service providersknown to it and hashes the character string composed of thedescription and the ID Then the DA searches the obtainedkeys However it is very likely that values of some propertiesare missing due to uncertainty Consequently we have anincomplete description For 119894missing values each one is filledby several most popular values queried in the pastWe denotethe number of most popular values by 119899119898119901V

After the filling operation of the original incompletedescription we have 119899119898119901V complete descriptions Then theIDs of service providers known to the DA are appended tothe complete descriptions We denote the number of serviceproviders a DA is aware of by 119899119904119901 For a scenario of 119894 =

1 119899119898119901V = 3 and 119899119904119901 = 2 the filling and appendingprocess of an incomplete description is illustrated in Figure 3Since there are six character strings of the descriptionsconcatenated by the service provider IDs we could obtainsix different keys for searching The missing of propertyvalues is allowed as it provides an open search result for aUA However since the keys are generated based on serviceinformation which is wishfully created by a UA and a DAit is worth noting that both a complete description and anincomplete description are likely to yield no search resultsFor an existing service with a search key the responsible DAwill send a service reply to the original DA which issued thesearch Then the search result is fed back to the UA by theoriginal DA

323 Topology Control and Function Tuning for WSN SinceDAs are mobile in directory-based mode the mobility hasa strong impact on the topology of the WSN Moreoverthe unpredictable node failures also exert influence on thetopology of the WSN In our model the topology control forWSN consists of two parts local location optimization andglobal location optimization

6 International Journal of Distributed Sensor Networks

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

Fill Append

i = 1

i = 0

middot middot middotpv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv2k pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

nmpv = 3 nsp = 2

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pvnp1

pvnp1

pvnp2

pvnp3

pvnp2

pvnp1

pvnp3

pvnp2

pvnp3

ID1

ID1

ID1

ID2

ID2

ID2

Figure 3 Filling and appending

N1205721

1205722

1205723

1205724

1205725

1205726uarr

Figure 4 Six areas

NS1

S2

S3

S4(x0 y0) (x0 + Δx y0)

(x0 + Δx y0 + Δy)(x0 y0 + Δy)

uarr

Figure 5 Four-step movement

The local location optimization (LLO) is performedbetween a DA and the UAs which are communicating withthe DA For an individual DA we divide its 360-degree radiorange into six equal adjacent areas 119886

119894(119894 = 1 2 6) As

shown in Figure 4 the upward direction represents northThe two salient features of the local location optimization

are privacy preservation and energy conservation As a longcommunication distance requires more energy for radiotransmission it is beneficial that the communication distancebetween a DA and a UA could be shortened once they getin touch with each other In our model the result of aservice query is sent to a UA by the original DA it queriedThis procedure makes the shortening of communicationdistance even more important Since the mobile nodes areequipped with omni-directional antennas a DA has no ideaof where a UA is and therefore is unable to determine acorrect moving direction For the sake of privacy protectiona UA is unwilling to share its location in any form (egGPS coordinates) To address this problem we develop adirection-probing algorithm to determine amoving directionfor aDAAs shown inFigure 5 this algorithmcontains a four-step movement 119904

119894(119894 = 1 2 4)

Table 1 Moving direction determination

N W S E1198861

+ minus minus minus

1198862

+ minus minus +1198863

minus minus + +1198864

minus minus + minus

1198865

minus + + minus

1198866

+ + minus minus

Considering a DA whose original location is (1199090 1199100)

and a UA whose location is unknown the DA performsthe followingmovements consecutively 119904

1(119873 Δ119910) 119904

2(119864 Δ119909)

1199043(119878 Δ119910) and 119904

4(119882 Δ119909) The values of Δ119909 and Δ119910 are both

positive After a four-step movement the DA returns to itsoriginal location (119909

0 1199100) During each step the variation of

signal intensity is recorded We denote an increase and adecrease of signal intensity by + and minus respectively Thenthe moving direction of the DA is determined according toTable 1

When there are several UAs which are communicatingwith the DA the desired moving directions related todifferent UAs might be various Generally it is consideredthat the energy consumption is in direct proportion to thecommunication distance Hence in order to reduce the totalenergy consumption the sum of distances between the DAand each UA should be as small as possible Considering twoUAs 119906119886

1and 119906119886

2 the communication distances between the

two UAs and the DA are denoted by 1199031and 1199032 respectively

In addition we denote the signal intensities of the two UAsby 1199041and 1199042 respectively We make the assumption that the

signal intensity and the communication distance follow theinverse square law 119904

119894= 1205751199032

119894 where 120575 is a constant coefficient

and 119894 = 1 2 The condition of equality for 1199031+ 1199032= 2radic1199031 sdot 1199032

is 1199031= 1199032 Moreover 119903

1= 1199032is equivalent to 119904

1= 1199042 Similarly

for 119899UAs we have the condition of equality for the inequality1199031+ 1199032+ sdot sdot sdot + 119903

119899⩾ 119899 119899radic1199031 sdot 1199032 sdot sdot sdot sdot sdot 119903119899 as 1199041 = 119904

2= sdot sdot sdot = 119904

119899

Thus themoving direction of the DA is adjusted based on theidea of equalizing the signal intensities of all UAs Howeverwhen there are several UAs this equalization process couldbe complicated Alternatively we choose to synthesize the119899 moving directions determined for the 119899 UAs with weightvalues The weight values of the UAs are calculated in reverse

International Journal of Distributed Sensor Networks 7

Direction-Probing (119889119886 119906119886 [119899])(1) original signal intensity 119906119886 [119895] 119904 (0)(2) for 119894 larr 1 to 4(3) for 119895 larr 1 to 119899

(4) if 119906119886 [119895] 119904 (119894) gt 119906119886 [119895] 119904(119894 minus 1) then(5) signal variation 119906119886 [119895] V (119894) larr ldquo+rdquo(6) else signal variation 119906119886 [119895] V (119894) larr ldquominusrdquo(7) end if(8) 119904 [119895] [119894] larr 119906119886 [119895] V (119894)(9) end for(10) end for(11) for 119895 larr 1 to 119899

(12) switch (119904 [119895])

(13) case ldquo+ minus minusminusrdquo 119906119886 [119895] 119889 = 1198861break

(14) case ldquo+ minus minus+rdquo 119906119886 [119895] 119889 = 1198862break

(15) case ldquominus minus ++rdquo 119906119886 [119895] 119889 = 1198863break

(16) case ldquominus minus +minusrdquo 119906119886 [119895] 119889 = 1198864break

(17) case ldquominus + +minusrdquo 119906119886 [119895] 119889 = 1198865break

(18) case ldquo+ + minusminusrdquo 119906119886 [119895] 119889 = 1198866break

(19) end switch(20) end for(21) 119906119886

1015840[119899] = 119900119903119889119890119903 (119886119904119888119890119899119889119894119899119892 119906119886 [119899] 119906119886 [119899] 119904 (0))

(22) 119904119904119906119898 larr 0

(23) for 119895 larr 1 to 119899

(24) 119904119904119906119898 larr 119904119904119906119898 + 1199061198861015840[119895] 119904 (0)

(25) end for(26) for 119895 larr 1 to 119899

(27) 1199061198861015840[119895] 119908 = 119904119904119906119898119906119886

1015840[119895] 119904 (0)

(28) end for(29) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (119906119886

1015840[119895] 119889 119906119886

1015840[119895] 119908)

Algorithm 1 Direction-probing procedure

proportion to their signal intensities The detailed direction-probing algorithm is illustrated in Algorithm 1 Once a finalmoving direction of theDA is obtained theDA starts tomovealong the direction When the 119899 signal intensities becomeapproximately equal to each other the DA will stop movingEach time a new UA gets in touch with the DA or an existingsession is terminated a new direction-probing procedure isinitiated

The global location optimization (GLO) is performedbetween DAs and it is based on the direction-probingalgorithm described in the local location optimization Otherthan local location optimization the global location opti-mization concentrates on topology maintenance

As a DA in the WSN has a maximum transmissionrange in order to keep the connectivity of the WSNthe relative positions among the DAs should be carefullycontrolled The global connectivity of the WSN could bedecomposed into several groups of connectivity In par-ticular we develop a connectivity maintenance algorithmto maintain the local connectivity of three DAs Con-sidering an individual DA which is denoted by 119889119886 bythe Chord protocol 119889119886 has a predecessor and a suc-cessor We denote the two DAs by 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 respectively The signal intensity between 119889119886

and 119889119886119901119903119890119889119890119888119890119904119904119900119903 is denoted by 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 Thesignal intensity between 119889119886 and 119889119886119904119906119888119888119890119904119904119900119903 is denoted

Table 2 Energy statuses and descriptions

Status Description119878119899

Normal status The remaining energy is 119864(119889119886) gt 119890120572

119878119897

Low status The remaining energy is 119890120573lt 119864(119889119886) ⩽ 119890

120572

119878119886

Alert status The remaining energy is 119890120574lt 119864(119889119886) ⩽ 119890

120573

119878119904

Serious status The remaining energy is 119864(119889119886) ⩽ 119890120574

by 119889119886119904119906119888119888119890119904119904119900119903119904 When 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904keeps decreasing 119889119886 becomes aware of the fact thatits predecessorsuccessor is moving away from it Once119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904 is lower than a threshold119904low 119889119886 initiates a direction-probing procedure to determinethe direction of the predecessorsuccessor Meanwhile itsends a SLOW DOWNmessage to the predecessorsuccessorfor notification Once a moving direction is determined 119889119886starts to move toward the predecessorsuccessor in order toprevent the signal intensity from getting too low In additionthe predecessorsuccessor which receives the SLOW DOWNmessage will adjust its movement for the purpose of gettingclose to 119889119886 Once the signal intensity between 119889119886 and thepredecessorsuccessor reaches a certain level the prede-cessorsuccessor stops getting close to 119889119886 We denote thesignal intensity of this level by 119904normal Note that when both119889119886119901119903119890119889119890119888119890119904119904119900119903119904 and 119889119886119904119906119888119888119890119904119904119900119903119904 are greater than or equalto 119904normal the 119889119886 stops moving For both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 a compromise of directions might be neededIn this case a composite moving direction is used by 119889119886 Thedetailed connectivity maintenance algorithm is illustrated inAlgorithm 2 Since the energy of a DA is limited we holdthat the function of connectivitymaintenance stops when theremaining energy of a DA is critically low and this feature isindicated by the last statement of Algorithm 2 A completefunction tuning algorithm is described later

As energy conservation is a critical issue inWSN for DAsand network life we develop a function tuning algorithmbased on the remaining energy of a DA Moreover this algo-rithm also assists the topology maintenance We denote theremaining energy of 119889119886 by 119864(119889119886) In specific the remainingenergy of a DA is classified into four statuses according tothree critical values 119890

120572 119890120573 and 119890

120574 The four energy statuses

119878119899 119878119897 119878119886 and 119878

119904are detailed in Table 2

When 119889119886 is in the normal status it is fully functionalNamely it accepts service registrations handles servicequeries sends service replies performs local location opti-mization and global location optimization and so forthOnce119889119886 enters the low status it stops performing local locationoptimization When it turns into the alert status an ALERTmessage is sent to both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 Assoon as 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 receive the ALERTmessage they both stop the local location optimizationtemporarily (even when they are in the normal status)Now the three DAs 119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903

are in preparation for the future serious status of 119889119886 Once119889119886 enters the serious status it disables all functions exceptfor performing a data transfer By the Chord protocol anode which is about to leave the network should transferall the ⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pairs it is responsible for to its

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 2: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

2 International Journal of Distributed Sensor Networks

order to mitigate the flooding effect caused by periodic ser-vice advertisements the frequency of service advertisementshould be elaborately tuned As service nodes periodicallyissue service advertisements no matter whether there is aneed for service information both the latency and the failurerate of the service discovery in proactive way are lowerthan that in reactive way However this in turn constantlyimposes a certain amount of message overhead on the wholenetwork As both the reactive way and the proactive way haveadvantages and disadvantages the hybrid way combines thetwo complementary ways However since disadvantages ofboth ways are introduced how to achieve a tacit cooperationof the two ways is challenging

In this paper we propose a collaborative self-governingprivacy-preserving wireless sensor network (WSN) architec-ture for dynamic service discovery in MANET environmentOur model is based on the famous Chord protocol andcould operate in both directory-based mode and directory-lessmodeTheWSNwhich consists of directory nodes greatlyfacilitates the service discovery The topology control for theWSN is conducted through local location optimization andglobal location optimizationThe location privacy of a user ispreserved based on a direction-probing algorithmused in thelocal location optimization The key function of our modelis the autonomic mode switch between the directory-basedmode and the directory-less mode

The rest of this paper is organized as follows Section 2provides the related works about service discovery architec-tures and discusses the existing problems Section 3 elab-orates our collaborative self-governing privacy-preservingservice discovery architecture In Section 4 we evaluate theproposedmodel by simulation and present a detailed analysisof the simulation results Section 5 concludes the paper andhighlights the future work

2 Review of Service Discovery Architectures

Traditionally service discovery architectures are classifiedinto two types directory-based architecture and directory-less architecture

21 Directory-Based Architecture In directory-based archi-tecture a directory structure could be implemented either incentralized manner or in distributed manner

For a centralized directory all service information isstored in the same place All services in the whole networkshould be registered with a centralized repository At thesame time the centralized repository is responsible for allservice queries Examples of centralized directory are asfollows the service location protocol (SLP) [6] suggested byIETF the Jini technology [7] developed by SunMicrosystemsthe salutation protocol [8] proposed by IBM the universalplug and play device architecture (UPnP) [9] specified byMicrosoft the Bluetooth service discovery protocol [10]presented by Bluetooth consortium the secure wide-areaservice discovery service (SDS) [11] and the intentionalnaming system (INS) [12] Generally speaking a centralizedmanner means attractive simplicity inevitable single point offailure poor scalability and weakmobility On the contrary a

distributed manner indicates certain complexity robustnessgood scalability and strong mobility Taking the characteris-tics of a MANET environment into consideration we holdthat the distributed manner is preferable Hence we omit thedetails of the above centralized directories and focus on theinstances of distributed directory

For a distributed directory the problem of wide-areaservice discovery needs to be focused on There are twoaspects to the concept of wide-area service discovery oneis the replication of service registration and the second isthe forwarding of service query Since directory agents residein various locations the service registrations they receivedare usually different Then each directory agent only knowsabout a portion of service information in the whole networkIf there is no replication scheme in a distributed directoryservice information is only locally available around the par-ticular directory agent with which it was registered Rather adistributed directory with a replication scheme enables thecommunication among directory agents By replication ofservice information each directory agent becomes aware ofall services registered in the whole network Suppose thereis a distributed directory which does not support replicationof service registration For the purpose of improving thesuccess rate of the service discovery it is reasonable that aservice query which could not be answered locally should beforwarded to another directory agentThis operation relies ona forwarding scheme provided by the distributed directoryRecently a considerable amount of work has been done onthe distributed directory Based on the organization of thedirectory agents distributed directory could be divided intofour categories backbone-based [13ndash15] cluster-based [16ndash19] DHT-based [20 21] and other distributed directories[22 23]

Kozat and Tassiulas [13] provided a virtual backbonewhich facilitates the registration and search of services Thevirtual backbone is constructed by a subset of nodes in thenetwork and these nodes compose a dominating setThoughthere is no replication scheme nodes belong to the backboneforward service queries to each other when they cannot beanswered locally However there is a flaw that the destinationof the forwarding operation is random The proposal [14]presented by Sailhan and Issarny remedied the flaw byforwarding an unsolved service query to the nodes which areexpected to possess the corresponding service informationThe selection of destination to which a service query isforwarded is based upon the exchange of profiles amongdirectory agents The protocol [15] proposed by Koubaa andFleury aimed to build a backbone which could cover allservice information in the whole network Nevertheless asonly a service provider is allowed to join the backbone it islikely that an integral backbone might be broken down intoseveral isolated parts In this case the global communicationof the backbone is cut off Consequently the disposal ofservice queries is crippled

Klein et al [16] presented a semantic overlay of hierar-chical service rings A service ring is composed of a clusterof service providers and is considered to be a directory sincethe functions of accepting service registration and answeringservice query are contributed in the form of a service ring

International Journal of Distributed Sensor Networks 3

Although replication is not supported a service ring forwardsa service query which it is unable to answer Klein andKonig-Ries [17] proposed that services are dynamically organizedinto multilayer clusters The authors make an assumptionthat there exists a common ontology which could be usedto describe the services within the whole network Uponreceiving a service query a node checks its leaf-level clusterIf the service query cannot be answered higher-level clustersare examined in the pursuit of a suitable service It is worthmentioning that nodes are clustered based on the physicalproximity and the semantic proximity [16 17] Schiele et al[18] suggested that clusters are formed according to the sim-ilarity of mobility patterns A clusterhead is always ready toanswer service queriesThe remaining nodes in a cluster go tosleep when idle Tyan andMahmoud [19] presented a servicediscovery approach which clusters the nodes according tophysical proximity A gateway of each cluster plays the roleof a directory Wide-area service discovery is feasible sincean unsolved service query could be forwarded to anothergateway

As mentioned above when a replication scheme is notpresent an unsolved service query should be forwardedto other nodes However it is not easy to determine anappropriate destination for an unsolved service query Unlikebackbone-based and cluster-based models an exciting fea-ture that the DHT-based approaches inherently possess ishash techniques which could facilitate the provision oflocation information Seada and Helmy [20] developed arendezvous-based architecture The basic idea is that thewhole network is divided geographically and each geograph-ical area is responsible for a portion of service information inthe network Service information ismapped to a geographicalarea according to a hash-table-likemapping schemeA part ofnodes within a geographical area are selected to maintain themapped information Since the hash function used by servicequery is the same as the hash function used in the mappingof service information the proper forwarding destinationof a service query could be readily obtained by a directoryagent Sivavakeesar et al [21] described a mechanism whichis similar to the approach proposed in [20] except for the factthat the mapped information is handled by all nodes withina geographical area

Other approacheswhich do not involve backbone clusteror DHT techniques are also notable Lee et al [22] presenteda service discovery and delivery protocol called KonarkThe proposed method is decentralized and targeted at aMANET environment Under a pure peer-to-peer designeach node in the network has a database which stores theservice information provided by other nodes Jeong et al[23] developed an ad hoc name service (ANS) system forIPv6 MANET to facilitate the service discovery and name-to-address resolution It is assumed that each node could beconfigured with a site-local scoped IPv6 unicast address byad hoc stateless address autoconfiguration [24 25]

22 Directory-Less Architecture As a MANET environmentis born with no infrastructure it is argued that a directory-less architecture is more appropriate than a directory-basedarchitecture [26] However there is an important distinction

between a directory-less architecture and a directory-basedarchitecture there are no directory agents in a directory-lessarchitecture Namely there are only user agents and serviceagents in the whole networkThe missing of the organizationandmaintenance for directory agents reduces the complexityof service discovery architecture user agents issue servicequeries and service agents issue service advertisementsThough service queries are generated ondemand the numberof replicates of a service query during the forwarding processcould become very large Furthermore in order to achieve adecrease in latency and an increase in service availability thenumber of service advertisements is also considerable In thiscase a pursuit of good service discovery performance mightbe prone to bring about a serious flooding problem

Much research attention has been drawn to the operationsof service queries and service advertisements Chakrabortyet al [27] proposed a group-based service discovery (GSD)protocol for pervasive environment In general the protocolconsists of two components The first component is a P2Pcaching scheme dealing with the spread of service adver-tisements A node stores the received service advertisementsin a local database called service cache A least-remaining-lifetime cache replacement policy is used to update thecache The second component is a group-based intelligentforwarding strategy for regulating the forwarding of ser-vice queries In specific an unsolved service query is justforwarded to the nodes which possess matching serviceinformationThe determination of destination nodes is basedon the information contained in the service cache The replyinfo caching enhanced flexible forward probability (RICFFP)service discovery protocol presented by Gao et al [28] alsoconsists of two parts reply info caching (RIC) and flexibleforward probability (FFP) The RIC is a technique similar tothe P2P caching scheme in [27] In particular a node couldcache the service information in a received service reply For areceived service query if there exists amatch in the cache theservice query could be answered convenientlyThe essence ofthe FFP is that the forward probability of a service query isin reverse proportion to the number of hops it has alreadytraveled Nedos et al [29] introduced an optimal forwardingmechanism for service advertisements By monitoring theneighbors a nodemerely forwards the received service adver-tisements to a part of its one-hop neighbors Therefore thebroadcasting of service advertisements is turned into severalunicasts Nidd [30] set the target application environment tosingle-hop short-range wireless systems For each node thebroadcasting of service advertisements is scheduled to takeplace at regular intervalsThe task of scheduling is performedby an exponential back-off algorithm The disseminationstrategies proposed by Campo et al [31] and Lee et al [32] aresimilar that they both cache service information containedin received service advertisements Moreover only serviceadvertisements which are not expired and have not been seenrecently are broadcasted

23 Problems As the directory-based architecture and thedirectory-less architecture are complementary hybrid archi-tecture is another option for service discovery in a MANETenvironment For a node in hybrid architecture if there

4 International Journal of Distributed Sensor Networks

is no directory agent within its radio range both serviceadvertisements and service queries are sent in the same wayof directory-less architecture Otherwise service informa-tion contained in service advertisements is registered withdirectory nodes Service queries could be answered by bothdirectory agents and service agents Though a great deal ofresearch has been done to the above three types of servicediscovery architectures it is still controversial that whichone is superior to the other two It is recognized that thedifficulty of comparison is largely due to the characteristics ofaMANET environment For instance the nodes in aMANETmight possess various degrees ofmobilityMoreover both thevelocity and themoving direction of a node are unpredictableThe regular communication among nodes in the wholenetwork should not be interrupted by the node mobilitySince a MANET is self-organized there are no constraintson the joining and leaving of a node The appearance ofa new participator or departure of an existing participatorcould bring a significant change to the network topologyAgain the communication in the whole network should notbe influenced

Considering a MANET with directory-based architec-ture the TTL value of service query should at least guaranteethat a service query could arrive at a directory node If thefrequency of service query is low the message overheadintroduced by service registration and directorymaintenanceis likely to surpass the message overhead brought in byservice advertisement with a directory-less architecture Fordirectory-less and hybrid architectures large TTL values ofboth service query and service advertisement could improvethe performance of service discovery However there is acompromise between flooding problem and performanceenhancement When there are a large number of servicequeries a directory-less architecture has to increase thenumber of service advertisements But since both servicequery and service advertisement are simply broadcasteda risk of network congestion still could not guarantee asatisfactory performance of service discovery Ververidis andPolyzos [33] pointed out that it could be useful to develop aflexible architecture which is able to adjust its parameters andworking modes between directory-based and directory-lessmodes according to the status of a MANET

3 A Collaborative Self-GoverningPrivacy-Preserving WSN Architecture forDynamic Service Discovery

31 Network Model

311 Nodes In our architecture there are three possibleroles for a mobile node service provider service requestorand service directory In order to perform the operationswhich facilitate the service discovery process the above threetypes of nodes are equipped with three key componentsservice agent (SA) user agent (UA) and directory agent(DA) respectively For the sake of simplicity in the remainderof this paper we refer to service provider nodes servicerequestor nodes and service directory nodes as SAs UAs

and DAs respectively To facilitate the presentation of ourmodel we consider aMANET consists of DAs SAs andUAsIn addition there is a WSN composed of all DAs

312 Directory Agent Each DA is a wireless sensor nodeDAs offer a place storing service information and SAs registerservice information with DAs Then DAs answer the servicequeries issued by UAs based on the service information theyhaveThe existence ofDA is to improve the effectiveness of theservice discovery architectureTheWSNconstituted by all theDAs is based on Chord [34] Chord is a scalable distributedlookup protocol which has been applied to service discovery[35ndash37] The most important operation that Chord providesis mapping a given key onto a node By consistent hashingeach data item could be associated with a unique key The⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pair is stored at the corresponding node towhich the key maps The mechanisms facilitating the joiningand leaving of node could guarantee the normal operationsof the whole network In classic sensor networks all sensornodes are scheduled to send the obtained information to asingle sink node Though this approach eases the routingwork authors of [38 39] point out that the nodes which arein vicinity of the sink node bear heavy work load of relayingAs a result the batteries of these nodes are drained out muchearlier than other nodesThus there is no sink in ourWSN ofall the DAs The status of the whole network is summarizedand presented in a monitoring token In clustered sensornetworks the principle of clusterhead rotation is studiedextensively in [40ndash42] However the election and rotationof clusterhead inevitably introduce extra overhead On thecontrary since the consistent hashing mechanism employedby Chordmaps the keys of data items uniformly the queryingprocess of service is inherently load-balanced for all the DAsThis feature also helps to avoid a quick energy exhaustion ofcertain DAs

313 Unified Service Information Management Our servicediscovery architecture employs a unified service informationmanagement scheme It is necessary that all DAs SAs andUAs which participated in the architecture are aware of thescheme In particular there is a list of properties which isused for profiling a service Each property has a number ofvalues We denote the list of properties and values by 119871 andall nodes in the network have knowledge of this list Forexample a property called scopemay indicate the applicationdomain of a service such as search engine news archiveand anonymous FTP We assume that there exists a prede-termined list of properties and the corresponding valuesTheproperties are denoted by set property = pr

1 pr2 pr

119899119901

The corresponding values of pr119894are denoted by set 119901

119894=

119901V1198941 119901V1198942 119901V

119894119898We suggest that one property consumes

one byte Then there could be 119898 = 256 different valuesfor a property Now we introduce the definition of servicedescription

Definition 1 By description of a servicewemean the characterstring desp = 119901V

1119904 119901V2119895 119901V

(119899119901minus119894)119896which is formed by

concatenating the values of 119899119901 minus 119894 properties sequentiallywhere 0 ⩽ 119894 lt 119899119901 and 1 ⩽ 119904 119895 119896 ⩽ 256 When 119894 = 0 we

International Journal of Distributed Sensor Networks 5

middot middot middot

np minus i bytes

pv1s pv2j pv(npminusi)k

Figure 1 Service description

ID URL

npbytes 32bytes 2048bytes

middot middot middotpv1s pv2j pvnpk

Figure 2 Service registration

call desp a complete description Otherwise we call desp anincomplete description

Then we know that there are totally prod119899119901

119894=1|119901119894| different

complete descriptions for profiling services The format ofservice description is shown in Figure 1

32 Directory-BasedMode In directory-basedmode all DAsin the MANET form a Chord network All nodes in theMANET are mobile SAs register their service informationwith DAs A service query issued by a UA is handled by DAs

321 Service Registration and Deregistration in WSN Forservice registration the service information submitted to aDA consists of three parts description of the service ID of theservice provider (eg company name) andURL for accessingthe service Note that only a complete service descriptioncan be used for service registration There are 32 bytes toaccommodate the ID of service provider Though the HTTPprotocol does not stipulate the maximum length of a URLwe limit it to a maximum of 2048 bytesThe format of serviceregistration is shown in Figure 2

Since theWSN is based onChordwe denote the identifierspace of the Chord network by 2119898 In order to accommodatethe totalprod119899119901

119894=1|119901119894| different complete descriptions for profiling

services the inequality 2119898 ⩾ prod119899119901

119894=1|119901119894| should be satisfied

In our model we use the SHA-1 [43] as the consistenthash function to generate keys for both DAs and services Wedenote the hash function by 119904119867119886119904ℎ(119904119905119903119894119899119892) Upon receivinga valid service registration a DA first sends a service regis-tration acknowledgment to the SA which issued the serviceregistration Then the DA extracts the description and theID parts as a character string 119904119905119903 The key of the serviceis obtained by 119896119890119910 = 119904119867119886119904ℎ(119904119905119903) The ⟨119896119890119910URL⟩ pair isthen sent to the DA which is responsible for the key An SAcould register its service information with an arbitrary DAwithin its radio range As long as an SA receives a serviceregistration acknowledgment there is no need to register theservice again If the corresponding DA becomes out of theradio range when an SA is registering a series of services

the SA could contact another DA to register the remainingservices The service deregistration is conducted in a similarway to the service registration

322 KeyGeneration and Searching inWSN In unstructuredP2P network the searching based on a keyword is feasibleHowever the consistent hashing of filename in structuredDHT prohibits such operation in Chord As a result only theapproach of exact match worksThe inverted index proposedin [44] employs the mapping of ⟨119896119890119910119908119900119903119889 119899119900119889119890⟩ Then thesearching based on a keyword is implemented by redundancystorage The major drawback of this approach is the problemof common keywords The nodes which are responsible forcommon keywords suffer from heavy burden In our modela key is generated by hashing the character string of thedescription of a service concatenated by the service providerIDThe inclusion of the service provider ID resolves the aboveproblem of common keywords

When there is a potential need of certain service severalinterested values are selected from the list 119871 by a UAThen aservice query with the same format as a service descriptionis sent to a DA Upon receiving a service query a DAfirst checks whether there are missing values for propertiesFor a complete description the DA which received theservice query simply appends the IDs of service providersknown to it and hashes the character string composed of thedescription and the ID Then the DA searches the obtainedkeys However it is very likely that values of some propertiesare missing due to uncertainty Consequently we have anincomplete description For 119894missing values each one is filledby several most popular values queried in the pastWe denotethe number of most popular values by 119899119898119901V

After the filling operation of the original incompletedescription we have 119899119898119901V complete descriptions Then theIDs of service providers known to the DA are appended tothe complete descriptions We denote the number of serviceproviders a DA is aware of by 119899119904119901 For a scenario of 119894 =

1 119899119898119901V = 3 and 119899119904119901 = 2 the filling and appendingprocess of an incomplete description is illustrated in Figure 3Since there are six character strings of the descriptionsconcatenated by the service provider IDs we could obtainsix different keys for searching The missing of propertyvalues is allowed as it provides an open search result for aUA However since the keys are generated based on serviceinformation which is wishfully created by a UA and a DAit is worth noting that both a complete description and anincomplete description are likely to yield no search resultsFor an existing service with a search key the responsible DAwill send a service reply to the original DA which issued thesearch Then the search result is fed back to the UA by theoriginal DA

323 Topology Control and Function Tuning for WSN SinceDAs are mobile in directory-based mode the mobility hasa strong impact on the topology of the WSN Moreoverthe unpredictable node failures also exert influence on thetopology of the WSN In our model the topology control forWSN consists of two parts local location optimization andglobal location optimization

6 International Journal of Distributed Sensor Networks

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

Fill Append

i = 1

i = 0

middot middot middotpv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv2k pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

nmpv = 3 nsp = 2

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pvnp1

pvnp1

pvnp2

pvnp3

pvnp2

pvnp1

pvnp3

pvnp2

pvnp3

ID1

ID1

ID1

ID2

ID2

ID2

Figure 3 Filling and appending

N1205721

1205722

1205723

1205724

1205725

1205726uarr

Figure 4 Six areas

NS1

S2

S3

S4(x0 y0) (x0 + Δx y0)

(x0 + Δx y0 + Δy)(x0 y0 + Δy)

uarr

Figure 5 Four-step movement

The local location optimization (LLO) is performedbetween a DA and the UAs which are communicating withthe DA For an individual DA we divide its 360-degree radiorange into six equal adjacent areas 119886

119894(119894 = 1 2 6) As

shown in Figure 4 the upward direction represents northThe two salient features of the local location optimization

are privacy preservation and energy conservation As a longcommunication distance requires more energy for radiotransmission it is beneficial that the communication distancebetween a DA and a UA could be shortened once they getin touch with each other In our model the result of aservice query is sent to a UA by the original DA it queriedThis procedure makes the shortening of communicationdistance even more important Since the mobile nodes areequipped with omni-directional antennas a DA has no ideaof where a UA is and therefore is unable to determine acorrect moving direction For the sake of privacy protectiona UA is unwilling to share its location in any form (egGPS coordinates) To address this problem we develop adirection-probing algorithm to determine amoving directionfor aDAAs shown inFigure 5 this algorithmcontains a four-step movement 119904

119894(119894 = 1 2 4)

Table 1 Moving direction determination

N W S E1198861

+ minus minus minus

1198862

+ minus minus +1198863

minus minus + +1198864

minus minus + minus

1198865

minus + + minus

1198866

+ + minus minus

Considering a DA whose original location is (1199090 1199100)

and a UA whose location is unknown the DA performsthe followingmovements consecutively 119904

1(119873 Δ119910) 119904

2(119864 Δ119909)

1199043(119878 Δ119910) and 119904

4(119882 Δ119909) The values of Δ119909 and Δ119910 are both

positive After a four-step movement the DA returns to itsoriginal location (119909

0 1199100) During each step the variation of

signal intensity is recorded We denote an increase and adecrease of signal intensity by + and minus respectively Thenthe moving direction of the DA is determined according toTable 1

When there are several UAs which are communicatingwith the DA the desired moving directions related todifferent UAs might be various Generally it is consideredthat the energy consumption is in direct proportion to thecommunication distance Hence in order to reduce the totalenergy consumption the sum of distances between the DAand each UA should be as small as possible Considering twoUAs 119906119886

1and 119906119886

2 the communication distances between the

two UAs and the DA are denoted by 1199031and 1199032 respectively

In addition we denote the signal intensities of the two UAsby 1199041and 1199042 respectively We make the assumption that the

signal intensity and the communication distance follow theinverse square law 119904

119894= 1205751199032

119894 where 120575 is a constant coefficient

and 119894 = 1 2 The condition of equality for 1199031+ 1199032= 2radic1199031 sdot 1199032

is 1199031= 1199032 Moreover 119903

1= 1199032is equivalent to 119904

1= 1199042 Similarly

for 119899UAs we have the condition of equality for the inequality1199031+ 1199032+ sdot sdot sdot + 119903

119899⩾ 119899 119899radic1199031 sdot 1199032 sdot sdot sdot sdot sdot 119903119899 as 1199041 = 119904

2= sdot sdot sdot = 119904

119899

Thus themoving direction of the DA is adjusted based on theidea of equalizing the signal intensities of all UAs Howeverwhen there are several UAs this equalization process couldbe complicated Alternatively we choose to synthesize the119899 moving directions determined for the 119899 UAs with weightvalues The weight values of the UAs are calculated in reverse

International Journal of Distributed Sensor Networks 7

Direction-Probing (119889119886 119906119886 [119899])(1) original signal intensity 119906119886 [119895] 119904 (0)(2) for 119894 larr 1 to 4(3) for 119895 larr 1 to 119899

(4) if 119906119886 [119895] 119904 (119894) gt 119906119886 [119895] 119904(119894 minus 1) then(5) signal variation 119906119886 [119895] V (119894) larr ldquo+rdquo(6) else signal variation 119906119886 [119895] V (119894) larr ldquominusrdquo(7) end if(8) 119904 [119895] [119894] larr 119906119886 [119895] V (119894)(9) end for(10) end for(11) for 119895 larr 1 to 119899

(12) switch (119904 [119895])

(13) case ldquo+ minus minusminusrdquo 119906119886 [119895] 119889 = 1198861break

(14) case ldquo+ minus minus+rdquo 119906119886 [119895] 119889 = 1198862break

(15) case ldquominus minus ++rdquo 119906119886 [119895] 119889 = 1198863break

(16) case ldquominus minus +minusrdquo 119906119886 [119895] 119889 = 1198864break

(17) case ldquominus + +minusrdquo 119906119886 [119895] 119889 = 1198865break

(18) case ldquo+ + minusminusrdquo 119906119886 [119895] 119889 = 1198866break

(19) end switch(20) end for(21) 119906119886

1015840[119899] = 119900119903119889119890119903 (119886119904119888119890119899119889119894119899119892 119906119886 [119899] 119906119886 [119899] 119904 (0))

(22) 119904119904119906119898 larr 0

(23) for 119895 larr 1 to 119899

(24) 119904119904119906119898 larr 119904119904119906119898 + 1199061198861015840[119895] 119904 (0)

(25) end for(26) for 119895 larr 1 to 119899

(27) 1199061198861015840[119895] 119908 = 119904119904119906119898119906119886

1015840[119895] 119904 (0)

(28) end for(29) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (119906119886

1015840[119895] 119889 119906119886

1015840[119895] 119908)

Algorithm 1 Direction-probing procedure

proportion to their signal intensities The detailed direction-probing algorithm is illustrated in Algorithm 1 Once a finalmoving direction of theDA is obtained theDA starts tomovealong the direction When the 119899 signal intensities becomeapproximately equal to each other the DA will stop movingEach time a new UA gets in touch with the DA or an existingsession is terminated a new direction-probing procedure isinitiated

The global location optimization (GLO) is performedbetween DAs and it is based on the direction-probingalgorithm described in the local location optimization Otherthan local location optimization the global location opti-mization concentrates on topology maintenance

As a DA in the WSN has a maximum transmissionrange in order to keep the connectivity of the WSNthe relative positions among the DAs should be carefullycontrolled The global connectivity of the WSN could bedecomposed into several groups of connectivity In par-ticular we develop a connectivity maintenance algorithmto maintain the local connectivity of three DAs Con-sidering an individual DA which is denoted by 119889119886 bythe Chord protocol 119889119886 has a predecessor and a suc-cessor We denote the two DAs by 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 respectively The signal intensity between 119889119886

and 119889119886119901119903119890119889119890119888119890119904119904119900119903 is denoted by 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 Thesignal intensity between 119889119886 and 119889119886119904119906119888119888119890119904119904119900119903 is denoted

Table 2 Energy statuses and descriptions

Status Description119878119899

Normal status The remaining energy is 119864(119889119886) gt 119890120572

119878119897

Low status The remaining energy is 119890120573lt 119864(119889119886) ⩽ 119890

120572

119878119886

Alert status The remaining energy is 119890120574lt 119864(119889119886) ⩽ 119890

120573

119878119904

Serious status The remaining energy is 119864(119889119886) ⩽ 119890120574

by 119889119886119904119906119888119888119890119904119904119900119903119904 When 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904keeps decreasing 119889119886 becomes aware of the fact thatits predecessorsuccessor is moving away from it Once119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904 is lower than a threshold119904low 119889119886 initiates a direction-probing procedure to determinethe direction of the predecessorsuccessor Meanwhile itsends a SLOW DOWNmessage to the predecessorsuccessorfor notification Once a moving direction is determined 119889119886starts to move toward the predecessorsuccessor in order toprevent the signal intensity from getting too low In additionthe predecessorsuccessor which receives the SLOW DOWNmessage will adjust its movement for the purpose of gettingclose to 119889119886 Once the signal intensity between 119889119886 and thepredecessorsuccessor reaches a certain level the prede-cessorsuccessor stops getting close to 119889119886 We denote thesignal intensity of this level by 119904normal Note that when both119889119886119901119903119890119889119890119888119890119904119904119900119903119904 and 119889119886119904119906119888119888119890119904119904119900119903119904 are greater than or equalto 119904normal the 119889119886 stops moving For both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 a compromise of directions might be neededIn this case a composite moving direction is used by 119889119886 Thedetailed connectivity maintenance algorithm is illustrated inAlgorithm 2 Since the energy of a DA is limited we holdthat the function of connectivitymaintenance stops when theremaining energy of a DA is critically low and this feature isindicated by the last statement of Algorithm 2 A completefunction tuning algorithm is described later

As energy conservation is a critical issue inWSN for DAsand network life we develop a function tuning algorithmbased on the remaining energy of a DA Moreover this algo-rithm also assists the topology maintenance We denote theremaining energy of 119889119886 by 119864(119889119886) In specific the remainingenergy of a DA is classified into four statuses according tothree critical values 119890

120572 119890120573 and 119890

120574 The four energy statuses

119878119899 119878119897 119878119886 and 119878

119904are detailed in Table 2

When 119889119886 is in the normal status it is fully functionalNamely it accepts service registrations handles servicequeries sends service replies performs local location opti-mization and global location optimization and so forthOnce119889119886 enters the low status it stops performing local locationoptimization When it turns into the alert status an ALERTmessage is sent to both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 Assoon as 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 receive the ALERTmessage they both stop the local location optimizationtemporarily (even when they are in the normal status)Now the three DAs 119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903

are in preparation for the future serious status of 119889119886 Once119889119886 enters the serious status it disables all functions exceptfor performing a data transfer By the Chord protocol anode which is about to leave the network should transferall the ⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pairs it is responsible for to its

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 3: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 3

Although replication is not supported a service ring forwardsa service query which it is unable to answer Klein andKonig-Ries [17] proposed that services are dynamically organizedinto multilayer clusters The authors make an assumptionthat there exists a common ontology which could be usedto describe the services within the whole network Uponreceiving a service query a node checks its leaf-level clusterIf the service query cannot be answered higher-level clustersare examined in the pursuit of a suitable service It is worthmentioning that nodes are clustered based on the physicalproximity and the semantic proximity [16 17] Schiele et al[18] suggested that clusters are formed according to the sim-ilarity of mobility patterns A clusterhead is always ready toanswer service queriesThe remaining nodes in a cluster go tosleep when idle Tyan andMahmoud [19] presented a servicediscovery approach which clusters the nodes according tophysical proximity A gateway of each cluster plays the roleof a directory Wide-area service discovery is feasible sincean unsolved service query could be forwarded to anothergateway

As mentioned above when a replication scheme is notpresent an unsolved service query should be forwardedto other nodes However it is not easy to determine anappropriate destination for an unsolved service query Unlikebackbone-based and cluster-based models an exciting fea-ture that the DHT-based approaches inherently possess ishash techniques which could facilitate the provision oflocation information Seada and Helmy [20] developed arendezvous-based architecture The basic idea is that thewhole network is divided geographically and each geograph-ical area is responsible for a portion of service information inthe network Service information ismapped to a geographicalarea according to a hash-table-likemapping schemeA part ofnodes within a geographical area are selected to maintain themapped information Since the hash function used by servicequery is the same as the hash function used in the mappingof service information the proper forwarding destinationof a service query could be readily obtained by a directoryagent Sivavakeesar et al [21] described a mechanism whichis similar to the approach proposed in [20] except for the factthat the mapped information is handled by all nodes withina geographical area

Other approacheswhich do not involve backbone clusteror DHT techniques are also notable Lee et al [22] presenteda service discovery and delivery protocol called KonarkThe proposed method is decentralized and targeted at aMANET environment Under a pure peer-to-peer designeach node in the network has a database which stores theservice information provided by other nodes Jeong et al[23] developed an ad hoc name service (ANS) system forIPv6 MANET to facilitate the service discovery and name-to-address resolution It is assumed that each node could beconfigured with a site-local scoped IPv6 unicast address byad hoc stateless address autoconfiguration [24 25]

22 Directory-Less Architecture As a MANET environmentis born with no infrastructure it is argued that a directory-less architecture is more appropriate than a directory-basedarchitecture [26] However there is an important distinction

between a directory-less architecture and a directory-basedarchitecture there are no directory agents in a directory-lessarchitecture Namely there are only user agents and serviceagents in the whole networkThe missing of the organizationandmaintenance for directory agents reduces the complexityof service discovery architecture user agents issue servicequeries and service agents issue service advertisementsThough service queries are generated ondemand the numberof replicates of a service query during the forwarding processcould become very large Furthermore in order to achieve adecrease in latency and an increase in service availability thenumber of service advertisements is also considerable In thiscase a pursuit of good service discovery performance mightbe prone to bring about a serious flooding problem

Much research attention has been drawn to the operationsof service queries and service advertisements Chakrabortyet al [27] proposed a group-based service discovery (GSD)protocol for pervasive environment In general the protocolconsists of two components The first component is a P2Pcaching scheme dealing with the spread of service adver-tisements A node stores the received service advertisementsin a local database called service cache A least-remaining-lifetime cache replacement policy is used to update thecache The second component is a group-based intelligentforwarding strategy for regulating the forwarding of ser-vice queries In specific an unsolved service query is justforwarded to the nodes which possess matching serviceinformationThe determination of destination nodes is basedon the information contained in the service cache The replyinfo caching enhanced flexible forward probability (RICFFP)service discovery protocol presented by Gao et al [28] alsoconsists of two parts reply info caching (RIC) and flexibleforward probability (FFP) The RIC is a technique similar tothe P2P caching scheme in [27] In particular a node couldcache the service information in a received service reply For areceived service query if there exists amatch in the cache theservice query could be answered convenientlyThe essence ofthe FFP is that the forward probability of a service query isin reverse proportion to the number of hops it has alreadytraveled Nedos et al [29] introduced an optimal forwardingmechanism for service advertisements By monitoring theneighbors a nodemerely forwards the received service adver-tisements to a part of its one-hop neighbors Therefore thebroadcasting of service advertisements is turned into severalunicasts Nidd [30] set the target application environment tosingle-hop short-range wireless systems For each node thebroadcasting of service advertisements is scheduled to takeplace at regular intervalsThe task of scheduling is performedby an exponential back-off algorithm The disseminationstrategies proposed by Campo et al [31] and Lee et al [32] aresimilar that they both cache service information containedin received service advertisements Moreover only serviceadvertisements which are not expired and have not been seenrecently are broadcasted

23 Problems As the directory-based architecture and thedirectory-less architecture are complementary hybrid archi-tecture is another option for service discovery in a MANETenvironment For a node in hybrid architecture if there

4 International Journal of Distributed Sensor Networks

is no directory agent within its radio range both serviceadvertisements and service queries are sent in the same wayof directory-less architecture Otherwise service informa-tion contained in service advertisements is registered withdirectory nodes Service queries could be answered by bothdirectory agents and service agents Though a great deal ofresearch has been done to the above three types of servicediscovery architectures it is still controversial that whichone is superior to the other two It is recognized that thedifficulty of comparison is largely due to the characteristics ofaMANET environment For instance the nodes in aMANETmight possess various degrees ofmobilityMoreover both thevelocity and themoving direction of a node are unpredictableThe regular communication among nodes in the wholenetwork should not be interrupted by the node mobilitySince a MANET is self-organized there are no constraintson the joining and leaving of a node The appearance ofa new participator or departure of an existing participatorcould bring a significant change to the network topologyAgain the communication in the whole network should notbe influenced

Considering a MANET with directory-based architec-ture the TTL value of service query should at least guaranteethat a service query could arrive at a directory node If thefrequency of service query is low the message overheadintroduced by service registration and directorymaintenanceis likely to surpass the message overhead brought in byservice advertisement with a directory-less architecture Fordirectory-less and hybrid architectures large TTL values ofboth service query and service advertisement could improvethe performance of service discovery However there is acompromise between flooding problem and performanceenhancement When there are a large number of servicequeries a directory-less architecture has to increase thenumber of service advertisements But since both servicequery and service advertisement are simply broadcasteda risk of network congestion still could not guarantee asatisfactory performance of service discovery Ververidis andPolyzos [33] pointed out that it could be useful to develop aflexible architecture which is able to adjust its parameters andworking modes between directory-based and directory-lessmodes according to the status of a MANET

3 A Collaborative Self-GoverningPrivacy-Preserving WSN Architecture forDynamic Service Discovery

31 Network Model

311 Nodes In our architecture there are three possibleroles for a mobile node service provider service requestorand service directory In order to perform the operationswhich facilitate the service discovery process the above threetypes of nodes are equipped with three key componentsservice agent (SA) user agent (UA) and directory agent(DA) respectively For the sake of simplicity in the remainderof this paper we refer to service provider nodes servicerequestor nodes and service directory nodes as SAs UAs

and DAs respectively To facilitate the presentation of ourmodel we consider aMANET consists of DAs SAs andUAsIn addition there is a WSN composed of all DAs

312 Directory Agent Each DA is a wireless sensor nodeDAs offer a place storing service information and SAs registerservice information with DAs Then DAs answer the servicequeries issued by UAs based on the service information theyhaveThe existence ofDA is to improve the effectiveness of theservice discovery architectureTheWSNconstituted by all theDAs is based on Chord [34] Chord is a scalable distributedlookup protocol which has been applied to service discovery[35ndash37] The most important operation that Chord providesis mapping a given key onto a node By consistent hashingeach data item could be associated with a unique key The⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pair is stored at the corresponding node towhich the key maps The mechanisms facilitating the joiningand leaving of node could guarantee the normal operationsof the whole network In classic sensor networks all sensornodes are scheduled to send the obtained information to asingle sink node Though this approach eases the routingwork authors of [38 39] point out that the nodes which arein vicinity of the sink node bear heavy work load of relayingAs a result the batteries of these nodes are drained out muchearlier than other nodesThus there is no sink in ourWSN ofall the DAs The status of the whole network is summarizedand presented in a monitoring token In clustered sensornetworks the principle of clusterhead rotation is studiedextensively in [40ndash42] However the election and rotationof clusterhead inevitably introduce extra overhead On thecontrary since the consistent hashing mechanism employedby Chordmaps the keys of data items uniformly the queryingprocess of service is inherently load-balanced for all the DAsThis feature also helps to avoid a quick energy exhaustion ofcertain DAs

313 Unified Service Information Management Our servicediscovery architecture employs a unified service informationmanagement scheme It is necessary that all DAs SAs andUAs which participated in the architecture are aware of thescheme In particular there is a list of properties which isused for profiling a service Each property has a number ofvalues We denote the list of properties and values by 119871 andall nodes in the network have knowledge of this list Forexample a property called scopemay indicate the applicationdomain of a service such as search engine news archiveand anonymous FTP We assume that there exists a prede-termined list of properties and the corresponding valuesTheproperties are denoted by set property = pr

1 pr2 pr

119899119901

The corresponding values of pr119894are denoted by set 119901

119894=

119901V1198941 119901V1198942 119901V

119894119898We suggest that one property consumes

one byte Then there could be 119898 = 256 different valuesfor a property Now we introduce the definition of servicedescription

Definition 1 By description of a servicewemean the characterstring desp = 119901V

1119904 119901V2119895 119901V

(119899119901minus119894)119896which is formed by

concatenating the values of 119899119901 minus 119894 properties sequentiallywhere 0 ⩽ 119894 lt 119899119901 and 1 ⩽ 119904 119895 119896 ⩽ 256 When 119894 = 0 we

International Journal of Distributed Sensor Networks 5

middot middot middot

np minus i bytes

pv1s pv2j pv(npminusi)k

Figure 1 Service description

ID URL

npbytes 32bytes 2048bytes

middot middot middotpv1s pv2j pvnpk

Figure 2 Service registration

call desp a complete description Otherwise we call desp anincomplete description

Then we know that there are totally prod119899119901

119894=1|119901119894| different

complete descriptions for profiling services The format ofservice description is shown in Figure 1

32 Directory-BasedMode In directory-basedmode all DAsin the MANET form a Chord network All nodes in theMANET are mobile SAs register their service informationwith DAs A service query issued by a UA is handled by DAs

321 Service Registration and Deregistration in WSN Forservice registration the service information submitted to aDA consists of three parts description of the service ID of theservice provider (eg company name) andURL for accessingthe service Note that only a complete service descriptioncan be used for service registration There are 32 bytes toaccommodate the ID of service provider Though the HTTPprotocol does not stipulate the maximum length of a URLwe limit it to a maximum of 2048 bytesThe format of serviceregistration is shown in Figure 2

Since theWSN is based onChordwe denote the identifierspace of the Chord network by 2119898 In order to accommodatethe totalprod119899119901

119894=1|119901119894| different complete descriptions for profiling

services the inequality 2119898 ⩾ prod119899119901

119894=1|119901119894| should be satisfied

In our model we use the SHA-1 [43] as the consistenthash function to generate keys for both DAs and services Wedenote the hash function by 119904119867119886119904ℎ(119904119905119903119894119899119892) Upon receivinga valid service registration a DA first sends a service regis-tration acknowledgment to the SA which issued the serviceregistration Then the DA extracts the description and theID parts as a character string 119904119905119903 The key of the serviceis obtained by 119896119890119910 = 119904119867119886119904ℎ(119904119905119903) The ⟨119896119890119910URL⟩ pair isthen sent to the DA which is responsible for the key An SAcould register its service information with an arbitrary DAwithin its radio range As long as an SA receives a serviceregistration acknowledgment there is no need to register theservice again If the corresponding DA becomes out of theradio range when an SA is registering a series of services

the SA could contact another DA to register the remainingservices The service deregistration is conducted in a similarway to the service registration

322 KeyGeneration and Searching inWSN In unstructuredP2P network the searching based on a keyword is feasibleHowever the consistent hashing of filename in structuredDHT prohibits such operation in Chord As a result only theapproach of exact match worksThe inverted index proposedin [44] employs the mapping of ⟨119896119890119910119908119900119903119889 119899119900119889119890⟩ Then thesearching based on a keyword is implemented by redundancystorage The major drawback of this approach is the problemof common keywords The nodes which are responsible forcommon keywords suffer from heavy burden In our modela key is generated by hashing the character string of thedescription of a service concatenated by the service providerIDThe inclusion of the service provider ID resolves the aboveproblem of common keywords

When there is a potential need of certain service severalinterested values are selected from the list 119871 by a UAThen aservice query with the same format as a service descriptionis sent to a DA Upon receiving a service query a DAfirst checks whether there are missing values for propertiesFor a complete description the DA which received theservice query simply appends the IDs of service providersknown to it and hashes the character string composed of thedescription and the ID Then the DA searches the obtainedkeys However it is very likely that values of some propertiesare missing due to uncertainty Consequently we have anincomplete description For 119894missing values each one is filledby several most popular values queried in the pastWe denotethe number of most popular values by 119899119898119901V

After the filling operation of the original incompletedescription we have 119899119898119901V complete descriptions Then theIDs of service providers known to the DA are appended tothe complete descriptions We denote the number of serviceproviders a DA is aware of by 119899119904119901 For a scenario of 119894 =

1 119899119898119901V = 3 and 119899119904119901 = 2 the filling and appendingprocess of an incomplete description is illustrated in Figure 3Since there are six character strings of the descriptionsconcatenated by the service provider IDs we could obtainsix different keys for searching The missing of propertyvalues is allowed as it provides an open search result for aUA However since the keys are generated based on serviceinformation which is wishfully created by a UA and a DAit is worth noting that both a complete description and anincomplete description are likely to yield no search resultsFor an existing service with a search key the responsible DAwill send a service reply to the original DA which issued thesearch Then the search result is fed back to the UA by theoriginal DA

323 Topology Control and Function Tuning for WSN SinceDAs are mobile in directory-based mode the mobility hasa strong impact on the topology of the WSN Moreoverthe unpredictable node failures also exert influence on thetopology of the WSN In our model the topology control forWSN consists of two parts local location optimization andglobal location optimization

6 International Journal of Distributed Sensor Networks

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

Fill Append

i = 1

i = 0

middot middot middotpv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv2k pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

nmpv = 3 nsp = 2

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pvnp1

pvnp1

pvnp2

pvnp3

pvnp2

pvnp1

pvnp3

pvnp2

pvnp3

ID1

ID1

ID1

ID2

ID2

ID2

Figure 3 Filling and appending

N1205721

1205722

1205723

1205724

1205725

1205726uarr

Figure 4 Six areas

NS1

S2

S3

S4(x0 y0) (x0 + Δx y0)

(x0 + Δx y0 + Δy)(x0 y0 + Δy)

uarr

Figure 5 Four-step movement

The local location optimization (LLO) is performedbetween a DA and the UAs which are communicating withthe DA For an individual DA we divide its 360-degree radiorange into six equal adjacent areas 119886

119894(119894 = 1 2 6) As

shown in Figure 4 the upward direction represents northThe two salient features of the local location optimization

are privacy preservation and energy conservation As a longcommunication distance requires more energy for radiotransmission it is beneficial that the communication distancebetween a DA and a UA could be shortened once they getin touch with each other In our model the result of aservice query is sent to a UA by the original DA it queriedThis procedure makes the shortening of communicationdistance even more important Since the mobile nodes areequipped with omni-directional antennas a DA has no ideaof where a UA is and therefore is unable to determine acorrect moving direction For the sake of privacy protectiona UA is unwilling to share its location in any form (egGPS coordinates) To address this problem we develop adirection-probing algorithm to determine amoving directionfor aDAAs shown inFigure 5 this algorithmcontains a four-step movement 119904

119894(119894 = 1 2 4)

Table 1 Moving direction determination

N W S E1198861

+ minus minus minus

1198862

+ minus minus +1198863

minus minus + +1198864

minus minus + minus

1198865

minus + + minus

1198866

+ + minus minus

Considering a DA whose original location is (1199090 1199100)

and a UA whose location is unknown the DA performsthe followingmovements consecutively 119904

1(119873 Δ119910) 119904

2(119864 Δ119909)

1199043(119878 Δ119910) and 119904

4(119882 Δ119909) The values of Δ119909 and Δ119910 are both

positive After a four-step movement the DA returns to itsoriginal location (119909

0 1199100) During each step the variation of

signal intensity is recorded We denote an increase and adecrease of signal intensity by + and minus respectively Thenthe moving direction of the DA is determined according toTable 1

When there are several UAs which are communicatingwith the DA the desired moving directions related todifferent UAs might be various Generally it is consideredthat the energy consumption is in direct proportion to thecommunication distance Hence in order to reduce the totalenergy consumption the sum of distances between the DAand each UA should be as small as possible Considering twoUAs 119906119886

1and 119906119886

2 the communication distances between the

two UAs and the DA are denoted by 1199031and 1199032 respectively

In addition we denote the signal intensities of the two UAsby 1199041and 1199042 respectively We make the assumption that the

signal intensity and the communication distance follow theinverse square law 119904

119894= 1205751199032

119894 where 120575 is a constant coefficient

and 119894 = 1 2 The condition of equality for 1199031+ 1199032= 2radic1199031 sdot 1199032

is 1199031= 1199032 Moreover 119903

1= 1199032is equivalent to 119904

1= 1199042 Similarly

for 119899UAs we have the condition of equality for the inequality1199031+ 1199032+ sdot sdot sdot + 119903

119899⩾ 119899 119899radic1199031 sdot 1199032 sdot sdot sdot sdot sdot 119903119899 as 1199041 = 119904

2= sdot sdot sdot = 119904

119899

Thus themoving direction of the DA is adjusted based on theidea of equalizing the signal intensities of all UAs Howeverwhen there are several UAs this equalization process couldbe complicated Alternatively we choose to synthesize the119899 moving directions determined for the 119899 UAs with weightvalues The weight values of the UAs are calculated in reverse

International Journal of Distributed Sensor Networks 7

Direction-Probing (119889119886 119906119886 [119899])(1) original signal intensity 119906119886 [119895] 119904 (0)(2) for 119894 larr 1 to 4(3) for 119895 larr 1 to 119899

(4) if 119906119886 [119895] 119904 (119894) gt 119906119886 [119895] 119904(119894 minus 1) then(5) signal variation 119906119886 [119895] V (119894) larr ldquo+rdquo(6) else signal variation 119906119886 [119895] V (119894) larr ldquominusrdquo(7) end if(8) 119904 [119895] [119894] larr 119906119886 [119895] V (119894)(9) end for(10) end for(11) for 119895 larr 1 to 119899

(12) switch (119904 [119895])

(13) case ldquo+ minus minusminusrdquo 119906119886 [119895] 119889 = 1198861break

(14) case ldquo+ minus minus+rdquo 119906119886 [119895] 119889 = 1198862break

(15) case ldquominus minus ++rdquo 119906119886 [119895] 119889 = 1198863break

(16) case ldquominus minus +minusrdquo 119906119886 [119895] 119889 = 1198864break

(17) case ldquominus + +minusrdquo 119906119886 [119895] 119889 = 1198865break

(18) case ldquo+ + minusminusrdquo 119906119886 [119895] 119889 = 1198866break

(19) end switch(20) end for(21) 119906119886

1015840[119899] = 119900119903119889119890119903 (119886119904119888119890119899119889119894119899119892 119906119886 [119899] 119906119886 [119899] 119904 (0))

(22) 119904119904119906119898 larr 0

(23) for 119895 larr 1 to 119899

(24) 119904119904119906119898 larr 119904119904119906119898 + 1199061198861015840[119895] 119904 (0)

(25) end for(26) for 119895 larr 1 to 119899

(27) 1199061198861015840[119895] 119908 = 119904119904119906119898119906119886

1015840[119895] 119904 (0)

(28) end for(29) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (119906119886

1015840[119895] 119889 119906119886

1015840[119895] 119908)

Algorithm 1 Direction-probing procedure

proportion to their signal intensities The detailed direction-probing algorithm is illustrated in Algorithm 1 Once a finalmoving direction of theDA is obtained theDA starts tomovealong the direction When the 119899 signal intensities becomeapproximately equal to each other the DA will stop movingEach time a new UA gets in touch with the DA or an existingsession is terminated a new direction-probing procedure isinitiated

The global location optimization (GLO) is performedbetween DAs and it is based on the direction-probingalgorithm described in the local location optimization Otherthan local location optimization the global location opti-mization concentrates on topology maintenance

As a DA in the WSN has a maximum transmissionrange in order to keep the connectivity of the WSNthe relative positions among the DAs should be carefullycontrolled The global connectivity of the WSN could bedecomposed into several groups of connectivity In par-ticular we develop a connectivity maintenance algorithmto maintain the local connectivity of three DAs Con-sidering an individual DA which is denoted by 119889119886 bythe Chord protocol 119889119886 has a predecessor and a suc-cessor We denote the two DAs by 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 respectively The signal intensity between 119889119886

and 119889119886119901119903119890119889119890119888119890119904119904119900119903 is denoted by 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 Thesignal intensity between 119889119886 and 119889119886119904119906119888119888119890119904119904119900119903 is denoted

Table 2 Energy statuses and descriptions

Status Description119878119899

Normal status The remaining energy is 119864(119889119886) gt 119890120572

119878119897

Low status The remaining energy is 119890120573lt 119864(119889119886) ⩽ 119890

120572

119878119886

Alert status The remaining energy is 119890120574lt 119864(119889119886) ⩽ 119890

120573

119878119904

Serious status The remaining energy is 119864(119889119886) ⩽ 119890120574

by 119889119886119904119906119888119888119890119904119904119900119903119904 When 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904keeps decreasing 119889119886 becomes aware of the fact thatits predecessorsuccessor is moving away from it Once119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904 is lower than a threshold119904low 119889119886 initiates a direction-probing procedure to determinethe direction of the predecessorsuccessor Meanwhile itsends a SLOW DOWNmessage to the predecessorsuccessorfor notification Once a moving direction is determined 119889119886starts to move toward the predecessorsuccessor in order toprevent the signal intensity from getting too low In additionthe predecessorsuccessor which receives the SLOW DOWNmessage will adjust its movement for the purpose of gettingclose to 119889119886 Once the signal intensity between 119889119886 and thepredecessorsuccessor reaches a certain level the prede-cessorsuccessor stops getting close to 119889119886 We denote thesignal intensity of this level by 119904normal Note that when both119889119886119901119903119890119889119890119888119890119904119904119900119903119904 and 119889119886119904119906119888119888119890119904119904119900119903119904 are greater than or equalto 119904normal the 119889119886 stops moving For both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 a compromise of directions might be neededIn this case a composite moving direction is used by 119889119886 Thedetailed connectivity maintenance algorithm is illustrated inAlgorithm 2 Since the energy of a DA is limited we holdthat the function of connectivitymaintenance stops when theremaining energy of a DA is critically low and this feature isindicated by the last statement of Algorithm 2 A completefunction tuning algorithm is described later

As energy conservation is a critical issue inWSN for DAsand network life we develop a function tuning algorithmbased on the remaining energy of a DA Moreover this algo-rithm also assists the topology maintenance We denote theremaining energy of 119889119886 by 119864(119889119886) In specific the remainingenergy of a DA is classified into four statuses according tothree critical values 119890

120572 119890120573 and 119890

120574 The four energy statuses

119878119899 119878119897 119878119886 and 119878

119904are detailed in Table 2

When 119889119886 is in the normal status it is fully functionalNamely it accepts service registrations handles servicequeries sends service replies performs local location opti-mization and global location optimization and so forthOnce119889119886 enters the low status it stops performing local locationoptimization When it turns into the alert status an ALERTmessage is sent to both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 Assoon as 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 receive the ALERTmessage they both stop the local location optimizationtemporarily (even when they are in the normal status)Now the three DAs 119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903

are in preparation for the future serious status of 119889119886 Once119889119886 enters the serious status it disables all functions exceptfor performing a data transfer By the Chord protocol anode which is about to leave the network should transferall the ⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pairs it is responsible for to its

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 4: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

4 International Journal of Distributed Sensor Networks

is no directory agent within its radio range both serviceadvertisements and service queries are sent in the same wayof directory-less architecture Otherwise service informa-tion contained in service advertisements is registered withdirectory nodes Service queries could be answered by bothdirectory agents and service agents Though a great deal ofresearch has been done to the above three types of servicediscovery architectures it is still controversial that whichone is superior to the other two It is recognized that thedifficulty of comparison is largely due to the characteristics ofaMANET environment For instance the nodes in aMANETmight possess various degrees ofmobilityMoreover both thevelocity and themoving direction of a node are unpredictableThe regular communication among nodes in the wholenetwork should not be interrupted by the node mobilitySince a MANET is self-organized there are no constraintson the joining and leaving of a node The appearance ofa new participator or departure of an existing participatorcould bring a significant change to the network topologyAgain the communication in the whole network should notbe influenced

Considering a MANET with directory-based architec-ture the TTL value of service query should at least guaranteethat a service query could arrive at a directory node If thefrequency of service query is low the message overheadintroduced by service registration and directorymaintenanceis likely to surpass the message overhead brought in byservice advertisement with a directory-less architecture Fordirectory-less and hybrid architectures large TTL values ofboth service query and service advertisement could improvethe performance of service discovery However there is acompromise between flooding problem and performanceenhancement When there are a large number of servicequeries a directory-less architecture has to increase thenumber of service advertisements But since both servicequery and service advertisement are simply broadcasteda risk of network congestion still could not guarantee asatisfactory performance of service discovery Ververidis andPolyzos [33] pointed out that it could be useful to develop aflexible architecture which is able to adjust its parameters andworking modes between directory-based and directory-lessmodes according to the status of a MANET

3 A Collaborative Self-GoverningPrivacy-Preserving WSN Architecture forDynamic Service Discovery

31 Network Model

311 Nodes In our architecture there are three possibleroles for a mobile node service provider service requestorand service directory In order to perform the operationswhich facilitate the service discovery process the above threetypes of nodes are equipped with three key componentsservice agent (SA) user agent (UA) and directory agent(DA) respectively For the sake of simplicity in the remainderof this paper we refer to service provider nodes servicerequestor nodes and service directory nodes as SAs UAs

and DAs respectively To facilitate the presentation of ourmodel we consider aMANET consists of DAs SAs andUAsIn addition there is a WSN composed of all DAs

312 Directory Agent Each DA is a wireless sensor nodeDAs offer a place storing service information and SAs registerservice information with DAs Then DAs answer the servicequeries issued by UAs based on the service information theyhaveThe existence ofDA is to improve the effectiveness of theservice discovery architectureTheWSNconstituted by all theDAs is based on Chord [34] Chord is a scalable distributedlookup protocol which has been applied to service discovery[35ndash37] The most important operation that Chord providesis mapping a given key onto a node By consistent hashingeach data item could be associated with a unique key The⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pair is stored at the corresponding node towhich the key maps The mechanisms facilitating the joiningand leaving of node could guarantee the normal operationsof the whole network In classic sensor networks all sensornodes are scheduled to send the obtained information to asingle sink node Though this approach eases the routingwork authors of [38 39] point out that the nodes which arein vicinity of the sink node bear heavy work load of relayingAs a result the batteries of these nodes are drained out muchearlier than other nodesThus there is no sink in ourWSN ofall the DAs The status of the whole network is summarizedand presented in a monitoring token In clustered sensornetworks the principle of clusterhead rotation is studiedextensively in [40ndash42] However the election and rotationof clusterhead inevitably introduce extra overhead On thecontrary since the consistent hashing mechanism employedby Chordmaps the keys of data items uniformly the queryingprocess of service is inherently load-balanced for all the DAsThis feature also helps to avoid a quick energy exhaustion ofcertain DAs

313 Unified Service Information Management Our servicediscovery architecture employs a unified service informationmanagement scheme It is necessary that all DAs SAs andUAs which participated in the architecture are aware of thescheme In particular there is a list of properties which isused for profiling a service Each property has a number ofvalues We denote the list of properties and values by 119871 andall nodes in the network have knowledge of this list Forexample a property called scopemay indicate the applicationdomain of a service such as search engine news archiveand anonymous FTP We assume that there exists a prede-termined list of properties and the corresponding valuesTheproperties are denoted by set property = pr

1 pr2 pr

119899119901

The corresponding values of pr119894are denoted by set 119901

119894=

119901V1198941 119901V1198942 119901V

119894119898We suggest that one property consumes

one byte Then there could be 119898 = 256 different valuesfor a property Now we introduce the definition of servicedescription

Definition 1 By description of a servicewemean the characterstring desp = 119901V

1119904 119901V2119895 119901V

(119899119901minus119894)119896which is formed by

concatenating the values of 119899119901 minus 119894 properties sequentiallywhere 0 ⩽ 119894 lt 119899119901 and 1 ⩽ 119904 119895 119896 ⩽ 256 When 119894 = 0 we

International Journal of Distributed Sensor Networks 5

middot middot middot

np minus i bytes

pv1s pv2j pv(npminusi)k

Figure 1 Service description

ID URL

npbytes 32bytes 2048bytes

middot middot middotpv1s pv2j pvnpk

Figure 2 Service registration

call desp a complete description Otherwise we call desp anincomplete description

Then we know that there are totally prod119899119901

119894=1|119901119894| different

complete descriptions for profiling services The format ofservice description is shown in Figure 1

32 Directory-BasedMode In directory-basedmode all DAsin the MANET form a Chord network All nodes in theMANET are mobile SAs register their service informationwith DAs A service query issued by a UA is handled by DAs

321 Service Registration and Deregistration in WSN Forservice registration the service information submitted to aDA consists of three parts description of the service ID of theservice provider (eg company name) andURL for accessingthe service Note that only a complete service descriptioncan be used for service registration There are 32 bytes toaccommodate the ID of service provider Though the HTTPprotocol does not stipulate the maximum length of a URLwe limit it to a maximum of 2048 bytesThe format of serviceregistration is shown in Figure 2

Since theWSN is based onChordwe denote the identifierspace of the Chord network by 2119898 In order to accommodatethe totalprod119899119901

119894=1|119901119894| different complete descriptions for profiling

services the inequality 2119898 ⩾ prod119899119901

119894=1|119901119894| should be satisfied

In our model we use the SHA-1 [43] as the consistenthash function to generate keys for both DAs and services Wedenote the hash function by 119904119867119886119904ℎ(119904119905119903119894119899119892) Upon receivinga valid service registration a DA first sends a service regis-tration acknowledgment to the SA which issued the serviceregistration Then the DA extracts the description and theID parts as a character string 119904119905119903 The key of the serviceis obtained by 119896119890119910 = 119904119867119886119904ℎ(119904119905119903) The ⟨119896119890119910URL⟩ pair isthen sent to the DA which is responsible for the key An SAcould register its service information with an arbitrary DAwithin its radio range As long as an SA receives a serviceregistration acknowledgment there is no need to register theservice again If the corresponding DA becomes out of theradio range when an SA is registering a series of services

the SA could contact another DA to register the remainingservices The service deregistration is conducted in a similarway to the service registration

322 KeyGeneration and Searching inWSN In unstructuredP2P network the searching based on a keyword is feasibleHowever the consistent hashing of filename in structuredDHT prohibits such operation in Chord As a result only theapproach of exact match worksThe inverted index proposedin [44] employs the mapping of ⟨119896119890119910119908119900119903119889 119899119900119889119890⟩ Then thesearching based on a keyword is implemented by redundancystorage The major drawback of this approach is the problemof common keywords The nodes which are responsible forcommon keywords suffer from heavy burden In our modela key is generated by hashing the character string of thedescription of a service concatenated by the service providerIDThe inclusion of the service provider ID resolves the aboveproblem of common keywords

When there is a potential need of certain service severalinterested values are selected from the list 119871 by a UAThen aservice query with the same format as a service descriptionis sent to a DA Upon receiving a service query a DAfirst checks whether there are missing values for propertiesFor a complete description the DA which received theservice query simply appends the IDs of service providersknown to it and hashes the character string composed of thedescription and the ID Then the DA searches the obtainedkeys However it is very likely that values of some propertiesare missing due to uncertainty Consequently we have anincomplete description For 119894missing values each one is filledby several most popular values queried in the pastWe denotethe number of most popular values by 119899119898119901V

After the filling operation of the original incompletedescription we have 119899119898119901V complete descriptions Then theIDs of service providers known to the DA are appended tothe complete descriptions We denote the number of serviceproviders a DA is aware of by 119899119904119901 For a scenario of 119894 =

1 119899119898119901V = 3 and 119899119904119901 = 2 the filling and appendingprocess of an incomplete description is illustrated in Figure 3Since there are six character strings of the descriptionsconcatenated by the service provider IDs we could obtainsix different keys for searching The missing of propertyvalues is allowed as it provides an open search result for aUA However since the keys are generated based on serviceinformation which is wishfully created by a UA and a DAit is worth noting that both a complete description and anincomplete description are likely to yield no search resultsFor an existing service with a search key the responsible DAwill send a service reply to the original DA which issued thesearch Then the search result is fed back to the UA by theoriginal DA

323 Topology Control and Function Tuning for WSN SinceDAs are mobile in directory-based mode the mobility hasa strong impact on the topology of the WSN Moreoverthe unpredictable node failures also exert influence on thetopology of the WSN In our model the topology control forWSN consists of two parts local location optimization andglobal location optimization

6 International Journal of Distributed Sensor Networks

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

Fill Append

i = 1

i = 0

middot middot middotpv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv2k pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

nmpv = 3 nsp = 2

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pvnp1

pvnp1

pvnp2

pvnp3

pvnp2

pvnp1

pvnp3

pvnp2

pvnp3

ID1

ID1

ID1

ID2

ID2

ID2

Figure 3 Filling and appending

N1205721

1205722

1205723

1205724

1205725

1205726uarr

Figure 4 Six areas

NS1

S2

S3

S4(x0 y0) (x0 + Δx y0)

(x0 + Δx y0 + Δy)(x0 y0 + Δy)

uarr

Figure 5 Four-step movement

The local location optimization (LLO) is performedbetween a DA and the UAs which are communicating withthe DA For an individual DA we divide its 360-degree radiorange into six equal adjacent areas 119886

119894(119894 = 1 2 6) As

shown in Figure 4 the upward direction represents northThe two salient features of the local location optimization

are privacy preservation and energy conservation As a longcommunication distance requires more energy for radiotransmission it is beneficial that the communication distancebetween a DA and a UA could be shortened once they getin touch with each other In our model the result of aservice query is sent to a UA by the original DA it queriedThis procedure makes the shortening of communicationdistance even more important Since the mobile nodes areequipped with omni-directional antennas a DA has no ideaof where a UA is and therefore is unable to determine acorrect moving direction For the sake of privacy protectiona UA is unwilling to share its location in any form (egGPS coordinates) To address this problem we develop adirection-probing algorithm to determine amoving directionfor aDAAs shown inFigure 5 this algorithmcontains a four-step movement 119904

119894(119894 = 1 2 4)

Table 1 Moving direction determination

N W S E1198861

+ minus minus minus

1198862

+ minus minus +1198863

minus minus + +1198864

minus minus + minus

1198865

minus + + minus

1198866

+ + minus minus

Considering a DA whose original location is (1199090 1199100)

and a UA whose location is unknown the DA performsthe followingmovements consecutively 119904

1(119873 Δ119910) 119904

2(119864 Δ119909)

1199043(119878 Δ119910) and 119904

4(119882 Δ119909) The values of Δ119909 and Δ119910 are both

positive After a four-step movement the DA returns to itsoriginal location (119909

0 1199100) During each step the variation of

signal intensity is recorded We denote an increase and adecrease of signal intensity by + and minus respectively Thenthe moving direction of the DA is determined according toTable 1

When there are several UAs which are communicatingwith the DA the desired moving directions related todifferent UAs might be various Generally it is consideredthat the energy consumption is in direct proportion to thecommunication distance Hence in order to reduce the totalenergy consumption the sum of distances between the DAand each UA should be as small as possible Considering twoUAs 119906119886

1and 119906119886

2 the communication distances between the

two UAs and the DA are denoted by 1199031and 1199032 respectively

In addition we denote the signal intensities of the two UAsby 1199041and 1199042 respectively We make the assumption that the

signal intensity and the communication distance follow theinverse square law 119904

119894= 1205751199032

119894 where 120575 is a constant coefficient

and 119894 = 1 2 The condition of equality for 1199031+ 1199032= 2radic1199031 sdot 1199032

is 1199031= 1199032 Moreover 119903

1= 1199032is equivalent to 119904

1= 1199042 Similarly

for 119899UAs we have the condition of equality for the inequality1199031+ 1199032+ sdot sdot sdot + 119903

119899⩾ 119899 119899radic1199031 sdot 1199032 sdot sdot sdot sdot sdot 119903119899 as 1199041 = 119904

2= sdot sdot sdot = 119904

119899

Thus themoving direction of the DA is adjusted based on theidea of equalizing the signal intensities of all UAs Howeverwhen there are several UAs this equalization process couldbe complicated Alternatively we choose to synthesize the119899 moving directions determined for the 119899 UAs with weightvalues The weight values of the UAs are calculated in reverse

International Journal of Distributed Sensor Networks 7

Direction-Probing (119889119886 119906119886 [119899])(1) original signal intensity 119906119886 [119895] 119904 (0)(2) for 119894 larr 1 to 4(3) for 119895 larr 1 to 119899

(4) if 119906119886 [119895] 119904 (119894) gt 119906119886 [119895] 119904(119894 minus 1) then(5) signal variation 119906119886 [119895] V (119894) larr ldquo+rdquo(6) else signal variation 119906119886 [119895] V (119894) larr ldquominusrdquo(7) end if(8) 119904 [119895] [119894] larr 119906119886 [119895] V (119894)(9) end for(10) end for(11) for 119895 larr 1 to 119899

(12) switch (119904 [119895])

(13) case ldquo+ minus minusminusrdquo 119906119886 [119895] 119889 = 1198861break

(14) case ldquo+ minus minus+rdquo 119906119886 [119895] 119889 = 1198862break

(15) case ldquominus minus ++rdquo 119906119886 [119895] 119889 = 1198863break

(16) case ldquominus minus +minusrdquo 119906119886 [119895] 119889 = 1198864break

(17) case ldquominus + +minusrdquo 119906119886 [119895] 119889 = 1198865break

(18) case ldquo+ + minusminusrdquo 119906119886 [119895] 119889 = 1198866break

(19) end switch(20) end for(21) 119906119886

1015840[119899] = 119900119903119889119890119903 (119886119904119888119890119899119889119894119899119892 119906119886 [119899] 119906119886 [119899] 119904 (0))

(22) 119904119904119906119898 larr 0

(23) for 119895 larr 1 to 119899

(24) 119904119904119906119898 larr 119904119904119906119898 + 1199061198861015840[119895] 119904 (0)

(25) end for(26) for 119895 larr 1 to 119899

(27) 1199061198861015840[119895] 119908 = 119904119904119906119898119906119886

1015840[119895] 119904 (0)

(28) end for(29) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (119906119886

1015840[119895] 119889 119906119886

1015840[119895] 119908)

Algorithm 1 Direction-probing procedure

proportion to their signal intensities The detailed direction-probing algorithm is illustrated in Algorithm 1 Once a finalmoving direction of theDA is obtained theDA starts tomovealong the direction When the 119899 signal intensities becomeapproximately equal to each other the DA will stop movingEach time a new UA gets in touch with the DA or an existingsession is terminated a new direction-probing procedure isinitiated

The global location optimization (GLO) is performedbetween DAs and it is based on the direction-probingalgorithm described in the local location optimization Otherthan local location optimization the global location opti-mization concentrates on topology maintenance

As a DA in the WSN has a maximum transmissionrange in order to keep the connectivity of the WSNthe relative positions among the DAs should be carefullycontrolled The global connectivity of the WSN could bedecomposed into several groups of connectivity In par-ticular we develop a connectivity maintenance algorithmto maintain the local connectivity of three DAs Con-sidering an individual DA which is denoted by 119889119886 bythe Chord protocol 119889119886 has a predecessor and a suc-cessor We denote the two DAs by 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 respectively The signal intensity between 119889119886

and 119889119886119901119903119890119889119890119888119890119904119904119900119903 is denoted by 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 Thesignal intensity between 119889119886 and 119889119886119904119906119888119888119890119904119904119900119903 is denoted

Table 2 Energy statuses and descriptions

Status Description119878119899

Normal status The remaining energy is 119864(119889119886) gt 119890120572

119878119897

Low status The remaining energy is 119890120573lt 119864(119889119886) ⩽ 119890

120572

119878119886

Alert status The remaining energy is 119890120574lt 119864(119889119886) ⩽ 119890

120573

119878119904

Serious status The remaining energy is 119864(119889119886) ⩽ 119890120574

by 119889119886119904119906119888119888119890119904119904119900119903119904 When 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904keeps decreasing 119889119886 becomes aware of the fact thatits predecessorsuccessor is moving away from it Once119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904 is lower than a threshold119904low 119889119886 initiates a direction-probing procedure to determinethe direction of the predecessorsuccessor Meanwhile itsends a SLOW DOWNmessage to the predecessorsuccessorfor notification Once a moving direction is determined 119889119886starts to move toward the predecessorsuccessor in order toprevent the signal intensity from getting too low In additionthe predecessorsuccessor which receives the SLOW DOWNmessage will adjust its movement for the purpose of gettingclose to 119889119886 Once the signal intensity between 119889119886 and thepredecessorsuccessor reaches a certain level the prede-cessorsuccessor stops getting close to 119889119886 We denote thesignal intensity of this level by 119904normal Note that when both119889119886119901119903119890119889119890119888119890119904119904119900119903119904 and 119889119886119904119906119888119888119890119904119904119900119903119904 are greater than or equalto 119904normal the 119889119886 stops moving For both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 a compromise of directions might be neededIn this case a composite moving direction is used by 119889119886 Thedetailed connectivity maintenance algorithm is illustrated inAlgorithm 2 Since the energy of a DA is limited we holdthat the function of connectivitymaintenance stops when theremaining energy of a DA is critically low and this feature isindicated by the last statement of Algorithm 2 A completefunction tuning algorithm is described later

As energy conservation is a critical issue inWSN for DAsand network life we develop a function tuning algorithmbased on the remaining energy of a DA Moreover this algo-rithm also assists the topology maintenance We denote theremaining energy of 119889119886 by 119864(119889119886) In specific the remainingenergy of a DA is classified into four statuses according tothree critical values 119890

120572 119890120573 and 119890

120574 The four energy statuses

119878119899 119878119897 119878119886 and 119878

119904are detailed in Table 2

When 119889119886 is in the normal status it is fully functionalNamely it accepts service registrations handles servicequeries sends service replies performs local location opti-mization and global location optimization and so forthOnce119889119886 enters the low status it stops performing local locationoptimization When it turns into the alert status an ALERTmessage is sent to both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 Assoon as 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 receive the ALERTmessage they both stop the local location optimizationtemporarily (even when they are in the normal status)Now the three DAs 119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903

are in preparation for the future serious status of 119889119886 Once119889119886 enters the serious status it disables all functions exceptfor performing a data transfer By the Chord protocol anode which is about to leave the network should transferall the ⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pairs it is responsible for to its

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 5: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 5

middot middot middot

np minus i bytes

pv1s pv2j pv(npminusi)k

Figure 1 Service description

ID URL

npbytes 32bytes 2048bytes

middot middot middotpv1s pv2j pvnpk

Figure 2 Service registration

call desp a complete description Otherwise we call desp anincomplete description

Then we know that there are totally prod119899119901

119894=1|119901119894| different

complete descriptions for profiling services The format ofservice description is shown in Figure 1

32 Directory-BasedMode In directory-basedmode all DAsin the MANET form a Chord network All nodes in theMANET are mobile SAs register their service informationwith DAs A service query issued by a UA is handled by DAs

321 Service Registration and Deregistration in WSN Forservice registration the service information submitted to aDA consists of three parts description of the service ID of theservice provider (eg company name) andURL for accessingthe service Note that only a complete service descriptioncan be used for service registration There are 32 bytes toaccommodate the ID of service provider Though the HTTPprotocol does not stipulate the maximum length of a URLwe limit it to a maximum of 2048 bytesThe format of serviceregistration is shown in Figure 2

Since theWSN is based onChordwe denote the identifierspace of the Chord network by 2119898 In order to accommodatethe totalprod119899119901

119894=1|119901119894| different complete descriptions for profiling

services the inequality 2119898 ⩾ prod119899119901

119894=1|119901119894| should be satisfied

In our model we use the SHA-1 [43] as the consistenthash function to generate keys for both DAs and services Wedenote the hash function by 119904119867119886119904ℎ(119904119905119903119894119899119892) Upon receivinga valid service registration a DA first sends a service regis-tration acknowledgment to the SA which issued the serviceregistration Then the DA extracts the description and theID parts as a character string 119904119905119903 The key of the serviceis obtained by 119896119890119910 = 119904119867119886119904ℎ(119904119905119903) The ⟨119896119890119910URL⟩ pair isthen sent to the DA which is responsible for the key An SAcould register its service information with an arbitrary DAwithin its radio range As long as an SA receives a serviceregistration acknowledgment there is no need to register theservice again If the corresponding DA becomes out of theradio range when an SA is registering a series of services

the SA could contact another DA to register the remainingservices The service deregistration is conducted in a similarway to the service registration

322 KeyGeneration and Searching inWSN In unstructuredP2P network the searching based on a keyword is feasibleHowever the consistent hashing of filename in structuredDHT prohibits such operation in Chord As a result only theapproach of exact match worksThe inverted index proposedin [44] employs the mapping of ⟨119896119890119910119908119900119903119889 119899119900119889119890⟩ Then thesearching based on a keyword is implemented by redundancystorage The major drawback of this approach is the problemof common keywords The nodes which are responsible forcommon keywords suffer from heavy burden In our modela key is generated by hashing the character string of thedescription of a service concatenated by the service providerIDThe inclusion of the service provider ID resolves the aboveproblem of common keywords

When there is a potential need of certain service severalinterested values are selected from the list 119871 by a UAThen aservice query with the same format as a service descriptionis sent to a DA Upon receiving a service query a DAfirst checks whether there are missing values for propertiesFor a complete description the DA which received theservice query simply appends the IDs of service providersknown to it and hashes the character string composed of thedescription and the ID Then the DA searches the obtainedkeys However it is very likely that values of some propertiesare missing due to uncertainty Consequently we have anincomplete description For 119894missing values each one is filledby several most popular values queried in the pastWe denotethe number of most popular values by 119899119898119901V

After the filling operation of the original incompletedescription we have 119899119898119901V complete descriptions Then theIDs of service providers known to the DA are appended tothe complete descriptions We denote the number of serviceproviders a DA is aware of by 119899119904119901 For a scenario of 119894 =

1 119899119898119901V = 3 and 119899119904119901 = 2 the filling and appendingprocess of an incomplete description is illustrated in Figure 3Since there are six character strings of the descriptionsconcatenated by the service provider IDs we could obtainsix different keys for searching The missing of propertyvalues is allowed as it provides an open search result for aUA However since the keys are generated based on serviceinformation which is wishfully created by a UA and a DAit is worth noting that both a complete description and anincomplete description are likely to yield no search resultsFor an existing service with a search key the responsible DAwill send a service reply to the original DA which issued thesearch Then the search result is fed back to the UA by theoriginal DA

323 Topology Control and Function Tuning for WSN SinceDAs are mobile in directory-based mode the mobility hasa strong impact on the topology of the WSN Moreoverthe unpredictable node failures also exert influence on thetopology of the WSN In our model the topology control forWSN consists of two parts local location optimization andglobal location optimization

6 International Journal of Distributed Sensor Networks

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

Fill Append

i = 1

i = 0

middot middot middotpv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv2k pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

nmpv = 3 nsp = 2

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pvnp1

pvnp1

pvnp2

pvnp3

pvnp2

pvnp1

pvnp3

pvnp2

pvnp3

ID1

ID1

ID1

ID2

ID2

ID2

Figure 3 Filling and appending

N1205721

1205722

1205723

1205724

1205725

1205726uarr

Figure 4 Six areas

NS1

S2

S3

S4(x0 y0) (x0 + Δx y0)

(x0 + Δx y0 + Δy)(x0 y0 + Δy)

uarr

Figure 5 Four-step movement

The local location optimization (LLO) is performedbetween a DA and the UAs which are communicating withthe DA For an individual DA we divide its 360-degree radiorange into six equal adjacent areas 119886

119894(119894 = 1 2 6) As

shown in Figure 4 the upward direction represents northThe two salient features of the local location optimization

are privacy preservation and energy conservation As a longcommunication distance requires more energy for radiotransmission it is beneficial that the communication distancebetween a DA and a UA could be shortened once they getin touch with each other In our model the result of aservice query is sent to a UA by the original DA it queriedThis procedure makes the shortening of communicationdistance even more important Since the mobile nodes areequipped with omni-directional antennas a DA has no ideaof where a UA is and therefore is unable to determine acorrect moving direction For the sake of privacy protectiona UA is unwilling to share its location in any form (egGPS coordinates) To address this problem we develop adirection-probing algorithm to determine amoving directionfor aDAAs shown inFigure 5 this algorithmcontains a four-step movement 119904

119894(119894 = 1 2 4)

Table 1 Moving direction determination

N W S E1198861

+ minus minus minus

1198862

+ minus minus +1198863

minus minus + +1198864

minus minus + minus

1198865

minus + + minus

1198866

+ + minus minus

Considering a DA whose original location is (1199090 1199100)

and a UA whose location is unknown the DA performsthe followingmovements consecutively 119904

1(119873 Δ119910) 119904

2(119864 Δ119909)

1199043(119878 Δ119910) and 119904

4(119882 Δ119909) The values of Δ119909 and Δ119910 are both

positive After a four-step movement the DA returns to itsoriginal location (119909

0 1199100) During each step the variation of

signal intensity is recorded We denote an increase and adecrease of signal intensity by + and minus respectively Thenthe moving direction of the DA is determined according toTable 1

When there are several UAs which are communicatingwith the DA the desired moving directions related todifferent UAs might be various Generally it is consideredthat the energy consumption is in direct proportion to thecommunication distance Hence in order to reduce the totalenergy consumption the sum of distances between the DAand each UA should be as small as possible Considering twoUAs 119906119886

1and 119906119886

2 the communication distances between the

two UAs and the DA are denoted by 1199031and 1199032 respectively

In addition we denote the signal intensities of the two UAsby 1199041and 1199042 respectively We make the assumption that the

signal intensity and the communication distance follow theinverse square law 119904

119894= 1205751199032

119894 where 120575 is a constant coefficient

and 119894 = 1 2 The condition of equality for 1199031+ 1199032= 2radic1199031 sdot 1199032

is 1199031= 1199032 Moreover 119903

1= 1199032is equivalent to 119904

1= 1199042 Similarly

for 119899UAs we have the condition of equality for the inequality1199031+ 1199032+ sdot sdot sdot + 119903

119899⩾ 119899 119899radic1199031 sdot 1199032 sdot sdot sdot sdot sdot 119903119899 as 1199041 = 119904

2= sdot sdot sdot = 119904

119899

Thus themoving direction of the DA is adjusted based on theidea of equalizing the signal intensities of all UAs Howeverwhen there are several UAs this equalization process couldbe complicated Alternatively we choose to synthesize the119899 moving directions determined for the 119899 UAs with weightvalues The weight values of the UAs are calculated in reverse

International Journal of Distributed Sensor Networks 7

Direction-Probing (119889119886 119906119886 [119899])(1) original signal intensity 119906119886 [119895] 119904 (0)(2) for 119894 larr 1 to 4(3) for 119895 larr 1 to 119899

(4) if 119906119886 [119895] 119904 (119894) gt 119906119886 [119895] 119904(119894 minus 1) then(5) signal variation 119906119886 [119895] V (119894) larr ldquo+rdquo(6) else signal variation 119906119886 [119895] V (119894) larr ldquominusrdquo(7) end if(8) 119904 [119895] [119894] larr 119906119886 [119895] V (119894)(9) end for(10) end for(11) for 119895 larr 1 to 119899

(12) switch (119904 [119895])

(13) case ldquo+ minus minusminusrdquo 119906119886 [119895] 119889 = 1198861break

(14) case ldquo+ minus minus+rdquo 119906119886 [119895] 119889 = 1198862break

(15) case ldquominus minus ++rdquo 119906119886 [119895] 119889 = 1198863break

(16) case ldquominus minus +minusrdquo 119906119886 [119895] 119889 = 1198864break

(17) case ldquominus + +minusrdquo 119906119886 [119895] 119889 = 1198865break

(18) case ldquo+ + minusminusrdquo 119906119886 [119895] 119889 = 1198866break

(19) end switch(20) end for(21) 119906119886

1015840[119899] = 119900119903119889119890119903 (119886119904119888119890119899119889119894119899119892 119906119886 [119899] 119906119886 [119899] 119904 (0))

(22) 119904119904119906119898 larr 0

(23) for 119895 larr 1 to 119899

(24) 119904119904119906119898 larr 119904119904119906119898 + 1199061198861015840[119895] 119904 (0)

(25) end for(26) for 119895 larr 1 to 119899

(27) 1199061198861015840[119895] 119908 = 119904119904119906119898119906119886

1015840[119895] 119904 (0)

(28) end for(29) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (119906119886

1015840[119895] 119889 119906119886

1015840[119895] 119908)

Algorithm 1 Direction-probing procedure

proportion to their signal intensities The detailed direction-probing algorithm is illustrated in Algorithm 1 Once a finalmoving direction of theDA is obtained theDA starts tomovealong the direction When the 119899 signal intensities becomeapproximately equal to each other the DA will stop movingEach time a new UA gets in touch with the DA or an existingsession is terminated a new direction-probing procedure isinitiated

The global location optimization (GLO) is performedbetween DAs and it is based on the direction-probingalgorithm described in the local location optimization Otherthan local location optimization the global location opti-mization concentrates on topology maintenance

As a DA in the WSN has a maximum transmissionrange in order to keep the connectivity of the WSNthe relative positions among the DAs should be carefullycontrolled The global connectivity of the WSN could bedecomposed into several groups of connectivity In par-ticular we develop a connectivity maintenance algorithmto maintain the local connectivity of three DAs Con-sidering an individual DA which is denoted by 119889119886 bythe Chord protocol 119889119886 has a predecessor and a suc-cessor We denote the two DAs by 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 respectively The signal intensity between 119889119886

and 119889119886119901119903119890119889119890119888119890119904119904119900119903 is denoted by 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 Thesignal intensity between 119889119886 and 119889119886119904119906119888119888119890119904119904119900119903 is denoted

Table 2 Energy statuses and descriptions

Status Description119878119899

Normal status The remaining energy is 119864(119889119886) gt 119890120572

119878119897

Low status The remaining energy is 119890120573lt 119864(119889119886) ⩽ 119890

120572

119878119886

Alert status The remaining energy is 119890120574lt 119864(119889119886) ⩽ 119890

120573

119878119904

Serious status The remaining energy is 119864(119889119886) ⩽ 119890120574

by 119889119886119904119906119888119888119890119904119904119900119903119904 When 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904keeps decreasing 119889119886 becomes aware of the fact thatits predecessorsuccessor is moving away from it Once119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904 is lower than a threshold119904low 119889119886 initiates a direction-probing procedure to determinethe direction of the predecessorsuccessor Meanwhile itsends a SLOW DOWNmessage to the predecessorsuccessorfor notification Once a moving direction is determined 119889119886starts to move toward the predecessorsuccessor in order toprevent the signal intensity from getting too low In additionthe predecessorsuccessor which receives the SLOW DOWNmessage will adjust its movement for the purpose of gettingclose to 119889119886 Once the signal intensity between 119889119886 and thepredecessorsuccessor reaches a certain level the prede-cessorsuccessor stops getting close to 119889119886 We denote thesignal intensity of this level by 119904normal Note that when both119889119886119901119903119890119889119890119888119890119904119904119900119903119904 and 119889119886119904119906119888119888119890119904119904119900119903119904 are greater than or equalto 119904normal the 119889119886 stops moving For both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 a compromise of directions might be neededIn this case a composite moving direction is used by 119889119886 Thedetailed connectivity maintenance algorithm is illustrated inAlgorithm 2 Since the energy of a DA is limited we holdthat the function of connectivitymaintenance stops when theremaining energy of a DA is critically low and this feature isindicated by the last statement of Algorithm 2 A completefunction tuning algorithm is described later

As energy conservation is a critical issue inWSN for DAsand network life we develop a function tuning algorithmbased on the remaining energy of a DA Moreover this algo-rithm also assists the topology maintenance We denote theremaining energy of 119889119886 by 119864(119889119886) In specific the remainingenergy of a DA is classified into four statuses according tothree critical values 119890

120572 119890120573 and 119890

120574 The four energy statuses

119878119899 119878119897 119878119886 and 119878

119904are detailed in Table 2

When 119889119886 is in the normal status it is fully functionalNamely it accepts service registrations handles servicequeries sends service replies performs local location opti-mization and global location optimization and so forthOnce119889119886 enters the low status it stops performing local locationoptimization When it turns into the alert status an ALERTmessage is sent to both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 Assoon as 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 receive the ALERTmessage they both stop the local location optimizationtemporarily (even when they are in the normal status)Now the three DAs 119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903

are in preparation for the future serious status of 119889119886 Once119889119886 enters the serious status it disables all functions exceptfor performing a data transfer By the Chord protocol anode which is about to leave the network should transferall the ⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pairs it is responsible for to its

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 6: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

6 International Journal of Distributed Sensor Networks

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

middot middot middot

Fill Append

i = 1

i = 0

middot middot middotpv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv1j

pv2k pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

pv(npminus1)h

nmpv = 3 nsp = 2

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pv2k

pvnp1

pvnp1

pvnp2

pvnp3

pvnp2

pvnp1

pvnp3

pvnp2

pvnp3

ID1

ID1

ID1

ID2

ID2

ID2

Figure 3 Filling and appending

N1205721

1205722

1205723

1205724

1205725

1205726uarr

Figure 4 Six areas

NS1

S2

S3

S4(x0 y0) (x0 + Δx y0)

(x0 + Δx y0 + Δy)(x0 y0 + Δy)

uarr

Figure 5 Four-step movement

The local location optimization (LLO) is performedbetween a DA and the UAs which are communicating withthe DA For an individual DA we divide its 360-degree radiorange into six equal adjacent areas 119886

119894(119894 = 1 2 6) As

shown in Figure 4 the upward direction represents northThe two salient features of the local location optimization

are privacy preservation and energy conservation As a longcommunication distance requires more energy for radiotransmission it is beneficial that the communication distancebetween a DA and a UA could be shortened once they getin touch with each other In our model the result of aservice query is sent to a UA by the original DA it queriedThis procedure makes the shortening of communicationdistance even more important Since the mobile nodes areequipped with omni-directional antennas a DA has no ideaof where a UA is and therefore is unable to determine acorrect moving direction For the sake of privacy protectiona UA is unwilling to share its location in any form (egGPS coordinates) To address this problem we develop adirection-probing algorithm to determine amoving directionfor aDAAs shown inFigure 5 this algorithmcontains a four-step movement 119904

119894(119894 = 1 2 4)

Table 1 Moving direction determination

N W S E1198861

+ minus minus minus

1198862

+ minus minus +1198863

minus minus + +1198864

minus minus + minus

1198865

minus + + minus

1198866

+ + minus minus

Considering a DA whose original location is (1199090 1199100)

and a UA whose location is unknown the DA performsthe followingmovements consecutively 119904

1(119873 Δ119910) 119904

2(119864 Δ119909)

1199043(119878 Δ119910) and 119904

4(119882 Δ119909) The values of Δ119909 and Δ119910 are both

positive After a four-step movement the DA returns to itsoriginal location (119909

0 1199100) During each step the variation of

signal intensity is recorded We denote an increase and adecrease of signal intensity by + and minus respectively Thenthe moving direction of the DA is determined according toTable 1

When there are several UAs which are communicatingwith the DA the desired moving directions related todifferent UAs might be various Generally it is consideredthat the energy consumption is in direct proportion to thecommunication distance Hence in order to reduce the totalenergy consumption the sum of distances between the DAand each UA should be as small as possible Considering twoUAs 119906119886

1and 119906119886

2 the communication distances between the

two UAs and the DA are denoted by 1199031and 1199032 respectively

In addition we denote the signal intensities of the two UAsby 1199041and 1199042 respectively We make the assumption that the

signal intensity and the communication distance follow theinverse square law 119904

119894= 1205751199032

119894 where 120575 is a constant coefficient

and 119894 = 1 2 The condition of equality for 1199031+ 1199032= 2radic1199031 sdot 1199032

is 1199031= 1199032 Moreover 119903

1= 1199032is equivalent to 119904

1= 1199042 Similarly

for 119899UAs we have the condition of equality for the inequality1199031+ 1199032+ sdot sdot sdot + 119903

119899⩾ 119899 119899radic1199031 sdot 1199032 sdot sdot sdot sdot sdot 119903119899 as 1199041 = 119904

2= sdot sdot sdot = 119904

119899

Thus themoving direction of the DA is adjusted based on theidea of equalizing the signal intensities of all UAs Howeverwhen there are several UAs this equalization process couldbe complicated Alternatively we choose to synthesize the119899 moving directions determined for the 119899 UAs with weightvalues The weight values of the UAs are calculated in reverse

International Journal of Distributed Sensor Networks 7

Direction-Probing (119889119886 119906119886 [119899])(1) original signal intensity 119906119886 [119895] 119904 (0)(2) for 119894 larr 1 to 4(3) for 119895 larr 1 to 119899

(4) if 119906119886 [119895] 119904 (119894) gt 119906119886 [119895] 119904(119894 minus 1) then(5) signal variation 119906119886 [119895] V (119894) larr ldquo+rdquo(6) else signal variation 119906119886 [119895] V (119894) larr ldquominusrdquo(7) end if(8) 119904 [119895] [119894] larr 119906119886 [119895] V (119894)(9) end for(10) end for(11) for 119895 larr 1 to 119899

(12) switch (119904 [119895])

(13) case ldquo+ minus minusminusrdquo 119906119886 [119895] 119889 = 1198861break

(14) case ldquo+ minus minus+rdquo 119906119886 [119895] 119889 = 1198862break

(15) case ldquominus minus ++rdquo 119906119886 [119895] 119889 = 1198863break

(16) case ldquominus minus +minusrdquo 119906119886 [119895] 119889 = 1198864break

(17) case ldquominus + +minusrdquo 119906119886 [119895] 119889 = 1198865break

(18) case ldquo+ + minusminusrdquo 119906119886 [119895] 119889 = 1198866break

(19) end switch(20) end for(21) 119906119886

1015840[119899] = 119900119903119889119890119903 (119886119904119888119890119899119889119894119899119892 119906119886 [119899] 119906119886 [119899] 119904 (0))

(22) 119904119904119906119898 larr 0

(23) for 119895 larr 1 to 119899

(24) 119904119904119906119898 larr 119904119904119906119898 + 1199061198861015840[119895] 119904 (0)

(25) end for(26) for 119895 larr 1 to 119899

(27) 1199061198861015840[119895] 119908 = 119904119904119906119898119906119886

1015840[119895] 119904 (0)

(28) end for(29) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (119906119886

1015840[119895] 119889 119906119886

1015840[119895] 119908)

Algorithm 1 Direction-probing procedure

proportion to their signal intensities The detailed direction-probing algorithm is illustrated in Algorithm 1 Once a finalmoving direction of theDA is obtained theDA starts tomovealong the direction When the 119899 signal intensities becomeapproximately equal to each other the DA will stop movingEach time a new UA gets in touch with the DA or an existingsession is terminated a new direction-probing procedure isinitiated

The global location optimization (GLO) is performedbetween DAs and it is based on the direction-probingalgorithm described in the local location optimization Otherthan local location optimization the global location opti-mization concentrates on topology maintenance

As a DA in the WSN has a maximum transmissionrange in order to keep the connectivity of the WSNthe relative positions among the DAs should be carefullycontrolled The global connectivity of the WSN could bedecomposed into several groups of connectivity In par-ticular we develop a connectivity maintenance algorithmto maintain the local connectivity of three DAs Con-sidering an individual DA which is denoted by 119889119886 bythe Chord protocol 119889119886 has a predecessor and a suc-cessor We denote the two DAs by 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 respectively The signal intensity between 119889119886

and 119889119886119901119903119890119889119890119888119890119904119904119900119903 is denoted by 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 Thesignal intensity between 119889119886 and 119889119886119904119906119888119888119890119904119904119900119903 is denoted

Table 2 Energy statuses and descriptions

Status Description119878119899

Normal status The remaining energy is 119864(119889119886) gt 119890120572

119878119897

Low status The remaining energy is 119890120573lt 119864(119889119886) ⩽ 119890

120572

119878119886

Alert status The remaining energy is 119890120574lt 119864(119889119886) ⩽ 119890

120573

119878119904

Serious status The remaining energy is 119864(119889119886) ⩽ 119890120574

by 119889119886119904119906119888119888119890119904119904119900119903119904 When 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904keeps decreasing 119889119886 becomes aware of the fact thatits predecessorsuccessor is moving away from it Once119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904 is lower than a threshold119904low 119889119886 initiates a direction-probing procedure to determinethe direction of the predecessorsuccessor Meanwhile itsends a SLOW DOWNmessage to the predecessorsuccessorfor notification Once a moving direction is determined 119889119886starts to move toward the predecessorsuccessor in order toprevent the signal intensity from getting too low In additionthe predecessorsuccessor which receives the SLOW DOWNmessage will adjust its movement for the purpose of gettingclose to 119889119886 Once the signal intensity between 119889119886 and thepredecessorsuccessor reaches a certain level the prede-cessorsuccessor stops getting close to 119889119886 We denote thesignal intensity of this level by 119904normal Note that when both119889119886119901119903119890119889119890119888119890119904119904119900119903119904 and 119889119886119904119906119888119888119890119904119904119900119903119904 are greater than or equalto 119904normal the 119889119886 stops moving For both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 a compromise of directions might be neededIn this case a composite moving direction is used by 119889119886 Thedetailed connectivity maintenance algorithm is illustrated inAlgorithm 2 Since the energy of a DA is limited we holdthat the function of connectivitymaintenance stops when theremaining energy of a DA is critically low and this feature isindicated by the last statement of Algorithm 2 A completefunction tuning algorithm is described later

As energy conservation is a critical issue inWSN for DAsand network life we develop a function tuning algorithmbased on the remaining energy of a DA Moreover this algo-rithm also assists the topology maintenance We denote theremaining energy of 119889119886 by 119864(119889119886) In specific the remainingenergy of a DA is classified into four statuses according tothree critical values 119890

120572 119890120573 and 119890

120574 The four energy statuses

119878119899 119878119897 119878119886 and 119878

119904are detailed in Table 2

When 119889119886 is in the normal status it is fully functionalNamely it accepts service registrations handles servicequeries sends service replies performs local location opti-mization and global location optimization and so forthOnce119889119886 enters the low status it stops performing local locationoptimization When it turns into the alert status an ALERTmessage is sent to both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 Assoon as 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 receive the ALERTmessage they both stop the local location optimizationtemporarily (even when they are in the normal status)Now the three DAs 119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903

are in preparation for the future serious status of 119889119886 Once119889119886 enters the serious status it disables all functions exceptfor performing a data transfer By the Chord protocol anode which is about to leave the network should transferall the ⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pairs it is responsible for to its

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 7: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 7

Direction-Probing (119889119886 119906119886 [119899])(1) original signal intensity 119906119886 [119895] 119904 (0)(2) for 119894 larr 1 to 4(3) for 119895 larr 1 to 119899

(4) if 119906119886 [119895] 119904 (119894) gt 119906119886 [119895] 119904(119894 minus 1) then(5) signal variation 119906119886 [119895] V (119894) larr ldquo+rdquo(6) else signal variation 119906119886 [119895] V (119894) larr ldquominusrdquo(7) end if(8) 119904 [119895] [119894] larr 119906119886 [119895] V (119894)(9) end for(10) end for(11) for 119895 larr 1 to 119899

(12) switch (119904 [119895])

(13) case ldquo+ minus minusminusrdquo 119906119886 [119895] 119889 = 1198861break

(14) case ldquo+ minus minus+rdquo 119906119886 [119895] 119889 = 1198862break

(15) case ldquominus minus ++rdquo 119906119886 [119895] 119889 = 1198863break

(16) case ldquominus minus +minusrdquo 119906119886 [119895] 119889 = 1198864break

(17) case ldquominus + +minusrdquo 119906119886 [119895] 119889 = 1198865break

(18) case ldquo+ + minusminusrdquo 119906119886 [119895] 119889 = 1198866break

(19) end switch(20) end for(21) 119906119886

1015840[119899] = 119900119903119889119890119903 (119886119904119888119890119899119889119894119899119892 119906119886 [119899] 119906119886 [119899] 119904 (0))

(22) 119904119904119906119898 larr 0

(23) for 119895 larr 1 to 119899

(24) 119904119904119906119898 larr 119904119904119906119898 + 1199061198861015840[119895] 119904 (0)

(25) end for(26) for 119895 larr 1 to 119899

(27) 1199061198861015840[119895] 119908 = 119904119904119906119898119906119886

1015840[119895] 119904 (0)

(28) end for(29) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (119906119886

1015840[119895] 119889 119906119886

1015840[119895] 119908)

Algorithm 1 Direction-probing procedure

proportion to their signal intensities The detailed direction-probing algorithm is illustrated in Algorithm 1 Once a finalmoving direction of theDA is obtained theDA starts tomovealong the direction When the 119899 signal intensities becomeapproximately equal to each other the DA will stop movingEach time a new UA gets in touch with the DA or an existingsession is terminated a new direction-probing procedure isinitiated

The global location optimization (GLO) is performedbetween DAs and it is based on the direction-probingalgorithm described in the local location optimization Otherthan local location optimization the global location opti-mization concentrates on topology maintenance

As a DA in the WSN has a maximum transmissionrange in order to keep the connectivity of the WSNthe relative positions among the DAs should be carefullycontrolled The global connectivity of the WSN could bedecomposed into several groups of connectivity In par-ticular we develop a connectivity maintenance algorithmto maintain the local connectivity of three DAs Con-sidering an individual DA which is denoted by 119889119886 bythe Chord protocol 119889119886 has a predecessor and a suc-cessor We denote the two DAs by 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 respectively The signal intensity between 119889119886

and 119889119886119901119903119890119889119890119888119890119904119904119900119903 is denoted by 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 Thesignal intensity between 119889119886 and 119889119886119904119906119888119888119890119904119904119900119903 is denoted

Table 2 Energy statuses and descriptions

Status Description119878119899

Normal status The remaining energy is 119864(119889119886) gt 119890120572

119878119897

Low status The remaining energy is 119890120573lt 119864(119889119886) ⩽ 119890

120572

119878119886

Alert status The remaining energy is 119890120574lt 119864(119889119886) ⩽ 119890

120573

119878119904

Serious status The remaining energy is 119864(119889119886) ⩽ 119890120574

by 119889119886119904119906119888119888119890119904119904119900119903119904 When 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904keeps decreasing 119889119886 becomes aware of the fact thatits predecessorsuccessor is moving away from it Once119889119886119901119903119890119889119890119888119890119904119904119900119903119904 or 119889119886119904119906119888119888119890119904119904119900119903119904 is lower than a threshold119904low 119889119886 initiates a direction-probing procedure to determinethe direction of the predecessorsuccessor Meanwhile itsends a SLOW DOWNmessage to the predecessorsuccessorfor notification Once a moving direction is determined 119889119886starts to move toward the predecessorsuccessor in order toprevent the signal intensity from getting too low In additionthe predecessorsuccessor which receives the SLOW DOWNmessage will adjust its movement for the purpose of gettingclose to 119889119886 Once the signal intensity between 119889119886 and thepredecessorsuccessor reaches a certain level the prede-cessorsuccessor stops getting close to 119889119886 We denote thesignal intensity of this level by 119904normal Note that when both119889119886119901119903119890119889119890119888119890119904119904119900119903119904 and 119889119886119904119906119888119888119890119904119904119900119903119904 are greater than or equalto 119904normal the 119889119886 stops moving For both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and119889119886119904119906119888119888119890119904119904119900119903 a compromise of directions might be neededIn this case a composite moving direction is used by 119889119886 Thedetailed connectivity maintenance algorithm is illustrated inAlgorithm 2 Since the energy of a DA is limited we holdthat the function of connectivitymaintenance stops when theremaining energy of a DA is critically low and this feature isindicated by the last statement of Algorithm 2 A completefunction tuning algorithm is described later

As energy conservation is a critical issue inWSN for DAsand network life we develop a function tuning algorithmbased on the remaining energy of a DA Moreover this algo-rithm also assists the topology maintenance We denote theremaining energy of 119889119886 by 119864(119889119886) In specific the remainingenergy of a DA is classified into four statuses according tothree critical values 119890

120572 119890120573 and 119890

120574 The four energy statuses

119878119899 119878119897 119878119886 and 119878

119904are detailed in Table 2

When 119889119886 is in the normal status it is fully functionalNamely it accepts service registrations handles servicequeries sends service replies performs local location opti-mization and global location optimization and so forthOnce119889119886 enters the low status it stops performing local locationoptimization When it turns into the alert status an ALERTmessage is sent to both 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 Assoon as 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903 receive the ALERTmessage they both stop the local location optimizationtemporarily (even when they are in the normal status)Now the three DAs 119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 and 119889119886119904119906119888119888119890119904119904119900119903

are in preparation for the future serious status of 119889119886 Once119889119886 enters the serious status it disables all functions exceptfor performing a data transfer By the Chord protocol anode which is about to leave the network should transferall the ⟨119896119890119910 119889119886119905119886119894119905119890119898⟩ pairs it is responsible for to its

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 8: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

8 International Journal of Distributed Sensor Networks

119862119900119899119899119890119888119905119894V119894119905119910119872119886119894119899119905119890119899119886119899119888119890 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886119904119906119888119888119890119904119904119900119903)

(1) repeat(2) 119865119871119860119866

1larr 119891119886119897119904119890

(3) 1198651198711198601198662larr 119891119886119897119904119890

(4) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 lt 119904low then(5) 119865119871119860119866

1larr 119905119903119906119890

(6) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119901119903119890119889119890119888119890119904119904119900119903)(7) 119889119886119889

1= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(8) if 119889119886119901119903119890119889119890119888119890119904119904119900119903 received SLOW DOWN then(9) 119889119886119901119903119890119889119890119888119890119904119904119900119903119889 = 119889119886119901119903119890119889119890119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119901119903119890119889119890119888119890119904119904119900119903 119889119886)(10) 119889119886119901119903119890119889119890119888119890119904119904119900119903119898119900V119890 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)(11) end if(12) end if(13) if 119889119886119904119906119888119888119890119904119904119900119903119904 lt 119904low then(14) 119865119871119860119866

2larr 119905119903119906119890

(15) 119889119886119904119890119899119889 (SLOW DOWN 119889119886119904119906119888119888119890119904119904119900119903)(16) 119889119886119889

2= 119889119886119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886 119889119886119904119906119888119888119890119904119904119900119903)

(17) if 119889119886119904119906119888119888119890119904119904119900119903 received SLOW DOWN then(18) 119889119886119904119906119888119888119890119904119904119900119903119889 = 119889119886119904119906119888119888119890119904119904119900119903119889119894119903119890119888119905119894119900119899-119901119903119900119887119894119899119892 (119889119886119904119906119888119888119890119904119904119900119903 119889119886)(19) 119889119886119904119906119888119888119890119904119904119900119903119898119900V119890 (119889119886119904119906119888119888119890119904119904119900119903119889)(20) end if(21) end if(22) if 119865119871119860119866

1ampamp119865119871119860119866

2== 119905119903119906119890 then

(23) 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904

(24) 119889119886119904119906119888119888119890119904119904119900119903119908 = (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 + 119889119886119904119906119888119888119890119904119904119900119903119904) 119889119886119904119906119888119888119890119904119904119900119903119904

(25) 119889119886119889 = 119904119910119899119905ℎ119890119904119894119904 (1198891198861198891 119889119886119889

2 119889119886119901119903119890119889119890119888119890119904119904119900119903119908 119889119886119904119906119888119888119890119904119904119900119903119908)

(26) else if 1198651198711198601198661== 119905119903119906119890 then

(27) 119889119886119889 = 1198891198861198891

(28) else if 1198651198711198601198662== 119905119903119906119890 then

(29) 119889119886119889 = 1198891198861198892

(30) end if(31) end if(32) end if(33) 119889119886119898119900V119890 (119889119886119889)(34) if 119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal then(35) 119889119886119901119903119890119889119890119888119890119904119904119900119903119904119905119900119901 (119889119886119901119903119890119889119890119888119890119904119904119900119903119889)

(36) end if(37) if 119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal then(38) 119889119886119904119906119888119888119890119904119904119900119903119904119905119900119901 (119889119886119904119906119888119888119890119904119904119900119903119889)

(39) end if(40) if (119889119886119901119903119890119889119890119888119890119904119904119900119903119904 ⩾ 119904normal)ampamp (119889119886119904119906119888119888119890119904119904119900119903119904 ⩾ 119904normal) then(41) 119889119886119904119905119900119901 (119889119886119889)

(42) end if(43) until 119864 (119889119886) ⩽ 119890

120574

Algorithm 2 Connectivity maintenance procedure

successor When the transfer completes the leaving nodenotifies its predecessor to change successor to the successorof the leaving node Similarly the successor of the leavingnode is notified to change predecessor to the predecessorof the leaving node Finally the leaving node is completelyisolated from the Chord network the successor of its formerpredecessor is now its former successor and the predecessorof its former successor is now its former predecessor Thenthe former predecessor of 119889119886 sets the availability of 119889119886 toLOGOUT in a monitoring token the information about themonitoring token is provided later in Section 34

As described above when the status of aDA changes fromnormal to low there is only one function that is removed

namely the local location optimization All the remainingfunctions of a DA are operational in three statuses normallow and alert The function of global location optimizationis removed when the status of a DA changes to seriousHence this function tuning algorithm significantly assiststhe connectivity maintenance The detailed function tuningalgorithm is illustrated in Algorithm 3

33 Directory-Less Mode In directory-less mode all DAs inthe MANET are stationary However they still keep forminga Chord network Other nodes in the MANET are mobilenamely UAs and SAs Though the WSN based on the Chordprotocol still exists there are no topology control and key

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 9: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 9

119865119906119899119888119905119894119900119899119879119906119899119894119899119892 (119889119886 119890120572 119890120573 119890120574)

(1) if 119864 (119889119886) gt 119890120572then 119878 = 119878

119899

(2) else if 119890120573lt 119864 (119889119886) ⩽ 119890

120572then 119878 = 119878

119897

(3) else if 119890120574lt 119864 (119889119886) ⩽ 119890

120573then 119878 = 119878

119886

(4) else 119864 (119889119886) ⩽ 119890120574then 119878 = 119878

119904

(5) end if(6) switch (119878)

(7) case 119878119899 break

(8) case 119878119897 119889119886119891119906119899119888119905119894119900119899 larr 119889119886119891119906119899119888119905119894119900119899 LLO

(9) break(10) case 119878

119886 119889119886119904119890119899119889 (ALERT 119889119886119901119903119890119889119890119888119890119904119904119900119903)

(11) 119889119886119904119890119899119889 (ALERT 119889119886119904119906119888119888119890119904119904119900119903)(12) break(13) case 119878

119904 119889119886119891119906119899119888119905119894119900119899 larr 0

(14) 119889119886119905119903119886119899119904119891119890119903 (⟨119896119890119910URL⟩ 119889119886119904119906119888119888119890119904119904119900119903)(15) 119889119886119904119890119899119889 (CHANGE SUCCESSOR (119889119886119904119906119888119888119890119904119904119900119903) 119889119886119901119903119890119889119890119888119890119904119904119900119903)(16) 119889119886119904119890119899119889 (CHANGE PREDECESSOR (119889119886119901119903119890119889119890119888119890119904119904119900119903) 119889119886119904119906119888119888119890119904119904119900119903)(17) break(18) end switch

Algorithm 3 Function tuning procedure

searching based on the Chord network Thus the directory-less mode is much simpler than the directory-based modeFor DAs and SAs the service registration is operational asbefore This is done to get prepared for a mode switchThe mode switch between the directory-based mode anddirectory-less mode is detailed later in Section 34 In classicdirectory-less architectures there are only UAs and SAsHence there is no so called relaying function associatedwith DAs The service discovery is only conducted basedon service queries issued by UAs and service advertisementsissued by SAs In our model the DAs provide relaying func-tion for service queries service advertisements and servicerepliesMoreover sinceDAs possess a large amount of serviceinformation a DA could issue a service reply to answer aservice query based on the service information it has (serviceinformation it originally knows and service information itlearns through the relaying) For the purpose of mitigatingthe flooding problem and improving the performance ofservice discovery we develop a two-hop zone scheme for thedirectory-less mode

331 Two-Hop Zone Scheme For a node 119899119894in the MANET

network the two-hop zone of 119899119894consists of two parts one-

hop neighbors and two-hop neighbors A one-hop neighbor119899119900of node 119899

119894is a node which is one hop away from node

119899119894 Though there might be several paths between 119899

119894and 119899

119900

the shortest path between them is one hopThe sufficient andnecessary condition for a node 119899

119900to be a one-hop neighbor

of node 119899119894is that they are able to directly communicate with

each otherThe degree of node 119899119894 namely the number of one-

hop neighbors of 119899119894 is denoted by 119889

(1198941) Then we denote the

set of one-hop neighbors of 119899119894by

119873(1198941)

= 1198991198941 1198991198942 119899

119894119889(1198941)

(1)

Similarly a two-hop neighbor 119899119905of node 119899

119894is a node

which is two hops away from node 119899119894 Though there might

be several paths between 119899119894and 119899119905 the shortest path between

them is two hops The sufficient and necessary condition fora node 119899

119905to be a two-hop neighbor of node 119899

119894is that they are

not able to directly communicate with each other and node 119899119905

is a one-hop neighbor of node 119899119894rsquos one-hop neighbor(s) The

number of two-hop neighbors of 119899119894is denoted by 119889

(1198942) The

set of two-hop neighbors of 119899119894is

119873(1198942)

= 119873(11989411)

cup 119873(11989421)

cup sdot sdot sdot cup 119873(119894119889(1198941)1) 119873(1198941)

(2)

By the definition of a two-hop neighbor the number oftwo-hop neighbors of node 119899

119894can be calculated as

119889(1198942)

=

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

100381610038161003816100381610038161003816100381610038161003816100381610038161003816

minus 1 (3)

Note that node 119899119894is a one-hop neighbor of its one-hop

neighbor(s) namely

119899119894isin ⋃

119899119894119895isin119873(1198941)

119873(1198941198951)

119873(1198941)

(4)

Thus node 119899119894should be excluded from the calculation of

119889(1198942)

For an individual node 119899

119894in the MANET network we

denote the frequency of service advertisement of 119899119894by 119889119891119894

A service advertisement contains a set of service recordsWe denote the set of service records contained in a serviceadvertisement by 119863(119899

119894) where |119863(119899

119894)| ⩾ 1 During a certain

measurement period the average number of service recordssent by node 119899

119894is 119889119894per advertisementThen we have 119889

119894⩾ 1

In order to facilitate the presentation of our two-hop zonescheme we make the following premise

Premise 1 Let [119905119886 119905119887] be ameasurement period where 119905

119886lt 119905119887

We assume that the period is sufficiently long to observe the

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 10: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

10 International Journal of Distributed Sensor Networks

behaviors of node 119899119894together with its one-hop neighbors and

two-hop neighbors Moreover the behavior characteristicsof every node considered remain unchanged such as thefrequency of service advertisement the frequency of servicequery and the average number of service records per adver-tisement

Node 119899119894receives the service advertisements from all its

one-hop neighbors An update of its local database is carriedout according to the service information contained in thereceived service advertisements Since the frequencies ofservice advertisement vary from node to node the serviceadvertisements from the one-hop neighbors of node 119899

119894are

arrived asynchronously Moreover the frequency of serviceadvertisement of a particular node may change from time totime Hence the service advertisements from the one-hopneighbors of node 119899

119894are arrived randomly For simplicity

we assume that the frequencies of service advertisementof all nodes in the network remain constant during themeasurement period [119905

119886 119905119887] In essence this assumption is

given by Premise 1We denote the total number of service records contained

in the service advertisements received by node 119899119894by 119904119889(119894119903)

and it is computed as

119904119889(119894119903)

= sum

119899119894119895isin119873(1198941)

119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (5)

For each one-hop neighbor of 119899119894 the number of service

records advertised by 119899119894119895is calculated bymultiplying the aver-

age number of service records per advertisement by the timesof service advertisement during the measurement period[119905119886 119905119887] Premise 1 guarantees that each one-hop neighbor of

119899119894performs the service advertisement at least once during the

measurement period [119905119886 119905119887]Thus the result of 119889119891

(119894119895)sdot (119905119887minus119905119886)

is greater than or equal to 1 For a noninteger number of thetimes of service advertisement the floor operation rounds theresult to the biggest integer which is less than 119889119891

(119894119895)sdot (119905119887minus 119905119886)

If node 119899119894is a UA or DA it forwards the received

service advertisements to all its one-hop neighbors Whennode 119899

119894is an SA besides forwarding the received service

advertisements it also issues service advertisements Wedenote the total number of service records sent by node 119899

119894

by 119904119889(119894119904)

and it consists of two parts

119904119889(119894119904)

= 119904119889(119894)+ 119904119889(119894119891)

(6)

Node 119899119894issues its own service advertisements to all its

one-hop neighbors at the frequency of 119889119891119894 The total number

of service records issued by node 119899119894is denoted by 119904119889

(119894) which

is computed as

119904119889(119894)= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor (7)

119904119889(119894)

is calculated by multiplying the average number of ser-vice records per advertisement by the times of service adver-tisement during the measurement period [119905

119886 119905119887] Premise 1

guarantees that node 119899119894performs the service advertisement

at least once during the measurement period [119905119886 119905119887] Hence

the result of 119889119891119894sdot (119905119887minus 119905119886) is greater than or equal to 1 For a

noninteger number of the times of service advertisement the

floor operation rounds the result to the biggest integer whichis less than 119889119891

119894sdot (119905119887minus 119905119886)

Node 119899119894forwards the service advertisements received

from other nodes The total number of service recordsforwarded by node 119899

119894is denoted by 119904119889

(119894119891) Among the service

advertisements received by 119899119894 whose TTL values are greater

than 0 should be forwarded by node 119899119894 As the two-hop zone

scheme we proposed stipulates that the initial TTL value ofa service advertisement is 2 the TTL value of each serviceadvertisement received by node 119899

119894is either 1 or 0 Thus the

coverage of the original service advertisement issued by node119899119894is its one-hop and two-hop neighbors In other words

the propagation range of an original service advertisementis limited within the two-hop zone of the issuing nodeThis characteristic could mitigate the flooding problem andreduce themessage overhead imposed on the whole network

Suppose the TTL value of the received service advertise-ments is under Poisson distribution

119875 TTL = k =120582119896

119889sdot 119890minus120582119889

119896 120582119889gt 0 119896 = 0 1 (8)

In our two-hop zone scheme node 119899119894is supposed to

forward the received service advertisements to all its one-hop neighbors However it is necessary that the serviceadvertisements sent to 119899

119894by its own one-hop neighbor

119899119894119895

should not be forwarded back to 119899119894119895

by 119899119894 Though

the corresponding one-hop neighbor might vary from oneservice advertisement to another we denote it by a node 119899

119894119910

universally Then the total number of service advertisementsforwarded by node 119899

119894is computed as

120582119889sdot 119890minus120582119889 sdot sum

119899119894119895isin119873(1198941)

(lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1)) (9)

The universal node 119899119894119910is excluded by theminus one oper-

ation Note that (9) is the number of service advertisementsrather than the number of service records As mentionedabove the number of service records contained in a validservice advertisement is greater than or equal to oneThe totalnumber of service records forward by node 119899

119894is computed as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889

sdot sum

119899119894119895isin119873(1198941)

(119889(119894119895)

sdot lfloor119889119891(119894119895)

sdot (119905119887minus 119905119886)rfloor sdot (119889

(1198941)minus 1))

(10)

Combining (5) and (10) we have the total number ofservice records forwarded by node 119899

119894as

119904119889(119894119891)

= 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(11)

Then (6) could be rewritten as

119904119889(119894119904)

= 119889119894sdot lfloor119889119891119894sdot (119905119887minus 119905119886)rfloor

+ 120582119889sdot 119890minus120582119889 sdot (119889(1198941)

minus 1) sdot 119904119889(119894119903)

(12)

That is to say each one-hop neighbor of node 119899119894receives

119904119889(119894119904)

service records from 119899119894

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 11: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 11

When node 119899119894receives a service query it checks its local

database If the service query could be answered locally thereis no need to send it out Otherwise node 119899

119894sends it to its

one-hop neighbors Every one-hop neighbor of 119899119894will receive

a duplicate of the service query While a service query istraveling through the network the intermediate nodes will berecorded successively in a travel path This path informationstored in the service query plays an important role for thetransmission of a service reply

We denote the total number of service queries sent bynode 119899

119894by 119904119904(119894119904)

and it consists of two parts

119904119904(119894119904)

= 119904119904(119894)+ 119904119904(119894119891)

(13)

Suppose node 119899119894issues its own service queries to all its

one-hop neighbors at the frequency of 119904119891119894 If the average

number of service requests contained in the service queriesissued by node 119899

119894is 119904119894per service query the total number

of service requests issued by 119899119894is denoted by 119904119904

(119894) which is

computed as

119904119904(119894)= 119904119894sdot lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor (14)

In our two-hop scheme we stipulate that a service querycontains exactly one service request Hence 119904

119894is identically

equal to 1 In the reminder of this paper we use a servicerequest and a service query interchangeably

For the service queries received from other nodes node119899119894checks its local database to determine whether a service

query could be answered locally If a service query could beanswered locally node 119899

119894will issue a service reply designated

to the node which originally issued the service query Theservice queries which cannot be answered by node 119899

119894are

disposed according to their TTL values If the TTL value of aservice query is 0 it will be dropped by node 119899

119894 without any

forwardingThe service queries whose TTL values are greaterthan 0 will be forwarded by node 119899

119894 Our two-hop scheme

stipulates that the initial TTL value of a service query is 4Thus the TTL values of the service queries received by node119899119894are within the set 3 2 1 0 Meanwhile the coverage of an

original service query issued by node 119899119894is two two-hop zones

In another word an original service query is restricted withintwo two-hop zones of the issuing node The same as theservice advertisement an upper bound of the initial TTL of aservice query is to alleviate the flooding problem and weakenthe message overhead imposed on the whole network

Suppose the TTL value of the received service queries isunder Poisson distribution

119875 TTL = 119896 =120582119896

119904119890minus120582119904

119896 120582119904gt 0 119896 = 0 1 2 3 (15)

We consider all the service queries sent to node 119899119894are

directly from its one-hop neighbors We denote the totalnumber of service queries received by node 119899

119894by 119904119904(119894119903)

itcould be calculated as

119904119904(119894119903)

= sum

119899(119894119895)isin119873(1198941)

119904(119894119895)

sdot lfloor119904119891(119894119895)

sdot (119905119887minus 119905119886)rfloor (16)

Suppose that node 119899119894could be able to answer 119886

119894percent

of the service queries sent to it The same as the serviceadvertisement a service query sent to 119899

119894by its one-hop

neighbor 119899119894119895should not be forwarded back to 119899

119894119895by 119899119894 Then

the number of service queries that should be forwarded bynode 119899

119894is obtained analogously

119904119904(119894119891)

= (120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(17)

Then (13) could be rewritten as

119904119904(119894119904)

= lfloor119904119891119894sdot (119905119887minus 119905119886)rfloor + (

120582119904119890minus120582119904

1+1205822

119904119890minus120582119904

2+1205823

119904119890minus120582119904

3)

sdot (119889(1198941)

minus 1) sdot (1 minus 119886119894) sdot 119904119904(119894119903)

(18)

Compared with service advertisement and service querythe number of service replies is small in nature In general theoccurrence of a service reply is unpredictable and irregularIt is actually meaningless to impose restrictions on thesending frequency of a service reply Moreover in order toimprove the performance of service discovery we do notassign a specific upper bound to the initial TTL value ofa service reply A service reply uses the path informationcontained in the corresponding service query The servicereplies designated to node 119899

119894are corresponding to the service

queries issued by 119899119894

Wedenote the total number of service replies sent by node119899119894by 119904119903(119894119904)

it consists of two parts

119904119903(119894119904)

= 119904119903(119894)+ 119904119903(119894119891)

(19)

119904119903(119894)

denotes the number of service replies correspondingto the service queries which are answered by node 119899

119894itself

As mentioned above node 119899119894could be able to answer 119886

119894

percent of the service queries sent to it Hence 119904119903(119894)could be

computed as

119904119903(119894)= 119886119894sdot 119904119904(119894119903)

(20)

Besides sending its own service replies node 119899119894also for-

wards the service replies designated to other nodes Amongthe service replies received by node 119899

119894 those designated to

node 119899119894will not be forwarded by 119899

119894 For a service reply

designated to another node node 119899119894will try to forward it to

the next node according the path information contained inthe service reply If the particular next node is not availablethe service reply will be dropped by node 119899

119894 Now we denote

the total number of service replies received by node 119899119894by

119904119903(119894119903)

Suppose that 119887119894percent of the service replies received by

node 119899119894are designated to it Among the service replies which

should be forwarded by node 119899119894 we assume that 119891

119894percent of

them cannot be delivered to the next node for the next nodemight be failed or out of the radio range of node 119899

119894 Then the

total number of service replies forwarded by node 119899119894could be

calculated as

119904119903(119894119891)

= (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(21)

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 12: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

12 International Journal of Distributed Sensor Networks

ni nj

(a)

ni nj

nm1

(b)

ni nj

nm1 nm2

(c)

ni nj

nm1

nm2

nm3

(d)

ni nj

nm1

nm2

nm4

nm3

(e)

Figure 6 Node relationships under the two-hop zone scheme

Combining (19) (20) and (21) the total number ofservice replies sent by node 119899

119894could be rewritten as

119904119903(119894119904)

= 119886119894sdot 119904119904(119894119903)

+ (1 minus 119887119894) sdot (1 minus 119891

119894) sdot 119904119903(119894119903)

(22)

332 Level of Connectivity In order to facilitate a furtherinvestigation of the two-hop zone scheme we propose a novelmethod to calculate the level of connectivity for the wholenetwork based on the two-hop zone scheme In the first placewe formulate the level of connectivity of two arbitrary nodesunder the two-hop zone scheme For two arbitrary nodes 119899

119894

and 119899119895 the relationship between them is denoted by119891

119896(119899119894 119899119895)

where 119896 indicates the number of hops in the shortest pathbetween 119899

119894and 119899119895 As depicted in Figure 6 the shortest path

between two arbitrary nodes 119899119894and 119899119895can be divided into five

cases The intermediate nodes are denoted by 119899119898119894

In Figure 6(a) node 119899119894and node 119899

119895are able to directly

communicate with each other The number of hops betweenthem is 1 In this case we have

1198911(119899119894 119899119895) sim (119899

119894isin 119873(1198951)

) (119899119895isin 119873(1198941)

) (23)

In Figure 6(b) the number of hops between node 119899119894and

node node119895is 2 They share the same one-hop neighbor 119899

1198981

Node node119895is within the two-hop zone of node 119899

119894 In this

case we have

1198912(119899119894 119899119895) sim (119899

119894isin 119873(1198952)

) (119899119895isin 119873(1198942)

)

(1198991198981

isin 119873(1198941)

cap 119873(1198951)

)

(24)

In Figure 6(c) the number of hops between node 119899119894and

node 119899119895is 3 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a one-hop

neighbor of node 119899119895 119899119895is within the two-hop zone of node

1198991198982 In this case we have

1198913(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

)

(1198991198981

isin 119873(1198952)

) (1198991198982

isin 119873(1198951)

)

(25)

In Figure 6(d) the number of hops between node 119899119894and

node 119899119895is 4 Node 119899

119894has a one-hop neighbor node 119899

1198981and

a two-hop neighbor node 1198991198982 Since node 119899

1198982is a two-hop

neighbor of node 119899119895 node 119899

119895is within the two-hop zone

of node 1198991198982 Node 119899

119894and node 119899

119895share the same two-hop

neighbor node 1198991198982 In this case we have

1198914(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

cap 119873(1198952)

)

(1198991198983

isin 119873(1198951)

) (1198991198982

isin 119873(11989811)

cap 119873(11989831)

)

(26)

In Figure 6(e) the number of hops between node 119899119894and

node 119899119895is greater that 4 Node 119899

119894has a one-hop neighbor

node 1198991198981

and a two-hop neighbor node 1198991198982 Node 119899

119895has a

one-hop neighbor node 1198991198984

and a two-hop neighbor node1198991198983 The dotted line ellipse indicates that nodes 119899

1198982and 119899

1198983

are connected as the same with node 119899119894and node 119899

119895in the

previous four cases namely 1198911 1198912 1198913 and 119891

4 In this case

the relationship between 119899119894and 119899119895is expressed recursively by

119891gt4(119899119894 119899119895) sim (119899

1198981isin 119873(1198941)

) (1198991198982

isin 119873(1198942)

) (1198991198983

isin 119873(1198952)

)

(1198991198984

isin 119873(1198951)

) 119891119896minus4

(1198991198982 1198991198983)

(27)

where 119891119896minus4

(1198991198982 1198991198983) indicates the relationship between 119899

1198982

and 1198991198983

More complex situations can be decomposed and mod-eled through the iteration of different cases illustrated inFigure 6

The level of connectivity between node 119899119894and node 119899

119895is

denoted by 119889(119899119894 119899119894) It is defined as

119889 (119899119894 119899119895) =

0 119896 = 0

1

119896 119896 = 1 2 3 4

1

4 + 1119889 (11989910158401015840119894 11989910158401015840119895)

119896 gt 4

(28)

For 119896 = 0 there is no path between 119899119894and 119899

119895 then

we define 119889(119899119894 119899119895) = 0 When 119896 ⩾ 0 the level of

connectivity between two nodes monotonically decreaseswith the increase of the number of hops between them For119896 = 1 2 3 and 4 the reciprocal of 119896 is used as the value of119889(119899119894 119899119895) For 119896 gt 4 the calculation of 119889(119899

119894 119899119895) cannot be

done within the two-hop zones of 119899119894and 119899

119895 The value of

119889(119899119894 119899119895) is determined recursively Trivially a two-hop zone

of a node covers two hops Thus each time 119896 is beyond amultiple of 4 another calculation of the level of connectivity isrequiredThen the number of recursions could be calculatedas 119877 = lfloor(119896 minus 1)4rfloor

In the case of 119896 gt 4 node 11989910158401015840119894is the particular two-hop

neighbor of node 119899119894which lies in the shortest path between

119899119894and 119899119895 so do node 11989910158401015840

119895and node 119899

119895 Taking Figure 6(e) for

example the level of connectivity between node 119899119894and node

119899119895is computed by

119889 (119899119894 119899119895) =

1

4 + 1119889 (1198991198982 1198991198983) (29)

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 13: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 13

IDSA1SA2

AvailabilityY

LOGOUT

SA list

DA listID Status

DA1DA2DA3DA4DA5

Availability

YYY

LOGOUTLOGOUT

MODEDA-BAEDDA-LESS

Monitoring token

middot middot middot middot middot middot middot middot middot middot middot middot middot middot middot

+

+

++

Figure 7 Monitoring token

Suppose the set of nodes which node 119899119894could commu-

nicate with is denoted by set 119873119888= 1198991 1198992 119899

119888 Then we

define the level of connectivity for node 119899119894as

119889 (119899119894) =

119888

sum

119895=1

119889 (119899119894 119899119895) (30)

For 119873 nodes in the whole network there exist 1198622119873

=

119873(119873 minus 1)2 different pairs among them We define the levelof connectivity for the network as

119889 (119873) = sum

forall119899119894isin119873forall119899

119895isin119873

119889 (119899119894 119899119895) 119899

119894= 119899119895 (31)

Theoretically a sufficiently large value of 119877 could resultin a situation that there always exists a path between twoarbitrary nodes irrespective of the magnitude of119873 With theincrease of 119877 the value of 119889(119873) will keep increasing untilinflection point (119897 119889) is reached Here 119889 is the maximum of119889(119873) For 119877 ⩾ 119889(119873) equiv 119889 In addition we define as thedegree of convergence of the network The smaller the isthe better the network converges

34 Autonomic Switch between TwoModes In order to facil-itate the information updating and network status gatheringin the WSN we introduce a monitoring token which is keptpassing around the Chord network The autonomic switchbetween the directory-based mode and the directory-lessmode is based on the network status gathering By a roundwe mean that the monitoring token is transmitted by allthe DAs once The current mode of the service discoveryarchitecture is indicated by a flag called MODE and its valueis DA-BASEDorDA-LESS In addition themonitoring tokencontains two lists the SA list 119904119886119897 and the DA list 119889119886119897 Thestructure of the monitoring token is shown in Figure 7

Though the unified service information managementscheme described in Section 313 stipulates that all nodes inthe MANET have knowledge of the properties and valuesof services the DAs initially have no idea of any SAs Thuswe use the monitoring token to perform the informationupdating associated with SAs In general the appearance ofa new SA is accompanied by service registration initiated bythe SA For a DA which received a service registration itupdates local database with the service information Whenthe monitoring token arrives at the DA the DA checks

whether the SA list of the monitoring token contains theSA of the service registration If the SA already exists theDA did nothing for the SA Otherwise the DA adds the SAto the SA list of the monitoring token Meanwhile the DAchecks whether there are unknown SAsThe local database isupdated with the information of SAs which are unknown tothe DAThat is to say when the monitoring token arrives at aDA the DA initiates a two-way update about the informationof SAs When an existing SA is about to leave the MANETit issues a logout message to an arbitrary DA within itsradio range The DA which receives the logout message firstremoves the service information associated with the SA inthe local database When the monitoring token arrives atthe DA the DA marks a logout flag in the SA list for theSA During the transmission of the monitoring token otherDAs become aware of the logout of the SA through the two-way update and remove the service information associatedwith the SA in their local databases When the monitoringtoken arrives at the DA next time the DA issues a logoutacknowledgment to the SA As long as the SA receives thelogout acknowledgment it could leave the network freelyand there is no need to logout again Although there isno topology control and key searching based on the Chordnetwork in the directory-less mode the transmission of themonitoring token is still operational Thus the two-wayupdate service registration and SA logout are also performednormally The detailed information updating procedure isshown in Algorithm 4

Besides information updating the monitoring token alsoplays another vital function network status gathering A DAin the WSN senses the local network status in its vicinityThe information of local network statuses is gathered by themonitoring token and then a high-level overview of thenetwork status is revealed This overview of the networkstatus facilitates the autonomic switch between the directory-basedmode and the directory-lessmode Suppose our servicediscovery architecture is under the directory-lessmode If thefrequency of service query decreases the frequency of serviceadvertisement should be decreased accordingly However ifthe frequency of service query keeps decreasing significantlya switch to the directory-basedmode is needed Now assumeour service discovery architecture is under the directory-base mode if the frequency of service query increases thefrequency of service advertisement should be increased If thefrequency of service query keeps increasing significantly aswitch to the directory-less mode is needed

In particular each time the monitoring token arrives ata DA if the DA realizes that the frequency of service queryit perceived locally is beyond a threshold 119902119891

0 it adds a plus

sign to its entry in the monitoring token However if theDA realizes that the frequency of service query it perceivedlocally is lower than the threshold 119902119891

0 it checks whether

there exists a plus sign in its entry in the monitoring tokenA plus sign which already existed will be removed by theDA Suppose our service discovery architecture is under thedirectory-base mode When a DA keeps adding plus signsfor several rounds a local overload is occurring Moreoverif a considerable number of DAs have encountered a localoverload the directory-less mode should be used When

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 14: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

14 International Journal of Distributed Sensor Networks

119868119899119891119900119903119898119886119905119894119900119899119880119901119889119886119905119894119899119892 (119889119886 SReg[119899] 119905119900119896119890119899 SAlogout[119898] 119903119900119906119899119889(0))(1) for each SA isin 119905119900119896119890119899119904119886119897

(2) if SA notin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 = LOGOUT then(3) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SA(4) end if(5) if SA isin 119889119886119904119886119897ampampSA119886V119886119894119897119886119887119894119897119894119905119910 == LOGOUT then(6) 119889119886119904119886119897 larr 119889119886119904119886119897 SA(7) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SA(8) end if(9) end for(10) for 119894 larr 1 to 119899

(11) if SReg[119894]SA notin 119889119886119904119886119897 then(12) 119889119886119904119886119897 larr 119889119886119904119886119897 cap SReg[119894]SA(13) end if(14) if SReg[119894]SA notin 119905119900119896119890119899119904119886119897 then(15) 119905119900119896119890119899119904119886119897 larr 119905119900119896119890119899119904119886119897 cap SReg[119894]SA(16) end if(17) end for(18) for 119895 larr 1 to 119898

(19) if 119905 == 119903119900119906119899119889(0) then(20) 119889119886119904119886119897 larr 119889119886119904119886119897 SAlogout[119895](21) 119889119886119889119886119905119886119887119886119904119890 larr 119889119886119889119886119905119886119887119886119904119890 records of SAlogout[119895](22) 119889119886119904119890119905 (119905119900119896119890119899119904119886119897119890119899119905119903119910[SAlogout[119895]]119886V119886119894119897119886119887119894119897119894119905119910 LOGOUT)(23) else if 119905 == 119903119900119906119899119889(1) then(24) 119889119886119904119890119899119889 (LOGOUT ACK SAlogout[119895])(25) end if(26) end if(27) end for

Algorithm 4 Information updating procedure

the number of DAs which encountered a local overload issmall the directory-based mode should be used We denotethe number of plus signs which indicates a local overloadby 119897119900 (local overload) Moreover we denote the percentageof locally overloaded DAs which indicates a mode switchbetween the two modes by 119892119900 (global overhead) Supposethe service discovery architecture is under directory-basedmode When the monitoring token arrives at a DA the DAfirst updates the number of plus signs in its entry Then itexamines the entries of all DAs If the percentage of locallyoverloaded DAs is larger than 119892119900 it changes the value ofMODE in the monitoring token from DA-BASED to DA-LESS for the purpose of informing other DAs to switch theirmodes Similarly a reverse switch from DA-LESS to DA-BASED is triggered by a percentage of locally overloadedDAs which is smaller than 119892119900 The detailed autonomic modeswitch procedure is shown in Algorithm 5

4 Numerical Results

41 Experimental Environment and Simulation ParametersFor the purpose of evaluating our model we develop aMANET platform which is based on the NS-2 [45] Allsimulation results are obtained on HP with Inter Core2Q9550 283GHz 4GB RAM with Debian 2632-48squeeze1(Linux version is 2632-5-686) and gcc 435 (Debian 435-4)

In our platform the number of DAs in the WSN is 32The identifier space of the underlying Chord network is

2119898

= 216 The numbers of SAs and UAs are 25 and 200

respectively The number of different complete descriptionsfor profiling services should be prod

119899119901

119894=1|119901119894| ⩽ 2

16 In [3646] the authors use a famous dataset [47] to conduct theirexperiments The dataset contains 2507 real web serviceson the Internet In this paper we generate 8000 recordsof different service information based on the dataset Theconsistent hash function based on SHA-1 is employed tocalculate the IDs of DAs and the keys of services The 8000keys and the corresponding service information (URL SA)are mapped to the 32 DAs according to the Chord protocolThe IDs of the 32 DAs and the numbers of service records forwhich each node takes responsibility are shown in Table 3

For a DA 119889119886 and its predecessor 119889119886119901119903119890119889119890119888119890119904119904119900119903 on theChord network if the IDs of 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 arethe smallest one and the largest one among all the DAsrespectively the distance between 119889119886 and 119889119886119901119903119890119889119890119888119890119904119904119900119903 iscalculated as

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 2119898minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889 + 119889119886119894119889

(32)

Otherwise we compute the distance between them by

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) = 119889119886119894119889 minus 119889119886119901119903119890119889119890119888119890119904119904119900119903119894119889

(33)

We define the responsibility ratio of da as the ratio of thenumber of service records for which da takes responsibility

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 15: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 15

119860119906119905119900119899119900119898119894119888119872119900119889119890119878119908119894119905119888ℎ (119889119886[119899] 1199021198910 119897119900 119892119900 119905119900119896119890119899)

(1) if 119889119886[119894]119902119891 119901119890119903119888119890119894V119890119889 ⩾ 1199021198910then

(2) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 + ldquo+rdquo(3) else if 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 = 0 then(4) 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 larr 119905119900119896119890119899119889119886119897119890119899119905119903119910[119894]119904119905119886119905119906119904 minus ldquo+rdquo(5) end if(6) end if(7) 119899119897119900 larr 0

(8) for 119896 larr 1 to 119899

(9) if 1003816100381610038161003816119905119900119896119890119899119889119886119897119890119899119905119903119910[119896]1199041199051198861199051199061199041003816100381610038161003816 ⩾ 119897119900 then

(10) 119899119897119900 larr 119899119897119900 + 1

(11) end if(12) end for(13) if 119905119900119896119890119899MODE == DA-BASED then(14) if 119899119897119900119899 ⩾ 119892119900 then(15) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-LESS)(16) end if(17) else(18) if (119899119897119900119899 lt 119892119900) then(19) 119889119886[119894]119904119890119905 (119905119900119896119890119899MODEDA-BASED)(20) end if(21) end if

Algorithm 5 Autonomic mode switch procedure

Table 3 Information of the 32DAs

Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16ID 1456 2383 2461 6511 7002 7560 11438 12704 13087 15018 15408 20197 24126 24700 33059 33837Records 562 124 4 514 55 73 468 153 41 241 34 611 456 71 991 93Number 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32ID 37271 38208 39176 40539 42247 43982 46340 47226 47396 49090 49122 52350 53654 55839 59680 62300Records 430 104 135 174 212 221 278 102 15 218 3 423 126 248 485 335

and the distance between da and dapredecessor And it iscomputed as

119889119886119903119903 =|119889119886119903119890119888119900119903119889119904|

119889119894119904 (119889119886 119889119886119901119903119890119889119890119888119890119904119904119900119903) (34)

As shown in Figure 8 the responsibility ratios of the 32DAs are marked as blue crosses and the linear regressionequation of them is drawn in red The responsibility ratios ofmost DAs are within the range of [008 014] except for DA

3

The responsibility ratio ofDA3is close to 005The IDs ofDA

2

and DA3are 2383 and 2461 respectively Since DA

3is close

to its predecessor DA2and the number of service records

it is responsible for is small it takes little responsibility forthe service records in the network As the responsibility ismeasured by a ratio it is rational that the responsibility ratioof DA

27is larger than DA

3

42 Performance Criteria Though there are various criteriawhich are used to evaluate the effectiveness of service dis-covery architectures we adopt three fundamental criteriaservice availability message overhead and delay Each ofthese criteria is presented below

421 Service Availability Gao and Ma [48] considered thatthe service availability is the probability that a service isavailable It is formulated as the ratio of the number of timesa service responds to a user request to the number of totalrequests made by the user This definition is targeted at theevaluation of user experience toward a known service How-ever the service availability in our model aims to evaluatethe performance of service discovery Thus we define theservice availability from another perspective In particularwe introduce the service availability of a single node andthe service availability of the network Since service queriesand service replies are flowing through all nodes in thenetwork (includingUAs SAs andDAs) we define the serviceavailability of a single node as the ratio of the total numberof incoming service replies to the total number of outgoingservice queries Considering a node 119899

119894 the service availability

is denoted as

119904119886119894=119904119903(119894119903)

119904119904(119894119904)

(35)

Then the service availability of the network is defined as

119904119886119873=sum119873

119894=1119904119886119894

119873 (36)

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 16: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

16 International Journal of Distributed Sensor Networks

02

015

01

005

0 4 8 12 16 20 24 28 32

RRLinear regression

Resp

onsib

ility

ratio

Node ID

Figure 8 Responsibility ratio of 32 DAs

422 Message Overhead The concept of message overheadmainly concerns two types of messages service queriesand service replies In order to improve the performanceof service discovery both the two kinds of messages areduplicated to a certain extent Specifically a service query isduplicated for the purpose of reaching more nodes Whilea service reply is duplicated in another way since there areseveral copies of service queries it is rational that theremay appear several service replies which are originated fromvarious nodes As service replies are generated in responseto the received service queries we hold that normal servicereplies should not be considered as message overhead Thuswe hold that themessage overhead should bemeasured by theportion of service queries which are duplicated redundantlyWe denote the number of service queries issued by node 119899

119894by

119904119904(119894) The number of the service replies received by node 119899

119894is

denoted by 119904119903(119894119903)

And 119887119894percent of the service replies received

by node 119899119894are designated to it We denote the number of

duplicates of 119904119904(119894)

by dup(119904119904(119894)) Then the message overhead

of node 119899119894is defined as

119898119900119894=dup (119904119904

(119894))

119887119894sdot 119904119903(119894119903)

(37)

Then the message overhead of the network is defined as

119898119900119873=sum119873

119894=1119898119900119894

119873 (38)

423 Delay The response time is a prominent factor of aharmonized user experience In practice the delay is greatlyconcerned by many users In our model the delay perceivedby a UA consists of two parts the processing time and the

transmission time Since we do not focus on the relationshipbetween the processing time and the transmission time wemeasure the delay in all Though the number of servicequeries issued by node 119899

119894is 119904119904(119894) it is likely that a part of the

service queries finally get no service replies We denote thenumber of service queries which finally get one service reply(or several service replies) by 119903

119894sdot 119904119904(119894) where 0 lt 119903

119894⩽ 1

For a service query which at least has one service reply thedelay associated with the service query indicates the timeperiod between node 119899

119894sends the service query and node 119899

119894

receives the first corresponding service reply We denote thetime period by 119905 Then the delay which node 119899

119894perceived is

defined as

delay119894=

sum119903119894sdot119904119904(119894)

119895=1119905119895

119903119894sdot 119904119904(119894)

(39)

Then the delay of the network is defined as

delay119873=sum119873

119894=1delay119894

119873 (40)

43 Experimental Results and Analysis The two character-istics of the directory-based mode are energy conservationand function tuning Both characteristics concentrate onprolong the network lifetime for the WSN In practice ascertain applications require all the nodes are operational thenetwork lifetime may mean the time period before the firstnode failure due to energy exhaustion However in mostapplications the network lifetime means the time periodbefore a number of the nodes in the network exhaust theirenergy Notable topology management schemes have beenproposed for energy conservation issues such as [49ndash51]However amajor assumption of these schemes is high densityof sensors In order to investigate the performance of ourmodel we compare it with the approach proposed by Pan etal [51] The simulation result shown in Figure 9 indicates aslightly better performance of our model

As shown in Figure 9 both percentages of the operationalnodes for the two models decrease with the increase of timestep In our experiments we assume that the percentage offailed nodes which indicates the end of the network lifetime is50 Note that this percentage is just used for the comparisonbetween our model and Pan et alrsquos model In fact our modelis able to operate normally even when there are few nodesleft in the network The percentage of the operational nodesfalls below 50 around 119905 = 275 in our model Pan et alrsquosmodel performs similar to our model during the period of119905 isin [0 100] When 119905 gt 100 the percentage of the operationalnodes of Pan et alrsquos model decreases quickly compared to thatof ours Moreover the percentage of the operational nodesfalls below 50 around 119905 = 225 in Pan et alrsquos model

Now we consider our directory-based mode alone Forthree fixed values of the frequency of service query 119904119891

119894=

0006 0008 and 001 the service availability of the networkand the delay of the network are plotted in Figures 10 and 11respectively

As shown in Figure 10 the values of service availability ofthe network for 119904119891

119894= 0006 0008 and 001 are fluctuated

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 17: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 17

0 30 60 90 120 150 180 210 240 270 300

10

20

30

40

50

60

70

80

90

100

Time step

Ope

ratio

nal n

odes

()

Our modelPanrsquos model

Figure 9 Operational nodes versus time step

0 20 40 60 80 100 120 140 160 180 200

10

20

30

40

50

60

70

80

90

100

Time step

Serv

ice a

vaila

bilit

y (

)

sfi = 0006sfi = 0008

sfi = 001

Figure 10 Service availability versus time step

in the range of 60sim90 In our model the ⟨119896119890119910URL⟩information of a node which leaves the network is transferredto the successor of the nodeThus the decrease of operationalnodes imposes slight influence on the service availability ofthe network Note that service queries are generated basedon service information which is wishfully created by UAs andDAsThough the Chord network itself is able to guarantee thenormal search of a key there are chances that some service

0 20 40 60 80 100 120 140 160 180 200

20

40

60

80

100

120

Time step

Del

aysfi = 0006

sfi = 0008sfi = 001

Figure 11 Delay versus time step

queries lead to no service repliesThis is why the values of theservice availability of the network are less than 100 even atthe early stage of simulation Since a large frequency of servicequery brings more burden to the DAs than that of a smallfrequency of service query the slight differences of serviceavailability of the network among the three curves are causedbyDAswhich are about to failTheseDAsmiss issuing servicereplies by chanceThus the ordering of the service availabilityof the network is roughly 119904119891

119894= 0006 gt 119904119891

119894= 0008 gt 119904119891

119894=

001As shown in Figure 11 the values of delay of the network

for 119904119891119894= 0006 0008 and 001 increase with the increase

of time step Since the number of operational nodes isdecreasingwith the increase of time step thework loadwhicha DA confronts with is getting heavier with the increaseof time step Thus a service query may encounter a longprocessing timeThough there are fewer DAs in theWSN theshortening of transmission time is nomatch for the growth ofprocessing timeHence the total delay is inevitably increasedIn addition a large frequency of service query also results in alarger backlog than that of a small frequency of service queryThus the ordering of the delay of the network is roughly119904119891119894= 001 gt 119904119891

119894= 0008 gt 119904119891

119894= 0006

For the directory-less mode we adopt a fixed setting of119887119894= 01 and119891

119894= 015 Namely 119887

119894percent of the service replies

received by node 119899119894are designated to it Among the service

replies which should be forwarded by node 119899119894 119891119894percent of

them cannot be forwarded to the next node The number ofplus signs which indicates a local overload is 119897119900 = 4 Thepercentage of locally overloaded DAs which indicates a modeswitch between the two modes is 119892119900 = 75 Since a suffi-ciently large value of 119877 could result in a situation that therealways exists a path between two arbitrary nodes we adopt

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 18: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

18 International Journal of Distributed Sensor Networks

0 0125 025 0375 05 0625 075 0875 1

122436486

72849610812

Level of connectivity between two nodes

Uniform distributionProportional distribution

Num

ber o

f pai

rs (1

03)

Figure 12 Number of pairs for 10 levels of connectivity

the maximum of 119896 as 10 Then the number of recursions 119877 =

lfloor(119896 minus 1)4rfloor = 2 In order to facilitate an in-depth analysis ofour model we consider two cases of distribution for the levelof connectivity for the network uniform distribution andproportional distribution For all nodes in the MANET thenumbers of pairs for 10 levels of connectivity are illustratedin Figure 12 In the case of uniform distribution the numbersof pairs for 10 levels of connectivity are uniformly distributedIn the case of proportional distribution the number of pairsis in proportion to the level of connectivity

As previously described the mode switch between thedirectory-based mode and the directory-less mode is trig-gered by the percentage of locally overloaded DAs Essen-tially a local overload for a DA is caused by excessivelyfrequent service queries In order to investigate the modeswitch of our model we conducted extensive simulationsto find an empirical threshold of the frequency of servicequery Finally we learned that the empirical threshold of thefrequency of service query is 119902119891

0= 0003 Namely a value

of 1199021198910which is greater than 0003 will lead to more than 75

locally overloaded DAs and then triggers a mode switch fromdirectory-based to directory-less

Figure 13 shows the service availability of the networkunder the two distributions When 119902119891

0isin [00005 0003]

the simulation is under directory-basedmode Since the earlystage of simulation is under directory-basedmode the differ-ence between the two distributions is not significant When1199021198910

isin [0003 00055] the simulation is under directory-less mode As the uniform distribution could provide moresmall levels of connectivity between two nodes than that ofproportional distribution a node could communicate withmore distant nodes Thus the values of service availability ofthe network under the uniform distribution are larger thantheir counterparts under the proportional distribution

As shown in Figure 14 the delay of the network mono-tonically increases with the increase of the frequency ofservice query when 119902119891

0isin [00005 0003] and monotonically

decreases when 1199021198910isin [0003 00055] The simulation result

indicates that the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant

As shown in Figure 15 when 1199021198910

isin [00005 0003]the values of message overhead of the network under both

10

20

30

40

50

60

70

80

90

100

Serv

ice a

vaila

bilit

y (

)Uniform distributionProportional distribution

0 05 1 15 2 25 3 35 4 45 5 55 6

Frequency of service query 10minus3 (1s)

Figure 13 Service availability versus frequency of service query

4

8

12

16

20

24

28

32

36

40

Del

ay

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)

0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 14 Delay versus frequency of service query

distributions remain in one When the mode switches tothe directory-less mode the values of message overheadof the network under both distributions monotonicallyincrease with the increase of the frequency of service queryIn addition the differences between the two distributionsunder both directory-less mode and directory-based modeare not significant when 119902119891

0isin [0003 00055] Thus the

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 19: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 19

5

10

15

20

25

30

35

Mes

sage

ove

rhea

d

Uniform distributionProportional distribution

Frequency of service query 10minus3 (1s)0 05 1 15 2 25 3 35 4 45 5 55 6

Figure 15 Message overhead versus frequency of service query

performance of the directory-based mode is superior to thedirectory-less mode in terms of message overhead

Through the experimental results shown in Figures 13ndash15 it can be observed that the mode switch function of ourmodel could significantly improve the performance of servicediscovery in terms of service availability message overheadand delay

5 Conclusions

With the increasing need for flexible service discovery archi-tectures for service discovery in MANET environment wepropose and evaluate a collaborative self-governing privacy-preserving wireless sensor network architecture The pro-posed architecture is based on the Chord protocol andfocuses on location optimization and energy conservationThe key function of the architecture is that it provides anautonomic mode switch between the directory-based modeand the directory-less mode In order to evaluate our modelwe developed a MANET platform and conducted extensivesimulations regarding three critical criteria concerning ser-vice discovery service availability message overhead anddelay The simulation results indicate that the autonomicmode switch between the directory-based mode and thedirectory-less mode greatly improves the performance ofservice discovery in terms of the above three criteria Oneopen issue is how to effectively determine an empiricalthreshold of the frequency of service query

Conflict of Interests

The authors declare that there is no conflict of interestsregarding the publication of this paper

Acknowledgments

The authors would like to thank the anonymous reviewersfor their constructive comments on this paper This workis supported by Program for the Key Program of NSFC-Guangdong Union Foundation (U1135002) Major NationalSampT Program (2011ZX03005-002) National Natural ScienceFoundation of China (60872041 61072066) the FundamentalResearch Funds for the Central Universities (JY10000903001JY10000901034 K5051203010) and the GAD Pre-ResearchFoundation (9140A15040210HK61)

References

[1] G Meditskos and N Bassiliades ldquoStructural and role-orientedweb service discovery with taxonomiesin OWL-Srdquo IEEE Trans-actions on Knowledge and Data Engineering vol 22 no 2 pp278ndash290 2010

[2] M Junghans S Agarwal and R Studer ldquoTowards practicalsemantic web service discoveryrdquo The Semantic Web Researchand Applications vol 6089 no 2 pp 15ndash29 2010

[3] V A Santhana and S R Balasundaram ldquoEffective web-servicediscovery using K-means clusteringrdquo in Distributed Computingand Internet Technology vol 7753 of Lecture Notes in ComputerScience pp 455ndash464 Springer Berlin Germany 2013

[4] M Junghans and S Agarwal ldquoWeb service discovery basedon unified view on functional and non-functional propertiesrdquoin Proceedings of the 4th IEEE International Conference onSemantic Computing (ICSC rsquo10) pp 224ndash227 September 2010

[5] E Warner R Ladner K Gupta F E Petry D W Aha andG Philip ldquoSystem and method for web service discovery andaccessrdquo US Patent no 8209407 June 2012

[6] E Guttman and J Veizades ldquoService location protocol version2rdquo 1999

[7] A Ken R Scheifler J Waldo et al Jini Specification Addison-Wesley Longman 1999

[8] Salutation Consortium Salutation Architecture SpecificationThe Salutation Consortium Inc 1999 httpftpsalutationorgsalutesa20e1a21ps

[9] Microsoft Corporation ldquoUniversal Plug and Play Device Archi-tecture Version 10rdquo June 2000 httpupnporgindexphpsdcps-and-certificationstandardsreferenced-specifications

[10] Bluetooth Consortium Specification of the Bluetooth SystemCoreVersion 10 b Part E ServiceDiscovery Protocol (SDP) 1999

[11] T DHodes S E Czerwinski B Y Zhao A D Joseph andRHKatz ldquoAn architecture for secure wide-area service discoveryrdquoWireless Networks vol 8 no 2-3 pp 213ndash230 2002

[12] W Adjie-Winoto E Schwartz H Balakrishnan and J LilleyldquoThe design and implementation of an intentional namingsystemrdquo ACM SIGOPS Operating Systems Review vol 33 no5 pp 186ndash201 1999

[13] U C Kozat and L Tassiulas ldquoNetwork layer support forservice discovery in mobile ad hoc networksrdquo in Proceedingsof the 22nd Annual Joint Conference on the IEEE Computer andCommunications Societies vol 3 pp 1965ndash1975 April 2003

[14] F Sailhan and V Issarny ldquoScalable service discovery forMANETrdquo in Proceedings of the 3rd IEEE International Con-ference on Pervasive Computing and Communications (PerComrsquo05) pp 235ndash246 March 2005

[15] H Koubaa and E Fleury ldquoA fully distributed mediator basedservice location protocol in ad hoc networksrdquo in Proceedings

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 20: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

20 International Journal of Distributed Sensor Networks

of the IEEEGlobal Telecommunicatins Conference (GLOBECOMrsquo01) vol 5 pp 2949ndash2953 November 2001

[16] M Klein B Konig-Ries and P Obreiter ldquoService ringsmdashasemantic overlay for service discovery in ad hoc networksrdquoin Proceedings of the 14th IEEE International Workshop onDatabase and Expert Systems Applications pp 180ndash185 Septem-ber 2003

[17] M Klein and B Konig-Ries ldquoMulti-layer clusters in ad-hocnetworksan approach to service discoveryrdquo inWeb Engineeringand Peer-to-Peer Computing pp 187ndash201 Springer 2002

[18] G Schiele C Becker and K Rothermel ldquoEnergy-efficientcluster-based service discovery for ubiquitous computingrdquo inProceedings of the 11th Workshop on ACM SIGOPS EuropeanWorkshop (EW rsquo11) p 14 September 2004

[19] J Tyan and Q H Mahmoud ldquoA comprehensive service discov-ery solution for mobile ad hoc networksrdquoMobile Networks andApplications vol 10 no 4 pp 423ndash434 2005

[20] K Seada and A Helmy ldquoRendezvous regions a scalable archi-tecture for service location and data-centric storage in large-scale wireless networksrdquo in Proceedings of the 18th InternationalParallel and Distributed Processing Symposium (IPDPS rsquo04) p218 Santa Fe NM USA April 2004

[21] S Sivavakeesar O F Gonzalez and G Pavlou ldquoService dis-covery strategies in ubiquitous communication environmentsrdquoIEEE Communications Magazine vol 44 no 9 pp 106ndash1132006

[22] C Lee A Helal N Desai V Verma and B Arslan ldquoKonarka system and protocols for device independent peer-to-peerdiscovery and delivery of mobile servicesrdquo IEEE Transactionson Systems Man and Cybernetics Part A Systems and Humansvol 33 no 6 pp 682ndash696 2003

[23] J Jeong J Park and H Kim ldquoService discovery based onmulticast DNS in IPv6 mobile ad-hoc networksrdquo in Proceedingsof the 57th IEEE Semiannual Vehicular Technology Conference(VTC rsquo03) pp 1763ndash1767 April 2003

[24] C Perkins ldquoIP address autoconfiguration for ad hoc networksrdquoIETF 2001 httpwwwcsucsbedusimebeldingtxtautoconftxt

[25] J Jeong and J Park ldquoAutoconfiguration technologies for IPv6multicast service in mobile ad-hoc networksrdquo in Proceedings ofthe 10th IEEE International Conference on Networks TowardsNetwork Superiority (ICON rsquo02) pp 261ndash265 August 2002

[26] M Barbeau ldquoService discovery protocols for ad hoc network-ingrdquo in Proceedings of the CASCON 2000 Workshop on Ad HocCommunications 2000

[27] D Chakraborty A Joshi Y Yesha and T Finin ldquoTowarddistributed service discovery in pervasive computing environ-mentsrdquo IEEE Transactions on Mobile Computing vol 5 no 2pp 97ndash112 2006

[28] Z-G Gao X-Z Yang T-YMa and S-B Cai ldquoRICFFP an effi-cient service discovery protocol forMANETsrdquo inEmbedded andUbiquitous Computing vol 3207 of Lecture Notes in ComputerScience pp 786ndash795 Springer Berlin Germany 2004

[29] ANedos K Singh and SClarke ldquoServicelowast Distributed serviceadvertisement for multi-service multi-hop manet environ-mentsrdquo in Proceedings of the 7th IFIP International Conferenceon Mobile and Wireless Communication Networks 2005

[30] M Nidd ldquoService discovery in DEAPspacerdquo IEEE PersonalCommunications vol 8 no 4 pp 39ndash45 2001

[31] C Campo M Munoz J C Perea A Marın and C Garcıa-Rubio ldquoPDP and GSDL a new service discovery middlewareto support spontaneous interactions in pervasive systemsrdquo

in Proceedings of the 3rd IEEE International Conference onPervasive Computing and CommunicationsWorkshops (PerComrsquo05) pp 178ndash182 March 2005

[32] C Lee S Helal andW Lee ldquoGossip-based service discovery inmobile ad hoc networksrdquo IEICE Transactions on Communica-tions vol 89 no 9 pp 2621ndash2624 2006

[33] C N Ververidis and G C Polyzos ldquoService discovery formobile ad hoc networks a survey of issues and techniquesrdquoIEEECommunications SurveysampTutorials vol 10 no 3 pp 30ndash45 2008

[34] I Stoica R Morris D Karger M F Kaashoek and H Balakr-ishnan ldquoChord a scalable peer-to-peer lookup service for inter-net applicationsrdquo ACM SIGCOMM Computer CommunicationReview vol 31 no 4 pp 149ndash160 2001

[35] Y Zhang H Huang D Yang and H Zhang ldquoA hierarchicaland chord-based semantic service discovery system in the uni-versal networkrdquo International Journal of Innovative ComputingInformation and Control vol 5 no 11 pp 3745ndash3753 2009

[36] C Gao J Ma and X Jiang ldquoOn analysis of a chord-based trafficmodel for web service discovery in distributed environmentrdquoJournal of Engineering Science and Technology Review vol 6 no5 pp 129ndash136 2013

[37] A Adala and N Tabbane ldquoDiscovery of semantic Web Serviceswith an enhanced-Chord-based P2P networkrdquo InternationalJournal of Communication Systems vol 23 no 11 pp 1353ndash13652010

[38] V Mhatre and C Rosenberg ldquoDesign guidelines for wirelesssensor networks communication clustering and aggregationrdquoAd Hoc Networks vol 2 no 1 pp 45ndash63 2004

[39] V P Mhatre C Rosenberg D Kofman R Mazumdar and NShroff ldquoA minimum cost heterogeneous sensor network witha lifetime constraintrdquo IEEE Transactions on Mobile Computingvol 4 no 1 pp 4ndash15 2005

[40] W B Heinzelman A P Chandrakasan and H Balakrish-nan ldquoAn application-specific protocol architecture for wirelessmicrosensor networksrdquo IEEE Transactions onWireless Commu-nications vol 1 no 4 pp 660ndash670 2002

[41] S Lindsey and C S Raghavendra ldquoPEGASIS power-efficientgathering in sensor information systemsrdquo in Proceedings of theIEEE Aerospace Conference vol 3 pp 1125ndash1130 March 2002

[42] V Mhatre and C Rosenberg ldquoHomogeneous vs heterogeneousclustered sensor networks a comparative studyrdquo in Proceedingsof the IEEE International Conference on Communications vol 6pp 3646ndash3651 June 2004

[43] FIPS Publication 180-1 Secure Hash Standard vol 17 NationalInstitute of Standards and Technology 1995

[44] P Reynolds and A Vahdat ldquoEfficient peer-to-peer keywordsearchingrdquo in Proceedings of the ACMIFIPUSENIX Interna-tional Conference on Middleware pp 21ndash40 2003

[45] ldquoTheNetwork SimulatorCns-2rdquo httpwwwisiedunsnamnsindexhtml

[46] Z Malik and A Bouguettaya ldquoRateweb reputation assessmentfor trust establishment amongweb servicesrdquoTheVLDB Journalvol 18 no 4 pp 885ndash911 2009

[47] E Al-Masri and Q H Mahmoud ldquoDiscovering the best webservicerdquo in Proceedings of the 16th ACM International Confer-ence onWorldWideWeb (WWW rsquo07) pp 1257ndash1258 May 2007

[48] CGao and JMa ldquoA collaborativeQoS-aware service evaluationmethod for service selectionrdquo Journal of Networks vol 8 no 6pp 1370ndash1379 2013

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 21: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of Distributed Sensor Networks 21

[49] A Cerpa and D Estrin ldquoASCENT Adaptive self-configuringsensor networks topologiesrdquo IEEE Transactions on MobileComputing vol 3 no 3 pp 272ndash285 2004

[50] B Chen K Jamieson H Balakrishnan and R Morris ldquoSpanan energy-efficient coordination algorithm for topology main-tenance in ad hoc wireless networksrdquoWireless Networks vol 8no 5 pp 481ndash494 2002

[51] J Pan Y THou L Cai Y Shi and S X Shen ldquoTopology controlfor wireless sensor networksrdquo in Proceedings of the 9th AnnualInternational Conference on Mobile Computing and Networking(MobiCom rsquo03) pp 286ndash299 September 2003

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of

Page 22: Research Article A Collaborative Self-Governing Privacy ...downloads.hindawi.com/journals/ijdsn/2015/456146.pdf · a review of formalisms for semantic web service discovery ... should

International Journal of

AerospaceEngineeringHindawi Publishing Corporationhttpwwwhindawicom Volume 2014

RoboticsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Active and Passive Electronic Components

Control Scienceand Engineering

Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

International Journal of

RotatingMachinery

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporation httpwwwhindawicom

Journal ofEngineeringVolume 2014

Submit your manuscripts athttpwwwhindawicom

VLSI Design

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Shock and Vibration

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Civil EngineeringAdvances in

Acoustics and VibrationAdvances in

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Electrical and Computer Engineering

Journal of

Advances inOptoElectronics

Hindawi Publishing Corporation httpwwwhindawicom

Volume 2014

The Scientific World JournalHindawi Publishing Corporation httpwwwhindawicom Volume 2014

SensorsJournal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Modelling amp Simulation in EngineeringHindawi Publishing Corporation httpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Chemical EngineeringInternational Journal of Antennas and

Propagation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

Navigation and Observation

International Journal of

Hindawi Publishing Corporationhttpwwwhindawicom Volume 2014

DistributedSensor Networks

International Journal of