distributed evaluation of enhanced path queriesthomo/presentations/edbtworkshop06p.pdf• partition...
TRANSCRIPT
![Page 1: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/1.jpg)
Distributed Evaluation of
Enhanced Path Queries
Dan C. Stefanescu, Alex Thomo
![Page 2: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/2.jpg)
Label setting vs. Label Correcting Algorithms
• Label setting algorithms: Use priority queue
– E.g. Dijkstra’s
– When a node is labeled we know for sure that it’s the best label, i.e. it will be
the weight of the shortest path from the source to that node.
• Label correcting algorithms: Use FIFO queue
– E.g. Pallotino’s
– When a node is labeled we don’t know for sure that it’s the best label,
possibly we will improve it later.
– Appropriate to extend to distributed setting…
![Page 3: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/3.jpg)
Let’s apply it… We will build the green graph implicitly and
lazily.
Along the way we will apply the shortest
path general algorithm.
Queue : (o,p,0)
Object-State-Weight Table : Here we store
the “labeling”s of the green graph
nodes.
d
o
S
R
DB
R
R
b c
e
T
T
S
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 4: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/4.jpg)
Let’s apply it… We will build the green graph implicitly and
lazily.
Along the way we will apply the shortest
path general algorithm.
Queue : (c,r,5) (b,q,0) (d,q,0)
Object-State-Weight Table : Here we store
the “labeling”s of the green graph
nodes.
(o,p,0)
d
o
S
R
DB
R
R
b c
e
T
T
S
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 5: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/5.jpg)
Let’s apply it… We will build the green graph implicitly and
lazily.
Along the way we will apply the shortest
path general algorithm.
Queue : (b,q,0) (d,q,0)
Object-State-Weight Table : Here we store
the “labeling”s of the green graph
nodes.
(o,p,0) (c,r,5)
d
o
S
R
DB
R
R
b c
e
T
T
S
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 6: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/6.jpg)
Let’s apply it… We will build the green graph implicitly and
lazily.
Along the way we will apply the shortest
path general algorithm.
Queue : (d,q,0) (b,s,1) (c,r,2)
Object-State-Weight Table : Here we store
the “labeling”s of the green graph
nodes.
(o,p,0) (c,r,5) (b,q,0)
d
o
S
R
DB
R
R
b c
e
T
T
S
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 7: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/7.jpg)
Let’s apply it… We will build the green graph implicitly and
lazily.
Along the way we will apply the shortest
path general algorithm.
Queue : (b,s,1) (c,r,2) (d,s,1) (e,r,0)
Object-State-Weight Table : Here we store
the “labeling”s of the green graph
nodes.
(o,p,0) (c,r,5) (b,q,0) (d,q,0)
d
o
S
R
DB
R
R
b c
e
T
T
S
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 8: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/8.jpg)
Let’s apply it… We will build the green graph implicitly and
lazily.
Along the way we will apply the shortest
path general algorithm.
Queue : (c,r,2) (d,s,1) (e,r,0)
Object-State-Weight Table : Here we store
the “labeling”s of the green graph
nodes.
(o,p,0) (c,r,5) (b,q,0) (d,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 9: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/9.jpg)
Let’s apply it… We will build the green graph implicitly and
lazily.
Along the way we will apply the shortest
path general algorithm.
Queue : (d,s,1) (e,r,0)
Object-State-Weight Table : Here we store
the “labeling”s of the green graph
nodes.
(o,p,0) (c,r,2) (b,q,0) (d,q,0) (b,s,1)
…
d
o
S
R
DB
R
R
b c
e
T
T
S
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 10: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/10.jpg)
Distributed Algorithm • The nodes are partitioned in different processors, which don’t share
memory.
• Communication is achieved through asynchronous message passing.
Idea
• Partition the Object-State-Weight table among the processors
• When dequeueing see whether the corresponding object is in the local
Object-State-Weight table.
– If yes, proceed as previously
– Otherwise pack the dequeued triple in a message and send it to the
processor holding the real DB node.
• Terminate when the processing queues of all processors are empty and
there is no message sent but not yet received.
![Page 11: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/11.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (o,p,0)
Object-State-Weight Table :
P2:
Queue :
Object-State-Weight Table :
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 12: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/12.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (c,r,5) (b,q,0) (d,q,0)
Object-State-Weight Table :
(o,p,0)
P2:
Queue :
Object-State-Weight Table :
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
message (c,r,5)
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 13: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/13.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (b,q,0) (d,q,0)
Object-State-Weight Table :
(o,p,0)
P2:
Queue : (c,r,5)
Object-State-Weight Table :
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 14: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/14.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (b,q,0) (d,q,0)
Object-State-Weight Table :
(o,p,0)
P2:
Queue :
Object-State-Weight Table :
(c,r,5)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
message (b,q,0)
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 15: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/15.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (d,q,0)
Object-State-Weight Table :
(o,p,0)
P2:
Queue : (b,q,0)
Object-State-Weight Table :
(c,r,5)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 16: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/16.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (d,q,0)
Object-State-Weight Table :
(o,p,0)
P2:
Queue : (b,s,1) (c,r,2) (o,r,2)
Object-State-Weight Table :
(c,r,5) (b,q,0)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 17: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/17.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (d,q,0)
Object-State-Weight Table :
(o,p,0)
P2:
Queue : (c,r,2) (o,r,2)
Object-State-Weight Table :
(c,r,5) (b,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 18: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/18.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (d,s,1) (e,r,0)
Object-State-Weight Table :
(o,p,0) (d,q,0)
P2:
Queue : (o,r,2)
Object-State-Weight Table :
(c,r,2) (b,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 19: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/19.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (e,r,0)
Object-State-Weight Table :
(o,p,0) (d,q,0) (d,s,1)
P2:
Queue : (o,r,2)
Object-State-Weight Table :
(c,r,2) (b,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 20: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/20.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (e,r,0)
Object-State-Weight Table :
(o,p,0) (d,q,0) (d,s,1)
P2:
Queue : (o,r,2)
Object-State-Weight Table :
(c,r,2) (b,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
message (o,r,2)
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 21: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/21.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (o,r,2) (e,r,0)
Object-State-Weight Table :
(o,p,0) (d,q,0) (d,s,1)
P2:
Queue :
Object-State-Weight Table :
(c,r,2) (b,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 22: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/22.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue : (e,r,0)
Object-State-Weight Table :
(o,p,0) (d,q,0) (d,s,1) (o,r,2)
P2:
Queue :
Object-State-Weight Table :
(c,r,2) (b,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
message (e,r,0)
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 23: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/23.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue :
Object-State-Weight Table :
(o,p,0) (d,q,0) (d,s,1) (o,r,2)
P2:
Queue : (e,r,0)
Object-State-Weight Table :
(c,r,2) (b,q,0) (b,s,1)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 24: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/24.jpg)
Distributed Algorithm Suppose:
o, d are in processor P1
b, c, e are in processor P2
P1:
Queue :
Object-State-Weight Table :
(o,p,0) (d,q,0) (d,s,1) (o,r,2)
P2:
Queue :
Object-State-Weight Table :
(c,r,2) (b,q,0) (b,s,1) (e,r,0)
d
o
S
R
DB
R
R
b c
e
T
T
S P1 P2
p q r
R,0 T,0
T,5
S,2
s
,1
![Page 25: Distributed Evaluation of Enhanced Path Queriesthomo/presentations/edbtworkshop06p.pdf• Partition the Object-State-Weight table among the processors • When dequeueing see whether](https://reader030.vdocuments.mx/reader030/viewer/2022041206/5d5e072c88c9932f2d8b93d6/html5/thumbnails/25.jpg)
References
• Dan C. Stefanescu, Alex Thomo. Enhanced Regular Path Queries on
Semistructured Databases. EDBT Workshops 2006: 700-711
• Dan C. Stefanescu, Alex Thomo, Lida Thomo. Distributed evaluation of
generalized path queries. SAC 2005: 610-616
• Gösta Grahne, Alex Thomo. Query Answering and Containment for Regular Path
Queries under Distortions. FoIKS 2004: 98-115