1 / 22

Efficient processing of XPath queries with structured overlay networks

OnTheMove - OTM 2005 Federated Conferences. Agia Napa, Cyprus. 2 November 2005. Efficient processing of XPath queries with structured overlay networks. Gleb Skobeltsyn, Manfred Hauswirth, Karl Aberer. Presenter: Gleb Skobeltsyn.

devika
Download Presentation

Efficient processing of XPath queries with structured overlay networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. OnTheMove- OTM 2005 Federated Conferences Agia Napa, Cyprus. 2 November 2005. Efficient processing of XPath queries with structured overlay networks Gleb Skobeltsyn, Manfred Hauswirth, Karl Aberer Presenter: Gleb Skobeltsyn This work was (partially) funded by the EU project BRICKShttp://www.brickscommunity.org Ecole Polytechnique Fédérale de Lausanne, Switzerland       

  2. Contents • Motivation & Problem statement • P-Grid short overview • Indexing strategy • Basic Index • Caching strategy • Simulation results • Conclusions Efficient processing of XPath queries with structured overlay networks

  3. Motivation • Complex queries are easy to answer in unstructured P2P networks, e.g., edutella. • But the approach doesn’t scale because of the high bandwidth consumption. • Structured P2P networks typically offer logarithmic search complexity, but require a special index. • Indexing structure to support XPath queries over a distributed XML warehouse??? Efficient processing of XPath queries with structured overlay networks

  4. Problem statement (1/2) • Problem: To be able to answer structured queries (e.g. XPath) in a XML warehouse distributed in a structured P2P network. • We assume using 2 different indices: • For indexing structure(e.g. pure XML path); • For indexing values. • In this paper we concentrate on the first issue. Efficient processing of XPath queries with structured overlay networks

  5. Problem statement (2/2) • We support XPath{*,//}queries, i.e. queries containing: • Child axes (“/”); • Descendant axis (“//”); • Wildcards (“*”). • Example: //A/B/*/C • We propose an indexing structure to answer such queries in a large distributed P2P XML warehouse • We try to minimize the consumed bandwidth measured in P2P overlay hops Efficient processing of XPath queries with structured overlay networks

  6. 0* 1* 00* 01* 10* 11* B 1* : E 01* : B 0* : B, F 10* : D 0* : A, F 11* : E 1* : C, D 00* : F P-Grid (1/3): introduction • P-Grid is a trie based DHT P2P, similar to Chord, Pastry, etc… (more info at http://www.p-grid.org/). • In P-Grid each peer is responsible for a set of binary keys which start from the peer’s prefix. • Routing is based on longest prefix matching (log search cost for skewed trees): P-Grid queryfor ‘100’ found A C D Efficient processing of XPath queries with structured overlay networks

  7. 11000 110010 0* 1* 11* 01* 00* 010* 011* 10* 111* 11000 110010 00001 data1 0011 data2 01001 011011 10100 10 1111 … … … … … … P-Grid (2/3): storing indexing information • Information is stored in data items. • Data item is a {key,data}tuple. • Each peer in P-Grid network stores data items whose keys start from the peer’s prefix 1100* 1101* 110* 11011 11011 Efficient processing of XPath queries with structured overlay networks

  8. 1. The peer responsible forh(comp) 2. The sub-tree responsible forh(comp) h(compl)* h(compu)* h(co)* … … h(complexity) h(computer) h(corporation) h(complexity) h(computer) … … … P-Grid (3/3): order preserving hash function • Keys are generated using a P-Grid order preserving hash function h( ): • Example: the key h(“comp”) is a prefix for keys: h(“computer”), h(“complexity”), h(“comp*”). • Routing to the key h(“comp”) may lead to two cases: Efficient processing of XPath queries with structured overlay networks

  9. Basic Index (1/4): introduction • We index XML paths found in the document. • Given a path P = l1/../lm, m data items are stored in P-Grid, using the following sub-paths (suffixes) as keys: { l1/l2/.../lm, l2/.../lm, …, lm } • Each data item storespath and URI. • Example: given a path P = “store/book/title”, 3 data items are created: Basic index Efficient processing of XPath queries with structured overlay networks

  10. Basic Index (2/4): search • Given a XPath query Q=l1s1l2..sk-1lk, where si: {/,//,*}. • The first longest sequence of labels divided by“/” is defined as qB. • Example: for“A//C/D//E”:qB=“C/D” • The query is answered by routing to the peer responsible for h(qB). • There are 2 cases: • There is one peer responsible for h(qB) – answer the query, • There is a set (sub-tree) of peers responsible for h(qB) – a shower broadcast is executed over this set. Efficient processing of XPath queries with structured overlay networks

  11. Basic index (3/4): shower broadcast • Shower broadcast – propagates a message (query) among all peers in the sub-tree: • Recursive algorithm, works in parallel fashion; • Each peer in the sub-tree is visited only once. * 1* 0* 00* 10* 01* 11* 010* 011* 110* 111* 1100* 1101* Efficient processing of XPath queries with structured overlay networks

  12. Basic Index (4/4): properties • Basic index is sufficient to answer XPath{*,//} queries. • The shower broadcast consumes bandwidth, though efficient in time and distributes the computing. • The improvement is to cache the most frequent queries locally and avoid shower broadcasts for them. Efficient processing of XPath queries with structured overlay networks

  13. Caching strategy (1/4): introduction • Types of queries: • Queries that can be answered by one peer locally. Example: “A/B/C//E” at the peer responsible for h(“A/B”). • Queries that require additional broadcast and contain only one sub-path (q=qB). Example: “A” at the peer responsible for h(“A/B”). • Queries that require additional broadcast and contain more than one sub-path (q≠qB). Example: “A//C//E” at the peer responsible for h(“A/C”). • We suggest caching the most popular queries of the type 3 to reduce the number of shower broadcasts. Caching strategy Efficient processing of XPath queries with structured overlay networks

  14. A // C / D // E Caching strategy (2/4): search • The key used for routing is no longer h(qB), but qC=concat(Pl1, Pl2 …Plk), where qB=Pl1 • Example: A C D E P= qC= • The query is routed to a relevant peer which may (or may not) answer the query form cache. • If the query is of the type 3 and cannot be answered locally, its result can be cached. • Similarly, the existing cache can be deleted. Efficient processing of XPath queries with structured overlay networks

  15. Caching strategy (3/4): example … A//C/D//E … Efficient processing of XPath queries with structured overlay networks

  16. Caching strategy (4/4): analysis • A query is profitable to cache if: UpdateCost*UpdateRate(subtree)<SearchCost(subtree)*SearchRate(query) • Where: • UpdateCost – the cost of one cache update (log N) • UpdateRate – average update rate in the sub-tree • SearchCost – the cost of search (routing+broadcast) • SearchRate – the query’s frequency (estimated locally) • The indexing strategy is adaptive to search/update ratio and tries to keep the messaging costs optimal. gathered from neighbours Efficient processing of XPath queries with structured overlay networks

  17. Simulations (1/4): testbed • Java application, stores data locally in a DBMS. • 50 XML documents, >5k unique paths • ~20k data items • In each experiment we used 10k queries randomly generated from the paths Simulations Efficient processing of XPath queries with structured overlay networks

  18. Simulations (2/4): search cost • Parameter t – fraction of “cachable” queries • All “cachable” queries are cached Efficient processing of XPath queries with structured overlay networks

  19. Simulations (3/4): search cost • 1000 peers • t=0.5 (50% of queries can be cached) Efficient processing of XPath queries with structured overlay networks

  20. Simulations (4/4): average costs • 1000 peers, t=0.5, Zipf s=1.2. • For a given search/update ratio there is an optimal point Efficient processing of XPath queries with structured overlay networks

  21. Conclusions • The efficient solution for indexing XML structure in structured overlay networks is proposed. • The presented solution can be used in a P2P XML querying engine for answering structural (sub) queries. Efficient processing of XPath queries with structured overlay networks

  22. Last slide Thank you for your attention! Questions? Efficient processing of XPath queries with structured overlay networks

More Related