Le Store WebContent Benjamin NGUYEN UVSQ & INRIA-SMIS Spyros - - PowerPoint PPT Presentation

le store webcontent
SMART_READER_LITE
LIVE PREVIEW

Le Store WebContent Benjamin NGUYEN UVSQ & INRIA-SMIS Spyros - - PowerPoint PPT Presentation

1 Le Store WebContent Benjamin NGUYEN UVSQ & INRIA-SMIS Spyros ZOUPANOS U.Paris Dauphine & INRIA-LEO Workshop Sources Ouvertes et Service Caen 2010 2 Plan 1. Enjeux de lutilisation dun SGBD XML 2. Exemple du store


slide-1
SLIDE 1

1

Le Store WebContent

Benjamin NGUYEN UVSQ & INRIA-SMIS Spyros ZOUPANOS U.Paris Dauphine & INRIA-LEO Workshop Sources Ouvertes et Service – Caen 2010

slide-2
SLIDE 2

2

Plan

  • 1. Enjeux de l’utilisation d’un SGBD XML
  • 2. Exemple du store centralisé
  • 3. Store P2P
slide-3
SLIDE 3

3

Enjeux de l’utilisation d’un SGBD XML

slide-4
SLIDE 4

4

Architecture de WebContent

XML !!

slide-5
SLIDE 5

5

Le format pivot (UML)

slide-6
SLIDE 6

6

Le format pivot (exemple XML)

  • Les schémas XML
  • Un exemple de document
slide-7
SLIDE 7

7

Paradigme des Services Web

  • Un modèle pivot de documents

basé sur UML et implémenté par un XML Schema

  • Des données échangées via des

services web en XML

  • Un traitement en interne des

informations par des programmes en C, Java, etc…

slide-8
SLIDE 8

8

Quelle utilisation des documents ?

  • Stockage
  • Définition d’une URI
  • Sert de référence future
  • Récupération
  • Intégralité du document indexation des documents
  • Sous partie du document indexation structurelle
  • Requêtes utilisation d’un langage de requête (XQuery)
  • Modification de la structure du document
  • Jointure entre documents
  • Modification (possiblement concurrente) des documents lors d’une chaîne

de traitement problème d’incohérences / redondance

  • Il faut utiliser un véritable SGBD et pas simplement des fichiers !
slide-9
SLIDE 9

9

Store centralisé

slide-10
SLIDE 10

10

Construction du StoreService

  • Problème :
  • Construire un wrapper de Web Service sur une base de données XML

déjà existante (eXist, MonetDB, SQL Server, Quizx, … Sedna ?)

  • Choix d’un SGBD existant performant & fonctionnel (et des interfaces

existant par rapport au langage d’interrogation)

  • Caractéristiques
  • Passage à l’échelle

– Nombre de documents (ok?) – Nombre de requêtes (pb?)

  • Robustesse
  • Reprise sur panne
slide-11
SLIDE 11

11

Fonctionnalités

  • Stockage d’un document du modèle
  • Génération de l’URI
  • Récupération du document
  • Dans son intégralité
  • Juste une sous partie
  • Basé sur l’utilisation des URIs WebContent
  • Requêtes XQuery complexes sur les documents
slide-12
SLIDE 12

12

Démo du store centralisé

slide-13
SLIDE 13

13

Enseignements

  • L’utilisation simple de fichiers n’aurait pas fonctionné
  • Le système passe à l’échelle en terme de documents (plusieurs

milliers)

  • Un système d’indexation simple aurait pu suffire
  • Peu de fonctionnalités véritables du SGBD ont été utilisées
  • Il est difficile de séparer le service de stockage du service

d’interrogation

slide-14
SLIDE 14

14

3- Store P2P

slide-15
SLIDE 15

15

Outline of P2P services

SOAP access Local P2P SPARQL processor Local P2P XML- AXML query processor Local P2P XML- AXML query optimizer XML store + Xquery processing Local part of the P2P index File storage Peer 2 Peer 4 Peer 1 Peer 3

slide-16
SLIDE 16

16

Peer-to-peer storage service

Implemented jointly by several peers DHT service is implemented on top of DHTs Basic functionality of a DHT

  • put(k,v)
  • get(k)

Different DHTs may have different algorithmic properties

  • Goal: combine the advantages of the available DHTs
slide-17
SLIDE 17

17

KadoP

Index keys:

  • all element & attribute names

Index values:

  • structural identifiers (docID, start, end)

Kadop’s query language:

  • tree pattern language
  • each node is labeled with a XML node or word
  • edges are / or //

Query evaluation:

  • holistic join on the list of identifiers associated to the query node labels

Advantage:

  • fast tree patern query execution based on the one and only holistic join
slide-18
SLIDE 18

18

PathFinder

Index keys:

  • linear parent-child rooted paths

Index values:

  • sorted docId list of documents that contain a given path

PathFinder’s query language:

  • conjunctions of disjunctions of atomic path expressions
  • atomic path: XPath with child axis + predicate

Special hash function:

  • keys that are lexicographically close are stored to peers that are close between themselves

Advantage:

  • inequality queries e.g. /

a r t i c l e [ yea r > 2005 ]

slide-19
SLIDE 19

19

<myPage> <axml : sc se rv i ce= " ge tP rog ram" pee r= " t v channe l . com"> <pa rame te r>Mov ies< /pa rame te r> < /axm l : sc> < /myPage>

AXML language

Data-centric Web service composition ActiveXML document = XML document including calls to (continuous) Web services

  • A service call contains contact info for the Web service
  • When the calls is activated, results are added to the document as siblings of the service call.

<myPage> <axml : sc se rv i ce= " ge tP rog ram" pee r= " t v channe l . com"> <pa rame te r>Mov ies< /pa rame te r> < /axm l : sc> <prog ram day=" today "><mov ie>Shrek 3< /mov ie>< /p rog ram> < /myPage> <myPage> <axml : sc se rv i ce= " ge tP rog ram" pee r= " t v channe l . com"> <pa rame te r>Mov ies< /pa rame te r> < /axm l : sc> <prog ram day=" today "><mov ie>Shrek 3< /mov ie>< /p rog ram> <prog ram day=" tomo r row"><mov ie>Per sepo l i s< /mov ie>< / p rog ram> < /myPage>

slide-20
SLIDE 20

20

AXML evaluation

AXML document d@p1, sc in d calls s@p2($in) Activating sc entails:

  • stream $in to p2
  • evaluate s@p2
  • stream the results of s@p2 to p1

p1 p2 s@p2 d

slide-21
SLIDE 21

21

OptimAX

A rule based AXML optimizer

  • uses an extensible set of rules (cooperates with other programs to perform better document opimization)
  • rewrites an AXML document to another one with smaller overall evaluation cost
  • uses statistics for document optimization
slide-22
SLIDE 22

22

Putting everything together

When a query arrives:

  • it is introduced into a document d1
  • d1 is given to optimAX for optimization
  • ptimAX will cooperate with TGV – an algebraic XQuery compiler – to decompose it into sub-queries
  • based on the type of the sub-query, optimAX will create a call to the right DHT
  • a compensation query will be added in the new document d2 above all the calls to the DHTs
  • further optimization if needed will be performed
  • d2 will be given to the AXML engine for evaluation
slide-23
SLIDE 23

23

Outline of P2P services

SOAP access Local P2P SPARQL processor Local P2P XML- AXML query processor Local P2P XML- AXML query optimizer XML store + Xquery processing Local part of the P2P index File storage Peer 2 Peer 4 Peer 1 Peer 3

slide-24
SLIDE 24

24

Example

Original query

f

  • r

$d1 i n /Co l1/Book , $d2 i n / Co l2 /Book where $d1 /PageNo < 400 and $d2 /Au thor = "U l lman" and $d2 /Code = $d1 /Code r e tu rn $d2 /T i t l e

OptimAX TGV

slide-25
SLIDE 25

25

Example

Join query

f

  • r

$x_0 i n $ i n_0 / / r es , $x_1 i n $ i n_1 / / res where $x_0 / /Code= $x_1 /Code re tu rn $x_0 / /T i t l e

Join query

f

  • r

$x_0 i n $ i n_0 / / r es , $x_1 i n $ i n_1 / / res where $x_0 / /Code= $x_1 /Code re tu rn $x_0 / /T i t l e

Tree pattern query

<Co l2> <Book re tu rned=" t rue "> <Au tho r>U l l man</Au tho r> <Code />< /Book> < /Co l2>

Tree pattern query

<Co l2> <Book re tu rned=" t rue "> <Au tho r>U l l man</Au tho r> <Code />< /Book> < /Co l2>

Query with inequality

f

  • r

$d1 i n /Co l1 / Book where $d1 /PageNo < 400 re tu rn <res> {$d1 /Code } < / res>

Query with inequality

f

  • r

$d1 i n /Co l1 / Book where $d1 /PageNo < 400 re tu rn <res> {$d1 /Code } < / res>

slide-26
SLIDE 26

26

SPARQL processor

In WebContent there are semantic data to be queried. A semantic peer marks available resources according to the appropriate ontologies. Semantic peers interact with each other by means of mapping. With the use of ontologies and mappings, reasoning can be inferred.

slide-27
SLIDE 27

27

Semantic example

Query: Q(X) :- P1:Aircraft(X) Max conjunctive rewritings: R1(X) :- P1:Aircraft(X) R2(X) :- P2:Airplane(X) R3(X) :- P2:Airliner(X) R4(X) :- P2:Cargo(X)

Aircraft Airplane Airliner Cargo

P1 P2