How can I allow parallel query execution in one SPARQL Algebra
Expression?
Is there some SPARQL algebra operation implemented in ARQ to do
that? I want to manually optimize one SPARQL algebra expression
executing some SERVICE operations in parallel.
There's no built-in way at the moment but nothing stops it being done.
The optimizer tries to linearize execution with "sequence", which most
of the time is a better choice. Multiple threads on a machine can be
used for multiple parallel requests (e.g. Fuseki).
With service the right choice is hard to make - if one SERVICE is very
small, it's better to do it, and ask the other SERVICE(s) more grounded
patterns.
You may need to write your own ops - the first pattern looks quite
grounded though.
Andy
(What's the query? Unprefixed algebra is a bit difficult to read :-)
On 13/06/11 19:04, Regis Pires Magalhães wrote:
In the following example *drugbank*, *sider* and *dbpedia* service
operations could be executed in parallel after *dailymed* service
execution. How could I define such parallelism in an SPARQL Algebra
expression?
(project (?dgai ?sen ?dgin ?dgls)
(conditional
(conditional
(sequence
* (service<http://www4.wiwiss.fu-berlin.de/dailymed/sparql>*
(bgp
(triple<
http://www4.wiwiss.fu-berlin.de/dailymed/resource/drugs/3056> <
http://www4.wiwiss.fu-berlin.de/dailymed/resource/dailymed/activeIngredient>
?dgai)
(triple ?dgai<http://www.w3.org/2000/01/rdf-schema#label>
?dgain)
(triple<
http://www4.wiwiss.fu-berlin.de/dailymed/resource/drugs/3056> <
http://www4.wiwiss.fu-berlin.de/dailymed/resource/dailymed/genericDrug>
?gdg)
(triple<
http://www4.wiwiss.fu-berlin.de/dailymed/resource/drugs/3056> <
http://www.w3.org/2002/07/owl#sameAs> ?sa)
))
* (service<http://www4.wiwiss.fu-berlin.de/drugbank/sparql>
* (bgp (triple ?gdg<
http://www4.wiwiss.fu-berlin.de/drugbank/resource/drugbank/pharmacology>
?dgin))))
* (service<http://www4.wiwiss.fu-berlin.de/sider/sparql>
* (bgp
(triple ?sa<
http://www4.wiwiss.fu-berlin.de/sider/resource/sider/sideEffect> ?se)
(triple ?se<
http://www4.wiwiss.fu-berlin.de/sider/resource/sider/sideEffectName> ?sen)
)))
* (service<http://dbpedia.org/sparql>
* (bgp (triple ?sa<http://dbpedia.org/property/legalStatus>
?dgls)))))
Regards,
Regis.
Em 13 de junho de 2011 13:40, Regis Pires Magalhães<[email protected]
escreveu:
How can I allow parallel query execution in one SPARQL Algebra Expression?
Is there some SPARQL algebra operation implemented in ARQ to do that?
I want to manually optimize one SPARQL algebra expression executing some
SERVICE operations in parallel.
Regards,
Regis.