-
Notifications
You must be signed in to change notification settings - Fork 7
Use Case: Invoking a VisKo Plan
- Service Composition with DataFAQs - the generic functionality that this use case employes.
VisKo accepts queries, creates a visualization plan, and invokes it by composing web services.
I want to mock this example up in full detail so that we can trace the RDF fragments through the pipeline. From the DataFAQs perspective, http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps is a dcat:Dataset that we're trying to evaluate with services https://raw.github.com/nicholasdelrio/visko/master/rdf/pdf-to-png.owl#pdf-to-png-as-sadi and https://raw.github.com/nicholasdelrio/visko/master/rdf/ps2pdf.owl#ps2pdfService-as-sadi, but I need to add the functionality to grab the output of the former and feed into the input of the latter. Once that's done, we'll have invoked a visko query plan, captured provenance of the invocation (including the original plan), and offered up the results in VoID, SD, and PROV linked data glory.
How to use DataFAQs to implement the VisKo query submission and invocation. This will lead to some new features of DataFAQs.
Notes at http://titanpad.com/ZeiMd7cOHj
Nick's planner accepts "visko-query:QueryPlanRequest" and returns a "visko-query:QueryPlan" containing a service composition chain to achieve the requested visualization.
- Source Code: QueryEngine.java
- Managed at http://iw.cs.utep.edu/visko-sadi
- The input to the planner manylinesQueryPlanRequest.owl asks for a postscript file to be viewed in Firefox
- Planner is invoked with
curl -d @manylinesQueryPlanRequest.owl http://iw.cs.utep.edu/visko-sadi/planner
- Limitations: output points to OWL-S service URIs for the range of the "wasAttributedBy" predicate. I have the SADI impls, but my knowledge base is devoid of this info..for the time being :)
- Limitations: where would service parameters go? This case (ps2pdf, pdf2png) requires no parameters, but we have many other services that require them.
- Input:
<rdf:RDF
xmlns="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#"
xml:base="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:visko-query="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ontology/visko-query.owl#"
xmlns:prov="http://www.w3.org/ns/prov/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:pml-provenance="http://inference-web.org/2.0/pml-provenance.owl#"
xmlns:dataset="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ontology/dataset.owl#">
<visko-query:QueryPlanRequest rdf:about="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#manylinesQueryPlanRequest">
<prov:wasDerivedFrom>
<dataset:PSDocument rdf:about="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#manylines">
<pml-provenance:hasFormat rdf:resource="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/formats/POSTSCRIPT.owl#POSTSCRIPT"/>
<pml-provenance:hasURL>http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps</pml-provenance:hasURL>
</dataset:PSDocument>
</prov:wasDerivedFrom>
<visko-query:hasResultViewableIn rdf:resource="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/mozilla-firefox.owl#mozilla-firefox"/>
</visko-query:QueryPlanRequest>
</rdf:RDF>
- Output:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:visko-query="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ontology/visko-query.owl#"
xmlns:pml-provenance="http://inference-web.org/2.0/pml-provenance.owl#"
xmlns:prov="http://www.w3.org/ns/prov/">
<visko-query:QueryPlan rdf:about="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest.owl#manylinesQueryPlanRequest">
<prov:hadActivity>
<prov:Activity rdf:about="http://trust.utep.edu/visko/service-invocation1">
<prov:wasInformedBy>
<prov:Activity rdf:about="http://trust.utep.edu/visko/service-invocation0">
<prov:used>http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps</prov:used>
<prov:wasAttributedTo>https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ps2pdf.owl#ps2pdfService</prov:wasAttributedTo>
</prov:Activity>
</prov:wasInformedBy>
<prov:wasAttributedTo>https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/pdf2png.owl#pdf2pngService</prov:wasAttributedTo>
</prov:Activity>
</prov:hadActivity>
</visko-query:QueryPlan>
</rdf:RDF>
visko-planner.py is a FAqT Selector Service that accepts "VisKo queries" and returns a service composition plan to achieve the requested visualization.
- Deployed at http://aquarius.tw.rpi.edu/projects/datafaqs/services/sadi/core/select-faqts/visko-planner
- The input to the planner manylines.ttl asks for a postscript file to be viewed in Firefox.
- Planner is invoked with
curl -H "Content-Type: text/turtle" -d @manylines.ttl http://aquarius.tw.rpi.edu/projects/datafaqs/services/sadi/core/select-faqts/visko-planner
TODO: We want it to return something like:
<service-invocation-2> # Do this one second.
a prov:Activity;
prov:wasAttributedTo <https://raw.github.com/nicholasdelrio/visko/master/rdf/ps2pdf.owl#ps2pdfService-as-sadi>;
prov:wasInformedBy <service-invocation-1>;
.
<service-invocation-1> # Do this one first
a prov:Activity;
prov:wasAttributedTo <https://raw.github.com/nicholasdelrio/visko/master/rdf/pdf-to-png.owl#pdf-to-png-as-sadi>;
prov:used <http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps>;
.
<https://raw.github.com/nicholasdelrio/visko/master/rdf/pdf-to-png.owl#pdf-to-png-as-sadi>
a datafaqs:SADIService, OWLS:Service, prov:Agent;
.
<https://raw.github.com/nicholasdelrio/visko/master/rdf/ps2pdf.owl#ps2pdfService-as-sadi>
a datafaqs:SADIService, OWLS:Service, prov:Agent;
.
# TODO: plus anything that DataFAQs core needs!
http://iw.cs.utep.edu/visko-web/ViskoServletManager?requestType=query-triple-store&query= sits behind http://iw.cs.utep.edu/visko-web/sparql-query.html
Nick has the ps2pdf and pdf2png services hosted here: http://iw.cs.utep.edu:8080/toolkits-sadi/
- Service Composition with DataFAQs - the generic functionality that this use case employes.