Docstoc

A Peer-to-Peer Approach for Location-based Service Discovery in

Document Sample
A Peer-to-Peer Approach for Location-based Service Discovery in Powered By Docstoc
					       A Peer-to-Peer Approach for Location-based Service
                  Discovery in Ad Hoc Networks
                                                        Dionysios Kostoulas
                                             University of Illinois, Urbana-Champaign
                                              Siebel Center for Computer Science,
                                         201 N. Goodwin Avenue, Urbana, IL 61801, USA
                                                         +1-217-721-3025
                                                         kostoula@uiuc.edu

                                                                        Finally, P2P systems operate on the application layer and establish
1. INTRODUCTION                                                         an overlay network that is independent of the underlying network
Location-based services (LBS) are services that provide                 infrastructure.
information of interest to a specific location only. For example,
consider the case of a user who wants to find a restaurant near         P2P proposition for fixed networks was based on the idea that at
his/her current location. A location-based service would provide        the edge of the network lately there exists a lot more than dumb
information only on those restaurants that are within a predefined      terminals capable of only passively displaying Web pages, as was
geographical range around the client’s current location. Location-      the case when the client-server configuration became common on
based services have already been supported in the Internet and in       the Internet. Actually, most Internet hosts today have a
cellular networks. The communication model used in this case is a       tremendous amount of processing power and storage which
client-server model. The client that wants to consume a service         remains unused most of the time. Therefore, the content and the
provided in his area needs first either to explicitly specify his/her   intelligence of the network need to be migrated from the core to
location (e.g. by entering his/her zip code in a service directory      the edges of the network in order to take advantage of the
web site) or to have his/her position found by use of hardware          available power that is distributed among all different hosts in the
technology installed in his/her device (e.g. GPS installed in a         network.
mobile phone). Then, the client will query a central authority (e.g.
                                                                        Today, mobile wireless devices have more processing power than
a location-aware web search engine or a base station of a cellular
                                                                        the average Internet host did a few years ago. Moreover, data and
network) for services provided within his/her location. The
                                                                        voice are converging through mobile devices and storage and
services the client will receive will be those having already been
                                                                        display capacity are growing, as is the bandwidth available
registered to the central authority. It is clear that the
                                                                        through wireless networks. For all the above reasons, the idea
communication model currently used for location-based service
                                                                        behind P2P appears to become applicable to wireless networks
discovery aims at infrastructure networks where both service
                                                                        also.
consumers and service providers have access to a fixed directory
server.                                                                 Furthermore, with the increasing popularity of mobile wireless
                                                                        devices, ad hoc networking between such devices is receiving
Peer-to-Peer (P2P) systems have been widely used for file-sharing
                                                                        more and more attention recently, because of its easy deployment
in the Internet. But P2P is actually much more than this and the
                                                                        as well as its decreased dependence on infrastructure. A mobile ad
usage of P2P over fixed networks has received increasing
                                                                        hoc network consists of mobile hosts that form temporary
attention in the research community. Apart from file-sharing, P2P
                                                                        connections without any established infrastructure and
technologies have also been used for many different applications,
                                                                        communicate with each other through wireless medium. Because
such as collaborative computing, distributed storage, cooperative
                                                                        of the radio range constraint, connection and disconnection is
Web caching, voice communication and others. Due to its broad
                                                                        controlled by the distance among nodes and by their willingness
range of applications, P2P has become of high interest for
                                                                        to collaborate by acting as relay nodes and forward messages
network providers who are exploring the potential of P2P for
                                                                        towards the destination, if this is out of the range of the source
general-purpose end-user services.
                                                                        node. As a consequence, nodes tend to appear and disappear
In P2P systems, participants rely on one another for service, rather    frequently in an ad hoc network, similarly to P2P networks.
than on a dedicated and centralized infrastructure. All nodes have
                                                                        As stated earlier in this paper, the client-server communication
equivalent functionality and responsibility and may both provide
                                                                        model currently used for providing location-based services is
and consume services. In other words, each node participating in a
                                                                        appropriate for infrastructure networks. An ad hoc network,
P2P network acts both as a client and as a server at the same time.
                                                                        however, has no fixed infrastructure. Any node in an ad hoc
Furthermore, peers may join or leave the network at any time.
                                                                        network may move out of vicinity at any time making the use of a
                                                                        single directory server inappropriate here since connection to such
                                                                        a server may not be always available. Moreover, ad hoc networks
                                                                        have limited resource and energy in contrast to traditional wired
                                                                        networks. Therefore, it is unlikely that some node would be
                                                                        willing to play the role of the look-up server for location-based
                                                                        services since this would require additional resources. Since ad
                                                                        hoc networks are expected to play a key role in the context of
                                                                        mobile communication in the future, a new communication model
for providing location-based services, that would be aiming at         2. BACKGROUND
mobile ad hoc networks as well, needs to be defined.                   Location-based services are services of interest to a specific
At first glance, it seems that ad hoc networking is the ideal          location only. Service discovery is the process of discovering the
candidate to meet this challenge. However, ad hoc networking           location of entities that can provide access to services. Location-
only provides the connectivity rather than the services. Moreover,     based service discovery is the process of service discovery that is
we want location-based services to run on top of any underlying        scoped within a predefined geographical region.
network technology and not only ad hoc networks. Therefore, an         Service discovery may include the announcement of services, the
application-level communication model that would provide               description of service capabilities and the automatic discovery of
location-based services regardless of the underlying network           local and remote services. The service discovery process can be
infrastructure needs to be used. As shown earlier, P2P networks        divided in three major phases:
are application-level networks, tend to become applicable in
mobile networks nowadays and share similarities with ad hoc            (i) Advertising of services: This is the process by which
networks. It is clear, that the peer-to-peer communication             available services are being announced in order to be made
paradigm needs to be followed for providing a location-based           discoverable. A service advertisement may include some
service network.                                                       properties of the announced service, such as the time to expire.
                                                                       (ii) Locating a service: This is the process by which the location
We propose peer-to-peer as a communication model for location-         of one or more of the advertised services is discovered. This phase
based service discovery on top of any physical infrastructure. The     usually includes querying the network.
new ad hoc service approach is characterized by a number of
challenges: (1) peer-to-peer service discovery on a self-organized     (iii) Utilizing a service: This is the actual use of services. Service
overlay substrate, (2) service locality, (3) service relevance and     discovery mechanisms may or may not involve actual utilization
(4) service maintainability and manageability.                         of services.

Several protocols have been proposed for service discovery in          Location-based services are usually information services. Those
infrastructure networks [2, 5, 6, and 19]. Most of them require a      services consist of some announcement or notification that
special node to act as a directory server where providers register     provides clients with some kind of information, e.g. information
services for consumers to look up for [1, 15]. However, as argued      on traffic conditions. Since the announcement associated with an
earlier in this paper, such a node is less likely to exist in an       information service may be included into service advertisement,
infrastructure-less network due to the limited resources (e.g.         discovery of information services does not include a separate
battery power, memory, processing power, etc.) of mobile               phase for the actual utilization of the service. For this reason, this
devices. Some location-based service discovery approaches have         paper focuses on the first two phases of service discovery, i.e.
been proposed for ad hoc networks as well but most of them             advertising of services and discovery of a service location.
provide network-layer solutions that depend on the routing             The process of locating a service may be passive or active. In the
mechanism used [4, 11]. In [14], a peer-to-peer protocol, similar      first case, usually called proactive or push-based, services are
to the one proposed in this paper, that aims to support sharing of     announced to make discovery possible and announcements are
services between nodes in an ad hoc environment is presented, but      disseminated around the network. Clients locate services by only
no information is given on the overlay used for communication.         checking service announcements. No querying of the network
In this paper, we provide an abstraction from the network. We          takes place. In the second case, called reactive or pull-based,
propose a peer-to-peer communication model for service                 services are advertised but announcements are not distributed all
discovery. We expect such an approach to provide scalability and       over the network. Instead, clients query the network for services
robustness because of the decentralized notion of peer-to-peer         by posting discovery requests and requests are propagated through
communication. Devices are assumed to be aware of their one hop        the network. In [10], the authors present a hybrid approach that
neighbors only and information is therefore disseminated hop-by-       combines query propagation with announcements dissemination
hop through the network. To make sure locality of services is          for location-based services. We also choose to apply a
achieved and information only spreads within the specified             proactive/reactive mechanism for service discovery.
location, the location scope is defined in all messages propagated     Location-based services have a wide range of applications that
through the overlay.                                                   cannot be supported by the standard client-server service
The main contributions of this paper are: 1) it presents a new peer-   discovery model. For example, take the case of consumers who
to-peer paradigm for location-based service discovery in ad hoc        enter a shopping mall and want to receive notifications on
networks, 2) it proposes three different approaches for service        products with discount prices. However, different consumers may
discovery over the peer-to-peer communication model and 3) it          have different cellular communication providers and therefore use
provides implementation details and performance results for the        different base stations while the shopping mall service may not
three service discovery schemes presented in this paper.               have been registered to all different base stations. As a result, the
                                                                       cellular network infrastructure is not adequate to provide location-
The rest of the paper is organized as follows. Section 2 presents      based notification on discounts to all interested clients. Instead, an
background and section 3 describes related work. The design            ad hoc network that would consist of the mall’s access point to the
approach is being provided in section 4. Section 5 studies the         network and all consumer hosts that are within the mall area could
protocols used for service discovery. Section 6 demonstrates           be easily established in order for the location-based service to
evaluation results and, finally, section 7 summarizes our              become available to all customers.
contributions and describes future work.
3. RELATED WORK                                                          discovery scheme. Salutation consists of clients, services,
Service discovery has been an area of extended research during           Salutation Managers (SLM) and Transport Managers (TM). SLMs
the last few years. Many schemes have been developed by                  play the role of lookup servers in Jini. However, SLMs provide a
different institutions and organizations in order to address the         transport-independent interface to services and clients through the
problem of service discovery.                                            use of TMs. Broadcast Remote Procedure Calls (RPCs) are used
                                                                         for service discovery.
The Service Location Protocol (SLP) [5, 6] is a service discovery
technology standard by Internet Engineering Task Force (IETF).           It is clear that all protocols described above are not suited for ad
SLP is aimed at enabling applications to discover the existence,         hoc network environments. Some are based on aggregating
location and configuration of needed services as well as for             information into central directories which are less likely to exist
services to advertise their availability in IP based networks. SLP       among resource-poor wireless devices and, even if present, may
consists of three main components: the user agent (UA) that              impose single points of failure if, for example, the respective
performs the service discovery on behalf of clients, the service         nodes move out of vicinity. Others maintain a network wide
agent (SA) that advertises on behalf of services and the directory       multicast tree for periodic service advertisements. However, such
agent (DA) that aggregates service information received from SAs         a proactive scheme is inadequate in bandwidth-scarce networks.
into a repository and responds to service requests from UAs. SLP         In comparison to the above mentioned protocols, our approach
can operate with or without DAs. If no DAs are present, then SLP         supports service discovery in a peer-to-peer mode, without
follows a peer-to-peer model for service discovery. In P2P model,        requiring the existence of any central authority, and by use of
UAs and SAs find each other through administratively scoped              lightweight communication protocols that require the maintenance
multicast. Otherwise, DAs serve as directories for service               of local information only.
discovery. SLP can function in networks that are under a common          In addition to the classical service discovery protocols discussed
administration, such as LANs or enterprise networks. Due to the          so far, there have been also several recent activities in the area of
use of multicast, it does not scale well in the Internet. Moreover, it   service discovery that intend to suit the dynamic nature of ad hoc
is not appropriate to use in ad hoc networks where no                    environments.
administrative authority exists. Finally, SLP is concerned only
with the discovery of services. Service utilization is beyond the        The Bluetooth Service Discovery Protocol (SDP) [3] is a simple
scope of SLP.                                                            protocol enabling applications on a device to request services
                                                                         provided by a Bluetooth peer. However, SDP is intended for
Jini [18] is a service discovery mechanism based on Java and             personal area Bluetooth networks only. Moreover, additional
developed by Sun Microsystems. Unlike SLP, it provides                   constraints restrict its applicability.
functionality for both the discovery and the utilization of services
primarily in IP based networks. However, Jini operates only as a         Ref. [4] describes a multicast based service discovery approach
directory style service discovery scheme. It consists of the lookup      for ad hoc networks. The proposed scheme provides an extension
server (LUS), similar to the DA in SLP, the clients that make use        to the On-Demand Multicast Routing Protocol (ODMRP) to
of Jini for service discovery and the services that announce their       support service discovery. Service discovery is actually integrated
availability to Jini entities. Jini relies on Java’s object              in routing. In [11] a backbone based approach is presented. A
serialization, code downloading facilities and Remote Method             virtual backbone, consisting of nodes acting as service providers
Invocation (RMI). It uses multicast to query lookup servers,             and a number of virtual links connecting them, needs to be created
resulting, like SLP, in low scalability. Furthermore, it cannot be       first. Then, all nodes in the network will either be part of the
applied on ad hoc networks since its functionality relies on the use     backbone network or only one hop away from at least one
of lookup servers.                                                       member of the virtual backbone. Sub-trees rooted at service
                                                                         requesting nodes and service providers are established to support
Universal Plug and Play (UPnP) [19] is a Microsoft developed             efficient dissemination of service discovery messages.
service discovery technology aimed at enabling the advertisement,
discovery and control of networked devices and services. UPnP            Anycast based service discovery in ad hoc networks is proposed
can function both as a peer-to-peer style service discovery              in [20]. Anycast allows providers of a given service type to all
mechanism and as a directory based scheme in IP based networks.          advertise routes to a virtual node representing the service type.
UPnP’s main components are services, clients and control points.         Service discovery queries for the virtual node will then be
A control point is capable of discovering other devices and              forwarded by routing to one of the service providers. Moreover, in
services and invoking actions on behalf of clients. The Simple           [13] post-query protocols to support service discovery in ad hoc
Service Discovery Protocol (SSDP) is used for service discovery.         networks are being evaluated. The discussed strategies, however,
A device can perform in a peer-to-peer mode by installing its own        rely on proactive distance vector routing protocols.
control points on the network. Service announcements contain the         Finally, service discovery mechanisms that are specifically
service type and a URL to connect to in order to utilize the             targeted at location-based services have been proposed. Ref. [10]
advertised service. HTTP is used for accessing services. However,        describes a hybrid location-based approach for service discovery,
HTTP is a heavy-weight protocol, and hence it is difficult to apply      which combines a proactive method for advertising services with
UPnP on resource constrained devices. Moreover, UPnP’s full              a reactive one that propagates discovery requests. The authors
functionality requires at least one central web server, even when        assume location awareness of devices and geocasting is being
working on a peer-to-peer mode.                                          used for disseminating discovery and advertisement messages.
The Salutation protocol [17] is a service discovery protocol             All previously described mechanisms that have been proposed for
developed by Salutation Consortium. Similar to SLP and UPnP,             service discovery in ad hoc networks rely on the underlying
Salutation can operate as both peer-to-peer and directory style          routing scheme and the network-layer protocols, building on top
of them. However, no widely accepted standard network protocols
exist in ad hoc networks restricting the applicability of similar
approaches. On the other hand, the approach presented in this
paper is implemented on the application level and works
                                                                        Location-based                                Location-based                          Location-based
regardless of the underlying network technology.                           Service                                       Service                                 Service
                                                                          Application                                   Application                             Application


4. DESIGN
                                                                                                                             Reply service with                      Provide service with
Communication between peers is supported on the application                    Discover service with
                                                                               <Service class ID>                            <Service class ID>                      <Service class ID>
                                                                                                                                                                     within my location
level and no assumptions are being made about underlying levels.               within my location

                                                                           Service                                      Service                                  Service
Each node is supposed to be able to interact with its one hop             Discovery                                    Discovery                                Discovery
                                                                         Component                                    Component                                Component
neighbors, which is actually true in the case of wireless networks.
Information is spread over the network hop-by-hop.
                                                                               2    Service request, Location scope
4.1. Network Model                                                            3                                                           1
                                                                                    Service reply, Location scope       Network                   Service advertisement, Location scope
We do not make any assumptions on the transmission power of
nodes. If node A can hear node B and suspects B as its neighbor,
then no assumption is made on how node B perceives node A.            Figure 1. Peer-to-peer paradigm for location-based service
Also, nodes share the same communication channel to transmit          discovery.
and receive packets. The transmission range is considered to be
about 200 meters. Finally, we assume 802.11 as the medium
access control (MAC) protocol.                                        4.3. Service Discovery Overlay
                                                                      Internet-scale P2P systems support a distributed hash table (DHT)
4.2. Architecture                                                     as an application level overlay on top of the Internet. In such
Each host in order to be able to perform service discovery needs      DHTs, each file is associated with a key and each DHT node is
to have the appropriate service application installed. The service    responsible for a certain range of keys. The basic functionality of
application enables a service provider to describe a new available    a DHT is efficient key lookups. DHTs are based on application-
service by providing metadata information for it. This service may    level connectivity only and are completely unrelated to the
then be distributed in the service network by use of the              underlying network topology. In the case of ad hoc services,
corresponding protocol available in the service discovery             however, the service provision overlay needs to map the physical
component. The service application gives also a service consumer      network since we aim at ad hoc networks where communication
the opportunity to enter preferences about what kind of services      between two nodes is possible only if they are within each other’s
he would like to receive announcements for, to initiate queries for   transmission range. Therefore, an unstructured overlay will be
service discovery and to receive results from query replies or        used for service discovery because of the unstructured notion of
service announcements being posted. The client may also use the       ad hoc networks.
application in order to provide ratings for each kind of service he
                                                                      Each node in the overlay keeps a membership list of its neighbors
is interested in.
                                                                      that are the nodes with which direct physical communication is
A separate service discovery component (SDC) needs to be              possible. Because of the mobility of nodes membership lists need
applied between the service network and the service application in    to be updated frequently. To do so a membership maintenance
order to provide the system with protocols for service discovery.     protocol is being used. All nodes periodically send a message to
The user of the service application should not be required to be      their peers which are listed in their membership lists in order to
aware of the way these procedures are being performed.                discover their status. Furthermore, nodes joining the network have
Therefore, the service application should have no knowledge of        to send a number of messages to inform other nodes of their
the service discovery protocols and needs only to interact with the   presence. In the next section, some variations of the general
underlying service component through a service interface. Figure      membership protocol are being studied.
1 shows how the service application interacts with the service
discovery component at each host in order to abstract protocol        5. SERVICE DISCOVERY
implementation details from the user and provide the network          In this section, we present three different approaches for service
with the required information. A similar architecture is used in      discovery in the proposed peer-to-peer model. All three
[10].                                                                 approaches use some underlying membership protocol to operate
                                                                      on. Such a protocol provides the service discovery mechanism
                                                                      with the necessary network connectivity on the application layer.
5.1. Service Discovery On A Neighborhood                                The first service discovery approach to be studied in this paper,
                                                                        builds on top of a Neighborhood Membership protocol. The
    Membership Protocol                                                 Neighborhood Membership protocol is based on a heartbeat
Neighborhood Membership Protocol                                        mechanism. Each process periodically beacons its identity and
Initially:                                                              location information to all other processes that are within
list = NULL; // initially no knowledge of neighbors                     transmission range. Every process that is able to listen to a
setTimer(heartbeatTimer, heartbeatPeriod);                              heartbeat signal generated by some other process considers the
// set timer to activate beaconing to neighbors at fixed intervals      corresponding process to be an adjacent process and maintains its
                                                                        identity and location information into a list of neighbors.
On every protocol period:                                               Processes collect heartbeats from all other processes they can hear
sendMessage(myID, myLocation);                                          beaconing and update their membership lists in order to reflect
// beacon ID and location information at fixed intervals                changes caused by processes entering the group of neighbors,
setTimer(heartbeatTimer, heartbeatPeriod);                              relocating or moving out of vicinity. If a process listed as adjacent
// reset timer to activate beaconing to neighbors at next interval      has not been heard for time longer than some predefined timeout
                                                                        value, then it is no more considered to be a neighbor and is
On receipt of a heartbeat message (ID, location):                       removed from the list.
if (find(ID, list) == -1) then // if ID not in list, i.e. new process
   list = addList(ID, location); // add new process in list of          A process that wants to announce a service sends an
neighbors                                                               advertisement to all members of its neighborhood list as long as
else                                                                    they are within the scope of the location-based service. All
   index = find(ID, list); // else find ID in list                      neighbors that receive the advertisement keep a replica of the
   list[index].location = location; // update location for ID in list   service information included in order to be able to serve future
endif                                                                   requests about this service. If still within the scope of the service,
setTimer(ExpiryTimer, timeoutPeriod);                                   the advertisement is further disseminated and replicated around
// set timer to catch timeouts for list entry of ID                     the network. Requests for services are propagated in a similar
                                                                        way. If some process is able to match the request, then it just
On expiration of ID:                                                    replies back the available service or service description and no
list = removeList(ID); // if ID timeouts remove from list of
                                                                        further dissemination of the request tales place. Both the service
neighbors
                                                                        discovery scheme and the underlying Neighborhood Membership
                                                                        protocol are demonstrated in pseudo-code in Figure 2. Figure 3
Service Discovery                                                       shows an example of service discovery.
Advertising a service:
for each ID such that find(ID, list) # -1) do
  if distance(myID, ID) < locationScope then
     sendMessage(serviceInfo, locationScope) to ID;
  endif
                                                                                           1       R1
enddo
//announce service to all neighbors within location scope
                                                                                        S1                    R2         2
On receipt of service advertisement:
                                                                                               3
servicesList = addServicesList(serviceInfo); // keep replica of                                          R2              S1
service                                                                                                            4
locationScope = locationScope – distance(myID, senderID);                                                S1
                                                                                                                         S2
Advertise a service; // disseminate advertisement
Requesting a service:                                                                                         S1
                                                                                                    S2
for each ID such that find(ID, list) # -1) do                                                            S1
   if distance(myID, ID) < locationScope then                                              S2
      sendMessage(serviceRequest, locationScope) to ID;                                             5
   endif
enddo                                                                                                                  List (1) = {3}
//request service from all neighbors within location scope                                         S2                  List (2) = {4}
                                                                                                                       List (3) = {1, 5}
On receipt of service request:                                                                                         List (4) = {2, 3, 5}
if (find(serviceRequest, servicesList) # -1) do                                                                        List (5) = {3}
   replyMessage(serviceInfo);
enddo // if requested service available reply it
                                                                        Figure 3. Service Discovery on a Neighborhood Membership
else // else propagate request to remaining scope
                                                                        Protocol: Initially, client 4 has service S1 available and client 5
   locationScope = locationScope – distance(myID, senderID);
                                                                        has service S2. Services propagate 1 hop and then client 1
   Request a service;
                                                                        issues a request for S1 to client 3 and client 2 issues a request
endif
                                                                        for S2 to client 4. Since S1 has been already disseminated and
Figure 2. Service Discovery on a Neighborhood Membership                replicated at 2 when a request from 1 is sent, 2 replies S1 back
Protocol.                                                               to 1. Request for S2 propagates from 4 to 3 where S2 is found.
5.2. Service Discovery On A Content-Based                               On expiration of ID:
                                                                        list = removeList(ID); // if ID timeouts remove from list of
    Membership Protocol                                                 neighbors
Content-Based Membership Protocol                                       for each g in groups of ID do
Initially:                                                                 if member(g) then
list = NULL; // initially no knowledge of neighbors                           if (find(ID, memlist(g)) # -1) then
memlist(g) = NULL;                                                               memlist(g) = removeMemList(ID);
// initially no knowledge of members in some content-based group        //if ID a member of g and you a member of g and ID in your list
g                                                                       of //known members of g remove ID from list
member(g) = false; // initially not a member in group g                    endif
setTimer(heartbeatTimer, heartbeatPeriod);                               endif
// set timer to activate beaconing to neighbors at fixed intervals      enddo

On group join:                                                          Service Discovery
member(g) = true; // when join become member of group                   Advertising a service of class g:
memlist(g) = addMemList(myID);                                          for each ID such that find(ID, memlist(g)) # -1) do
// when join add yourself to the list of known group members              if distance(myID, ID) < locationScope then
                                                                            sendMessage(serviceInfo, locationScope) to ID;
On group leave:                                                           endif
member(g) = false; // when leave you are no more a member of            enddo
group                                                                   //announce service to all known group members within location
memlist(g) = clearMemList();                                            scope
// when leave group you have no more knowledge of group
members                                                                 On receipt of service advertisement of class g:
                                                                        if member(g) then // do all these only if member of g
On every protocol period:                                                 servicesList = addServicesList(serviceInfo); // keep replica of
sendMessage(myID, myLocation, myGroups);                                service
//beacon ID, location information and group membership                     locationScope = locationScope – distance(myID, senderID);
information at //fixed intervals                                           Advertise a service; // disseminate advertisement
setTimer(heartbeatTimer, heartbeatPeriod);                              endif
// reset timer to activate beaconing to neighbors at next interval      Requesting a service of class g:
On receipt of a heartbeat message (ID, location, groups):               for each ID such that find(ID, memlist(g)) # -1) do
if (find(ID, list) == -1) then // if ID not in list, i.e. new process      if distance(myID, ID) < locationScope then
   list = addList(ID, location, groups);                                      sendMessage(serviceRequest, locationScope) to ID;
 // add new process in list of neighbors                                   endif
else                                                                    enddo
   index = find(ID, list); // else find ID in list                      //request service from all known group members within location
   list[index].location = location; // update location for ID in list   scope
   list[index].groups = groups; // update membership for ID in list     On receipt of service request for class g:
endif                                                                   if member(g) then // do all these only if member of g
for each g in groups do                                                  if (find(serviceRequest, servicesList) # -1) do
   if member(g) then                                                       replyMessage(serviceInfo);
      if (find(ID, memlist(g)) == -1) then                               enddo // if requested service available reply it
         memlist(g) = addMemList(ID);                                    else // else propagate request to remaining scope
//if ID a member of g and you a member of g and ID not in your             locationScope = locationScope – distance(myID, senderID);
list of //known members of g add ID in                                     Request a service;
     endif                                                               endif
   endif                                                                endif
enddo
                                                                        Figure 4. Service Discovery on a Content-Based Membership
for each group g such that (member(g) == true) do
                                                                        Protocol.
// for each group you are a member of
   if g NOT in groups then                                              The approach for service discovery on a Neighborhood
      if (find(ID, memlist(g)) # -1) then                               Membership protocol, described in the previous section, requires
         memlist(g) = removeMemList(ID);                                each process to propagate service announcements or requests to
//if ID not a member of g and you a member of g and ID in your          all its neighbors. Moreover, services need to get replicated to all
list of //known members of g then remove ID from list                   clients receiving service advertisements. It is clear, that an
     endif                                                              approach like the one presented in section 6.1 incurs great
   endif                                                                communication and storage overhead, which is usually undesired
enddo                                                                   in the case of wireless communications and ad hoc networks due
setTimer(ExpiryTimer, timeoutPeriod);                                   to the restrained resources. However, clients are not usually
// set timer to catch timeouts for list entry of ID                     interested in services of any content and not all clients are
interested in services of same content. If clients could be             5.3. Service Discovery On A Probabilistic
organized in groups based on the content of services they are
interested in and service discovery took place each time only               Protocol
within one of these content-based groups, then the overhead             To avoid cases when service discovery is not possible on top of a
incurred by service discovery mechanisms would be significantly         Content-based Membership protocol because of members being
reduced. The second service discovery approach, called service          disconnected with each other on the virtual group overlay, a
discovery on a Content-based Membership protocol, does exactly          Probabilistic protocol can be used. Each client instead of joining
this.                                                                   some classes of services he is interested in and not becoming a
                                                                        member in some others, is considered to be a member of every
First, all services are classified based on their content. Each class   service class. However, he provides a rating for every class of
of services has a corresponding group that consists of all those        services, ranging from 0 to 1 and indicating his level of interest
clients who are interested in services of that class. In order for a    for each one of them. The rating indicates the probability of
client to be able to perform service discovery within some class of     participating in the service discovery procedure for some service
services, he needs first to join the corresponding group. When          class. Figure 6 shows pseudo-code for this approach and Figure 7
being a member of such a content-based group, a client does not         presents an example. Service discovery over the probabilistic
actually need to be aware of all group members. He only keeps a         protocol described in this paragraph may require multiple rounds
partial list of members, i.e. a list of his neighbors who also happen   to successfully locate a service.
to be members of the same group. In order for a process to be
aware whether or not its neighbors are also members of some             Membership Protocol
group it has joined, all groups a process is a member of are            Initially:
communicated to adjacent processes through the heartbeat                list = NULL; // initially no knowledge of neighbors
message. In this way, the virtual overlay formed by all members         setTimer(heartbeatTimer, heartbeatPeriod);
of some group remains connected. Service discovery for services         // set timer to activate beaconing to neighbors at fixed intervals
in the class represented by the group takes place on this virtual
overlay. However, if some process has joined a group that none of       On every protocol period:
its neighbors is a member of, then service discovery is not             sendMessage(myID, myLocation);
possible for this process since it is partitioned in the group          // beacon ID and location information at fixed intervals
overlay. Figure 4 provides pseudo-code for the Content-based            setTimer(heartbeatTimer, heartbeatPeriod);
Membership protocol and service discovery over it. Figure 5             // reset timer to activate beaconing to neighbors at next interval
demonstrates an example of service discovery on group overlays.
                                                                        On receipt of a heartbeat message (ID, location):
                                                                        if (find(ID, list) == -1) then // if ID not in list, i.e. new process
                                       Member(G2)                          list = addList(ID, location); // add new process in list of
                                                                        neighbors
                                                                        else
                                                                           index = find(ID, list); // else find ID in list
            1 R1                                                           list[index].location = location; // update location for ID in list
                                                                        endif
           S1 3                        2                                setTimer(ExpiryTimer, timeoutPeriod);
                                                                        // set timer to catch timeouts for list entry of ID
                              Member(G1)

                         S1      4                                      On expiration of ID:
                                             List (1) = {3}             list = removeList(ID); // if ID timeouts remove from list of
                                             List (2) = {4}             neighbors
           Member(G1)                        List (3) = {1, 5}
                                             List (4) = {2, 3, 5}       Probabilistic Service Discovery
                        S1                   List (5) = {3}
PARTITION           5                                                   Advertising a service of class g:
IN G2                                   memlist1 (1) = {1, 3}           With probability p=rating(g) do
                                        memlist2 (2) = {2, 4}
                                        memlist1 (3) = {1, 3}
                                                                         for each ID such that find(ID, list) # -1) do
            S2                          memlist1 (4) = {3, 4, 5}          if distance(myID, ID) < locationScope then
                                        memlist1 (5) = {3, 5}                sendMessage(serviceInfo, locationScope) to ID;
                                        memlist2 (5) = {5}                endif
                 Member(G1,G2)                                           enddo
                                                                        enddo
                                                                        //announce service to all neighbors within location scope
Figure 5. Service Discovery on a Content-based Membership               On receipt of service advertisement of class g:
Protocol: Initially, client 4 has service S1 available and client 5     With probability p=rating(g) do
has service S2. Service S1 propagates 1 hop and then client 1           servicesList = addServicesList(serviceInfo); // keep replica of
issues a request for S1 to client 3. Since S1 has been already          service
disseminated and replicated at 2 when a request from 1 is               locationScope = locationScope – distance(myID, senderID);
sent, 2 replies S1 back to 1. However, client 2 cannot issue a          Advertise a service; // disseminate advertisement
request for S2 since G2 overlay is partitioned.                         enddo
Requesting a service of class g:                                    6. EVALUATION RESULTS
With probability p=rating(g) do                                     We have implemented the three service discovery approaches as
 for each ID such that find(ID, list) # -1) do                      indicated in Figures 2, 4 and 6 in section 5. In order to evaluate
   if distance(myID, ID) < locationScope then                       their performance we build an application-specific simulator
      sendMessage(serviceRequest, locationScope) to ID;             which uses randomly generated traces of nodes in a 20X20 Grid
   endif                                                            topology. The transmission range is 200 meters and the distance
 enddo                                                              between the outermost nodes on the Grid is 4 kilometers. Traces
enddo                                                               provide information on the connectivity of nodes in the physical
//request service from all neighbors within location scope          layer which is then used by the simulator in order to measure the
On receipt of service request for class g:                          performance of the different service discovery techniques when
With probability p=rating(g) do                                     those are applied on the simulated network. At the time between
 if (find(serviceRequest, servicesList) # -1) do                    two consecutive traces being injected into the simulator to update
   replyMessage(serviceInfo);                                       topology information, nodes may have moved out of vicinity or
enddo // if requested service available reply it                    have changed group if content-based membership is being
else // else propagate request to remaining scope                   applied.
   locationScope = locationScope – distance(myID, senderID);        Figure 7 demonstrates how the overhead, measured in number of
   Request a service;                                               messages sent over the network, incurred for service discovery
 endif                                                              varies when each one of the three different approaches is used for
enddo                                                               service discovery and as the number of hops needed for locating a
                                                                    service increases. When service discovery is performed over a
                                                                    neighborhood membership protocol the overhead is, as expected,
Figure 6. Service Discovery on a Probabilistic Membership
                                                                    found to be the greatest. On the other hand, the content-based
Protocol.
                                                                    membership protocol provides the best performance in terms of
                                                                    message overhead.
                                                                    Figures 8 and 9 show the time, measured in average number of
                                                                    hops, needed for locating a service when either a re-active only or
                                                                    a hybrid approach is being used and all three approaches for
                                                                    service discovery are tried out. Neighborhood-based approach
                                                                    requires the least time to locate a service since requests are
                        R1                                          disseminated to all nodes around the network speeding up the
                  1                                                 whole process. However, the gain in time needed for the
                S1 3                R2       2                      discovery of a service is not so significant to worth incurring the
                                                                    communication overhead cost it comes with.
                               R2            S1
                               S1        4   S2                                                                 Message Overhead for Service Discovery

                                                                                          40000




                          S2                                                              35000




                   S2          S1                                                         30000




                           5
                                                                     Number of messages




                                                                                          25000



                                                                                          20000



                                                                                          15000



                                                                                          10000



                                                                                          5000


Figure 7. Service Discovery on a Probabilistic Protocol:                                     0
                                                                                                  1                 2                      3                     4                        5
Initially, client 4 has service S1 available and client 5 has                                                                   Distance (number of hops)

service S2. Services propagate 1 hop with different                                                   Neighborhood-based Approach    Membership-based Approach   Probabilistic Approach

probabilities and then client 1 issues a request for S1 to client   Figure 7. Message overhead for service discovery for all three
3 with high probability and client 2 issues a request for S2 to     service discovery approaches.
client 4 with low probability. Since S1 has been already
disseminated and replicated at 2 with high probability when a
request from 1 is sent, 2 is very likely to reply S1 back to 1.
Request for S2 propagates from 4 to 3 but with a lower rate.
                                                  Average number of hops for service discovery                                  is perceived by other peers. Each node in the service network will
                                                             (reactive-only model)
                                                                                                                                keep trust ratings for each peer in its membership list.
                                7



                                6



                                5
                                                                                                                                8. REFERENCES
 Number of hops for discovery




                                                                                                                                [1] Aalto L., Gothlin N., Korhonen J., Ojala T., Bluetooth and
                                4                                                                                                   WAP Push Based Location-Aware Mobile Advertising
                                                                                                                                    System, In Proc. 2nd International Conference on Mobile
                                3
                                                                                                                                    Systems, applications and services, Boston, USA, 2004.
                                2
                                                                                                                                [2] Bettsletter C., Renner C., A Comparison of Service Discovery
                                1
                                                                                                                                    Protocols and Implementation of the Service Location
                                                                                                                                    Protocol, In Proc. EUNICE, 2000.
                                0
                                    1                 2                      3                     4                        5   [3] Bluetooth Specification, Part E, Service Discovery Protocol
                                                                  Distance (number of hops)
                                                                                                                                    (SDP), http://www.bluetooth.com, July 1999.
                                        Neighborhood-based Approach    Membership-based Approach   Probabilistic Approach


Figure 8. Average number of hops for service discovery for all                                                                  [4] Cheng L., Service Advertisement and Discovery in Mobile Ad
three service discovery approaches when re-active only model                                                                        Hoc Networks, In Conference on Computer Supported
is used.                                                                                                                            Cooperative Work (CSCW), 2002.
                                                                                                                                [5] Guttman E., Service Location Protocol: Automatic Discovery
                                                                                                                                    of IP Network Services, IEEE Internet Computing, 3(4), pp.
                                                                                                                                    71-80, July 1999.
                                                  Average number of hops for service discovery
                                                                                                                                [6] Guttman E., Perkins C. E., Day M., Service Location
                                                               (hybrid model)
                                                                                                                                    Protocol, Version 2, Internet RFC 2608, June 1999.
                                6
                                                                                                                                [7] Hodes T., Katz R., Composable ad hoc location-based
                                5
                                                                                                                                    services for heterogeneous mobile clients, Wireless
                                                                                                                                    Networks, Volume 5, Issue 5, pp. 411-427, October 1999.
 Number of hops for discovery




                                4
                                                                                                                                [8] Hodes T., Czerwinski S., Zhao B. Y., Joseph D., Katz R., An
                                                                                                                                    Architecture for Secure Wide-Area Service Discovery,
                                3
                                                                                                                                    Wireless Networks, Volume 8, Issue 2/3, March-May 2002.
                                2                                                                                               [9] Ioannidis A., Spanoudakis M., Sianas P., Priggouris I.,
                                                                                                                                    Hadjiefthymiades S., Merakos L., Using XML and related
                                1                                                                                                   standards to Support Location Based Services, ACM
                                                                                                                                    Symposium on Applied Computing, 2004.
                                0
                                    1                 2                      3
                                                                  Distance (number of hops)
                                                                                                   4                        5
                                                                                                                                [10] Klimin N., Enkelmann W., Karl H., Wolisz A., A Hybrid
                                        Neighborhood-based Approach    Membership-based Approach   Probabilistic Approach
                                                                                                                                     Approach for Location-based Service Discovery in Vehicular
Figure 9. Average number of hops for service discovery for all                                                                       Ad Hoc Networks, In Proc. 1st International Workshop on
                                                                                                                                     Intelligent Transportation, Hamburg, Germany, March 2004.
three service discovery approaches when a hybrid model is
used.                                                                                                                           [11] Kozat U., Tassiulas L., Network Layer Support for Service
                                                                                                                                     Discovery in Mobile Ad Hoc Networks, IEEE Infocom, 2003.
                                                                                                                                [12] Leung H., Burcea I., Jacobsen H., Modeling Location-based
7. CONCLUSIONS AND FUTURE WORK                                                                                                       Services with Subject Spaces, In Proc. Advanced Studies
The motivation of this work rests with our desire to provide a                                                                       Conference on Collaborative Research, Toronto, Canada,
decentralized model for location-based services to be applied in                                                                     2003.
ad hoc networks. We propose a new peer-to-peer paradigm for                                                                     [13] Luo H., Barbeau M., Performance Evaluation of Service
location-based service discovery that operates regardless of the                                                                     Discovery Strategies in Ad Hoc Networks, 2nd Annual
underlying network. We present three novel service discovery                                                                         Conference on Communication Networks and Services
protocols that perform on top of the membership maintenance                                                                          Research (CNSR), Fredericton, Canada, May 2004.
scheme that provides connectivity on the overlay. We provide
                                                                                                                                [14] Mamei M., Zambonelli F., Location-based and Content-
implementation details for the three service discovery approaches
                                                                                                                                     based Information Access in Mobile Peer-to-Peer
and demonstrate results from trace-driven simulations run to
                                                                                                                                     Computing: the TOTA Approach, 2nd International Workshop
measure their performance.
                                                                                                                                     on Agents and Peer-to-Peer Computing (AP2PC),
However, a challenge of providing location-based services by                                                                         Melbourne, Australia, July 2003.
using a peer-to-peer communication model is service                                                                             [15] Munson J., Gupta V., Location-based Notification as a
trustworthiness. Since no central authority is used as a mediator                                                                    General-Purpose Service, International Conference on
between the service provider and the service consumer there is no                                                                    Mobile Computing and Networking, In Proc. 2nd Workshop
trusted third party that can assure the trustability of the service. To                                                              on Mobile Commerce, Atlanta, USA ,2002.
address service trustworthiness we plan to use a distributed trust
protocol that is based on the reputation of service providers as this
[16] Roth J., Flexible Positioning for Location-Based Services,
     ESOC 2003.
[17] Salutation Consortium, White Paper: Salutation Architecture
     Overview,
     http://www.salutation.org/whitepaper/originalwp.pdf, 1998.
[18] Sun Technical, White Paper: Jini Architectural Overview,
     http://www.sun.com/jini, 1999.
[19] Universal Plug and Play Forum, Universal Plug and Play
     Device Architecture, Version 0.91, March 2000.
[20] Wu J., Zitterbart M., Service Awareness and its Challenges
     in Mobile Ad Hoc Networks, Workshop de Informatik:
     Mobile Communications over Wireless LAN: Research and
     Applications, Wien, Osterreich, September, 2001.

				
DOCUMENT INFO
Shared By:
Stats:
views:19
posted:9/26/2011
language:English
pages:10
Description: Location Based Service (LBS), it is the mobile telecommunications operator by radio communication network (eg GSM network, CDMA network), or external positioning (eg GPS) for mobile end-user location information (geographic coordinates or geodetic coordinates), in the GIS (Geographic Information System) platform support services provide users with a corresponding value-added services.