Sei sulla pagina 1di 7

A Peer-to-Peer Approach to Geospatial Web Services Discovery

Ma Xiujun Department of Intelligence Science, National Laboratory on Machine Perception, Peking University, Beijing, China maxiujunpku@gmail.com Li Gang Institute of Computing Technology, Chinese Academy of Science, Beijing, China ligang@ict.ac.cn Xie Kunqing, Shuai Meng Department of Intelligence Science, Peking University, Beijing, China Kunqing@cis.pku.edu.cn Shuaimeng}@db.pku.edu.cn

Abstract- Geospatial Web Services are dataoriented services, which include a variety of complex data models and metadata. Discovering the appreciate services with related geospatial datasets among a large number of available ones is a key task in the Geospatial Web Services domain. This paper proposes a peer-to-peer (P2P) based approach for discovering geospatial Web Services. We characterize the geospatial Web Services profile as a set of keywords including the metadata attributes, the minimum bounding rectangle (MBR) and the QoS parameters. Differing from the keywords based P2P Web Services discovery approaches, we use the MBR information to cluster and index the services into a kind of Peer R+ tree. With the tree, a P2P system can support complex queries containing partial keywords and spatial querying. The approach has been used in the Beijing Spatial Data Infrastructure project. We implement an peer-to-peer geospatial Web Services discovery system prototype that shows our approach facilitates complex service queries that contains spatial keywords. Keywords- Geospatial Web Service Discovery; Peer-to-Peer; Peer R+ tree;Spatial Data Infrastrucure

large number of available services is a central task within the GWS domain [6]. GWSs are data-oriented services, which include a variety of complex data models and metadata. The OGC specifies many of the aspects that are common to the Web Map Service (WMS), Web Feature Service (WFS), and Web Coverage Service (WCS) [5]. These common aspects include: operation request and response contents; parameters included in operation requests and responses; and encoding of operation requests and responses. To facilitate the discovery and access to GWS, the OGC service specification defines a standard GetCapabilities() operation allows any client to retrieve metadata about the capabilities provided by any server. GWS discovery is a process of matching the descriptions of service capabilities with the requirements. OGC suggests the catalog services to publish the services. In this way, users manually retrieval the catalog services and match the service to find desire one. But it is boring: they can find the exact one after they had called every GetCapabilities() operation in all the services that are available; And then user had to view all the return metadata documents to check the desired one. To facilitate the discovery, some proposals for GWS infrastructures focus on centralized service registry (UDDI) for cataloguing their geospatial functions and characteristics [12, 16]. Centralized systems introduce single points of failure, hotspots in the network and expose vulnerability to malicious attacks. This difficulty is severed by the evolving trend of mobile and location-based services. Peer-to-peer (P2P) computing is a new form of distributed computing, that involves a large number of autonomous computing nodes (the peers) cooperating to share resources and

I.

INTRODUCTION

Geospatial Web Services (GWS) are selfcontained, self-describing modular components of geospatial computing applications that can be published, located and invoked across a network to access and process geospatial data from a variety of sources [19]. The OpenGIS Consortium and ISO/TC 211 have released a number of specifications for interoperable GWS and message encodings [8, 13]. In practice, the number of GWS available on the web is increasing rapidly and continually within many application areas. Discovering the appreciate services with related geospatial datasets among a

Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. INFOSCALE '06. Proceedings of the First International Conference on Scalable Information Systems, May 29-June 1 2006, Hong Kong 2006 ACM 1-59593-428-6/06/05...$5.00

services. Currently, P2P computing has attracted much attention in Web services area to provide scalable P2P lookup service [14]. There has been extensive work on indexing structures for exact match queries for data sharing in the context of peer-to-peer systems, but those index structures can not support efficient spatial queries for GWS discovery. In this paper, we propose to make full use of the semantic of the geospatial keywords and to build a Peer R-tree for indexing GWSs in the P2P networks. In this paper, we propose a P2P based approach to GWS discovery in order to build dynamic, scalable and decentralized registries with flexible spatial querying capabilities. In the approach, the peers firstly act as brokers of GWSs to gain the services profile of metadata, spatial bounding box, and QoS parameters. Then the peers advertise the GWS profiles into the P2P networks. We use a Peer R+ tree, which is a spatial index adapted to P2P systems, to index GWSs in the P2P networks. The proposed P2P system supports complex queries containing partial keywords and spatial query. The main contributions of this paper are concluded as follows: We propose a P2P based GWS discovery approach to build dynamic, scalable and decentralized registries with flexible search capabilities, that has advantages over the UDDI liked cataloging in the GWS domain. Even though there has been extensive work on indexing structures for exact match queries for data sharing in the context of peer-to-peer systems, theses index structures can not support efficient spatial queries for GWSs discovery. We make full use of the semantic of the geospatial keywords to index GWSs. It supports complex queries containing both partial keywords and spatial query. We propose a Peer R+ tree, which adapts the centralized R+ index to the P2P networks. We present algorithms for dynamically constructing and querying based on the tree. The remainder of this paper is organized as follows. Section 2 overviews the related works. Section 3 describes the P2P based GWS discovery system and the Peer R+ tree with its constructing algorithms. Section 4 presents the P2P R-tree querying algorithm. Section 5 gives an application scenario for the approach. Finally, section 6 concludes the paper.

II.

RELATED WORKS

Several P2P approaches for discovering Web Services already exist [1, 7, 10, 11, 18]. The general idea is to characterize the Web Services description (e.g. WSDL, Ontology) as a set of keywords. Then these keywords can be used to index the Web Services in the P2P systems (e.g. distributed hash tables). In this way, the Web Services discovery can be implemented by supporting complex queries containing partial keywords and wildcards in P2P system. The key aspect of P2P based Web Services discovery is the query propagation in the peer networks, because that messages routing the topology of the network has significant impact on the overall performance of the service discovery process [3, 9]. One category approach is to cluster peers into different super-peers or communities and build topology among them, e.g. [15, 20]. In the super-peer liked networks, super-peers connect to other super-peers and build up the backbone of the network, and other peers connect to one super-peer only. In this way, the locality of service updates will be just performed in the range of the corresponding super-peer without influencing others. The network topology enables efficient query broadcasts and guarantees non-redundant broadcast. The other kind approach is to index contents of peers to form a structured P2P system. The hash-based distributed data structures (e.g. DHTs [7, 17]) are widely used distributed index structures to index large-scale peer networks and construct with nonhierarchical topologies. However, the DHTs methods enforce the location of the content within the network, which are both in conflict with the autonomy of the peers in maintaining their own content. Most importantly, they are designed to support only exact-match queries on a single attribute, which is not suitable to GWSs discovery. To support automatically matching GWS in P2P networks, we define a Geospatial Web Service profile to represent description of the GWS capabilities. The GWS profile is characterized as a set of keywords including the metadata attributes, the minimum bounding rectangle (MBR) and the QoS parameters. In our approach, we use the geospatial keywords (MBR) to cluster and index GWSs. The indexing mechanism is a kind of Peer R+ tree, which is specifically designed for indexing GWSs in P2P systems. The Peer R+ tree clusters the peers based on their MBRs into a hierarchical R tree and storing information nearby peers, which act as a routing tables among peers.

R-tree, a widely used spatial index, has been extensively researched in centralized environment, in where a centralized root node to control spatial querying to all child nodes. Recently, some researchers propose several Rtree based spatial indexing structures for P2P systems. In [4] a peer-to-peer R-tree (peer-tree) is proposed in the context of sensor networks, and it supports the optimizing for nearest neighbor querying. Another peer-to-peer R-tree is proposed in [2] for spatial data querying and it focuses on optimizing window querying. Similar to [2], our approach also decomposes space into blocks based on the priori knowledge of the GWS distribution. However, our approach supports dynamic updating the global decomposition, while [2] is a static decomposition strategy. III. PEER-TO-PEER GEOSPATIAL WEB SERVICE DISCOVERY

extractor invokes the GetCapibilities() and gains the GWS profile. And then the profiles are used to build the Peer R+ tree index in the P2P networks. The local query engine receives the query from the service client, discovering matching services from the service profiles in the peer, and sends responses to the user. And the query propagator provides the interface to other peers in the P2P network. It receives queries from other peers and can forward query as well. After it receives query from other peers. It searches services for queries in local (through the local query engine) and sends response (if not empty) to reply the user query.
Ser vi ce Bi nd Geospatial Web Services Services Deployment GetCapibilities() P2P N w k et or ( JXTA ) Geospatial Web Services Client

GS W Ser vi ce D scover y i

A. System Architecture To support automatically matching GWS in P2P networks, we define a Geospatial Web Service profile to represent description of the GWS capabilities. The GWS profile is characterized as a set of keywords including the metadata attributes, the minimum bounding rectangle (MBR) and the QoS parameters. When a GWS registers to the P2P networks, one peer acts as service requestor to gain the GWS profile by invoking the services GetCapabilities(). Then the peer stores the GWS profile as its resource and advertises it in the P2P networks. Each peer has a pool of GWS profiles to form a vector space: PV = V1V2 Vw, where Vi is the domain of the keywords of the GWS profile. Given a query for GWS to the peer, a spatial filter of GWSs is used before the keywords similarity matching. For example, when a user want to find a WFS with desired data range and scale, he sends his request to a peer with the condition ServiceType=WFS and Range=<range> and Scale=1:X. The peer firstly requests to filter GWSs whose MBR contains the range used required, and then it matches ServiceType and Scale using similarity matching algorithm. When a peer receives a request for a GWS from the local user and cannot find the GWS locally, as a client it originates a discovery query and propagates the request into the network. During propagation of the query, if a peer finds the requested GWS locally, it responds to the originator by providing the GWSs address endpoints. Figure 1 depicts the system architecture. Each peer has 5 components. When a GWS registers to the P2P networks, the GWS profile

Peer System
R+ Peer t re e Index

Local Query Engine Query Propagator

GWS Profile GWS profile extractor Message Manager

Figure 1.

System Architecture

To create and maintain the Peer R+ tree, nodes periodically exchange messages with other peers. The message manager component is responsible for the message exchanging and processing. The message types exchanged by the system are: the beacon message, used by a node to inform other peers that it is still actively participating in the P2P network; the join message, used to add new peers to the network; the failure message, used to disseminate information about the failure or departure of a node; the Peer R+ tree stabilize message, used by a peer to check and correct the Peer R+ tree structure periodically. B. Indexing GWSs in R+ tree Each Geospatial Web Service provides clients with geospatial datasets covering some geographical regions. The MBR is one of the

most important keywords for a Geospatial Web Service. The R-tree is a height-balanced tree, similar to the B-tree, which indexes MBRs of objects in the multidimensional space. Intuitively, R-tree can be used to index GWS in the P2P networks. We use a variation to original R-tree: R+-tree [21], which can avoid overlapping rectangles in intermediate nodes of the tree. Figure 2 shows a set of GWSs with their MBRs and the graphical representation of an R+ tree used to index them. The entries in leaf nodes are (MBR, Oid) tuples, containing the MBR and references to the address endpoints of the GWS. Intermediate node entries are (MBR, ptr) tuples, where ptr points to a lower level node and MBR is the MBR of all entries in this node.
A C D G B C D E F F G E F A B

3. The top level is Peer R+ trees virtual node; the next level is the sub-tree of the Peer R+ tree, and the number of the sub-tree is the equal to the partitions number; the bottom level is the peers local R+ tree.
Peer R-tree partition Partition of the universe

Sub-tree

Sub-tree of the Peer R-tree

Partition storing the rootMBR

Partition storing the rootMBR

Local R -tree and information maintained by peer

RootMBR of P1

RootMBR of Pn

Local R-tree RP1

Local R-tree RPn Peer Pn

Figure 2. R+-tree. (a) A set of MBR of GWSs {c,d,g} (b) An R+-tree that indexes the MBRs

Peer P1

Figure 3. Architecture of the Peer R+ tree

Consider the R+ tree of Figure 2 and a query which asks for GWSs that intersect window W. The entries of the root that intersect W are found and, for each such entry, search is applied recursively on the node pointed to by it. If an entry at a high R+ tree level does not intersect W, then there can be no qualifying GWS in the subtree pointed to by this entry. C. Mapping R+ Tree to Peers However, the R+ tree index is designed in a centralized environment, in where a centralized root node to control spatial querying to all child nodes. Therefore, the R+ tree must be adapted to a decentralized model with efficient searching capability over P2P systems. Here we present a distributed program for constructing a Peer R+ tree indexing structure for GWSs discovery. A number of GWSs with their MBRs cooperate at the level 0 of the Peer R+ tree construction. Each peer indexes a number of GWSs to form a local R+ tree with a root MBR. And then the peer provides its root MBR to construct the Peer R+ tree. The Peer R-trees top level is a partition of the universe, which acts as the virtual root of the index. How to decompose the universe depends upon some prior knowledge and each partition can be divided into more sub-partitions dynamically to maintain the balance of the Peer R+ tree (see section D). Each partition is the root node of a sub-tree of the Peer R+ tree. The architecture of the Peer R+ tree is shown in figure

The Peer R+ trees leaf node stores the peer_id and rootMBR of the local R+ tree of the peer. And the sub-tree is non-leaf node of the Peer R+ tree. Each peer cooperate to construct the sub-tree, which stores the MBR which is a coverage of all the sub-nodes MBR and ptr pointing to the sub-node. Also, each peer in the system maintains a variable Prt[] that contains the assigned partitions. When a query is propagated to a peer, the peer reads the Prt[] and sends the query to the corresponding partition. Thus, any peer can query the Peer R+ tree in a localized manner. Peer Joining and Departuring When a new peer Pk with multi GWSs joins in the system, it firstly builds the local R+ tree of the services, and then it communicates with another peer already in the system to update the Peer R+ tree. Here, we assume the new peer knows at least one peer (Pi for example) in the system. Pk communicates with Pi and gets Pis Prt[]. If Pks rootMBR intersects with MBR of a certain partition, then Pk is assigned to that partition and the sub-tree of the partition add a node of Pk. As known to all, an R+ tree nodes number of (MBR, ptr) pair is limited between n and N. Here, we define N as Nmax. When new peers join the Peer R+ tree, some nodes pair number may be larger than Nmax. In this case, the node should be split into two nodes. As the R+ tree, the split D.

procedure may forward to the top level of the sub-tree, reaching the partition level, and then the partition is further divided into smaller partitions. When the partition division happens, all the peers assigned to the prior partition will be informed and update their Prt[]. This kind of split can keep the height balance of the Peer R+ tree, and even if we firstly divided the universe without any prior knowledge, the partition will be more and more balanced with the Peer R+ tree grows. The joining action for the new peer Pk is as follows: (new peer Peerk joining a Peer R-tree) Insert(Peerk){ Peeri = GetNearestPeer(); Peeri.Prt[]=GetPartition(Pi); If (intersect(Peerks MBR, Peeri.Prt[0]s MBR) == NULL){ Partition[] = GetAllpartition(Peeri.Prt[0])) } For each partition in Partition[]{ If(intersect(Peerks MBR, partitions MBR) != NULL){ Root = GetRoot(partition); AssignToPeerTree(Peerk, Root); If (Node Overflows) SplitNode(Node); } If (partition is split) { Peers[] = getAllNodes(Root) For each peer in Peers[] UpdatePrt(peer,parttion); } } } E. New Geospatial Web Services Joining This section presents the clustering and allocating algorithm of new GWS joining the Peer R+ tree. When a new GWS registers at a certain peer, it does not simply update the local R+ tree, but to check and allocate the GWS for optimizing the Peer R+ tree according the prior partition knowledge. The procedure is as follows. When a new GWS S registers to a peer Pk. Pk checks Ss MBR, if the Ss MBR doesnt intersect with the partitions MBR that PK is assigned to, then PK forward S to other partitions. If some partition meets the requirement, then S is assigned to the peer in that partition and the partitions sub-tree is updating. Otherwise if no partitions meet the requirement or Ss MBR intersects with Pks

rootMBR, then S is insert into Pk , and Pks local R+ tree is updated. (New GWS joining) NewGWS(Peer Pk, GWS S){ partitons=GetPartition(Pk); If (intersect(partitions MBR, S.MBR)==NULL){ Partition = ForwardToOtherPartition() If (intersect(Partitons MBR,SMBR)!=NULL) NewGWS(Partitions Peer, S) } Else{ AddNewNode(Pks R-tree Root, S; UpdateRootMBR(Pk); deleteTuple(Pk); insert(Pk); } }

IV. GEOSPATIAL WEB SERVICES DISCOVERING AND MATCHING Now we will discuss how to discovery and query GWSs in the Peer R+ tree indexing structure. When query Q containing MBR and keywords is originated from Pk as a requester in the system, Pk reads the Prt[] in the local host, through which Q is sent to every relative sub-tree and returns the peers list whose MBR intersect with Qs MBR. Then Pk sends Q to each of the peer in the candidate list, each peer searches its local R+ tree and returns the relevant GWS. Finally, a more accurate match will be accomplished by matching keywords among GWS profiles and Q. We define K(Q) as the keywords set of query Q and K(S) as keywords of the GWS. The similarity of Q and GWS is computed by:
sim(Q, S) | K(Q) Kr(S) | / | K(Q) | | Kr(S) |

The querying procedure is as follows:

RESULT ServiceSearch(Peer Pk,Query Q){ Result=NULL; Peers=NULL; Prt[]=GetAllPartition(Pk); For each partition in Prt[]{ If (intersect(Q.MBR, partitons MBR)!=NULL){ SendQueryTo(partition,Q); Peers = Peers + SearchTree(partitions Root, Q.MBR); } } For each peer in Peers{ Result = Result + SearchRtree(peers local R-tree, Q) } If (Result!=NULL) OrderByKeywordMatching(Result); Return Result; }

3: the WMS service interacts one peer and queries WFS services for a given bounding box and time interval. 4: the peer parses the WFS query and executes it using the local query engine. And the peer propagates the query to related peers based on the Peer R+ tree rules. 5: Peers cooperate to return the query results to the WMS. 6: WMS starts a session and draws maps. VI. CONCLUSION

V.

APPLICATION CASE SCENARIO

We implement a peer-to-peer geospatial Web Services discovery system prototype based on JXTA, a peer-to-peer toolkit originally developed by Sun Microsystems. The prototype has already used in Beijing spatial data infrastructure project. There are a number of geospatial data providers publishing varying geospatial Web Services, such as DOM, DEM, DLG and DRG data services with different scales, precision and spatial ranges. We deploy several peers collaborated to manage these services for supporting efficient services discovering requirements. We illustrate an online mapping scenario where a Web Map Services (WMS) as a service client to retrieval and draw several Web Feature Services (WFS) base on our P2P based GWS discovery system prototype. In this scenario, we implement 64 Web Feature Services and publish them into the P2P system. Each Web Feature Service provides data layers corresponding to geographic entities with a bounding box representing a location of interest. A Web Map Service acts as a client to generate interactive, online maps from these Web Feature Services. We deploy 8 peers for this scenario. We can summarize the steps of the scenario illustrated as follows. 1: All WFS services randomly select one peer to register to the P2P network. The peer invokes the GetCapibilities() of the WFS to retrieve and extract the capabilities attributes into the GWS profile. 2: Peers cooperate to build the Peer R+ tree to indexing all these WFS services.

This paper presented a novel Peer R+ tree indexing structure for discovering Geospatial Web Services in P2P environment. It is an effective adaptation of R+ trees to a P2P model offers many advantages including efficiency in searching over peer-to-peer systems. Compared with keywords based P2P services discovery approach, the Peer R+ tree supports efficient spatial querying for geospatial Web Services discovery. We have presented the indexing structure and its dynamic updating algorithms. The actual applications in the Beijing spatial data infrastructure project illustrates the approach has greater scalability and performance than the UDDI liked services cataloging approach. ACKNOWLEDGEMENTS This research was primarily supported by the Beijing Science Foundation under Grant 4062019. REFERENCES
[1] Abhijit A. Patil, Swapna A. Oundhakar, Amit P. Sheth, and Kunal Verma: METEROR-S Web Service Annotation Framework. In The Thirteenth International World Wide Web Conference Proceedings (2004) 553 562 Anirban Mondal, Yi Lifu, Masaru Kitsuregawa: P2PRTree: An R-Tree-Based Spatial Index for Peer-to-Peer Environments. EDBT Workshops (2004) 516-525 Daswani, N., Garcia-Molina, B., Yang, B.: Open Problems in Data-Sharing Peer-to-Peer Systems, In Proceedings of the 9th International Conference on Database Theory (ICDT), Siena, Italy (2003) Demirbas, M. and Ferhatosmanoglu, H.: Peer-to-peer spatial queries in sensor networks. Proceedings of the Third Interna-tional Conference on Peer-to-Peer Computing (2003) Doyle, A. and Reed, C.: Introduction to OGC web services: OGC interoperability program white paper. http://ip.opengis.org/ows/ Egenhofer, M.: Toward the Semantic Geospatial Web. In Proc. The 10th ACM International Symposium on Advances in Geographic Information Systems (2002) Farnoush Banaei-Kashani, Ching-Chien Chen, and Cyrus Shahabi: WSPDS: Web Services Peer-to-Peer Discovery Service. In Proc. of the International Conference on Internet Computing (2004) 733743

[2]

[3]

[4]

[5]

[6]

[7]

[8] [9]

[10]

[11]

[12] [13] [14]

[15]

[16] [17]

[18]

[19]

[20]

[21]

ISO/TC-211: Geographic Information Services. ISO/DIS 19119 (2002) Jovanovic, M.A., and al.: Scalability Issues in Large Peer-to-Peer Networks A Case Study of Gnutella, Research report, Univ. Cincinnati (2001) Kunal Verma, Kaarthik Sivashanmugam, Amit Sheth, Abhijit Patil, Swapna Oundhakar, and John Miller: METEOR-S WSDI: A Scalable P2P Infrastructure of Registries for Semantic Publication and Discovery of Web Services. Journal of Information Technology and Management (2004) Massimo Paolucci, Katia P. Sycara, Takuya Nishimura, and Naveen Srinivasan.: Using DAML-S for P2P discovery. In: ICWS (2003) 203207 OGC: OWS1.2 UDDI Experiment. OpenGIS Consortium, OGC 03-028 (2003) Open GIS Consortium. The Open GIS Service Architecture (2002) Papazoglou, M.P., Kramer, B. J., and Yang J.: Leveraging Web-Services and Peer-to-Peer Networks. In: J. Eder and M. Mis-sikoff (eds.): CAiSE 2003. Lecture Notes in Computer Science, Vol. 2681. Springer-Verlag Berlin Heidelberg (2003) 485501 Qing Wang, Yang Yuan, Junmei Zhou, Aoying Zhou: Peer-Serv: A Framework of Web Services in Peer-toPeer Environment. WAIM (2003) Reed, C., Nebert, D.: The Importance of Catalogs to the Spatial Web. An OGC White Paper. (2002) Ratnasamy, S., Francis, P., Handley, M., Karp, R. and Shenker, S.: As calable content-addressable network. In: Proceedings of ACM SIGCOMM 01 (2001) Schlosser, M., Sintek, M., Decker, S. and Nejdl, W.: A Scalable and Ontology-Based P2P Infrastructure for Semantic Web Services. Second International Conference on Peer-to-Peer Computing September 0507, Linkoping, Sweden (2002) 104. IEEE Computer Society (2002) Stoica, I., Morris, R., Karger, D., Kaashoek, M., and Balakrishnan, H.: Chord: As scalable peer-to-peer lookup service for internet applications. In Proceedings of ACM SIGCOMM 01 (2001) Wolfgang Nejdl, Martin Wolpers, Wolf Siberski, Christoph Schmitz, Mario Schlosser, Ingo Brunkhorst, Alexander Loser: SuperPeerBased Routing and Clustering Strategies for RDF Based Peer-To-Peer Networks, WWW2003, Budapest, Hungary (2003) 536543 T. K. Sellis, N. Roussopoulos and C. Faloutsos, "The R+-Tree: A Dynamic Index for Multi-dimensional Objects", Proc. of VLDB, pp. 507-518, 1987.

Potrebbero piacerti anche