-
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 employs.
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 http://iw.cs.utep.edu:8080/toolkits-sadi/ps2pdf and http://iw.cs.utep.edu:8080/toolkits-sadi/pdf2png. I still 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 has two sadi services that generate query plans, the first service described below consumes and generates RDF (based heavily on Prov-O) that Tim initially proposed in the initial discussion http://titanpad.com/ZeiMd7cOHj. The second service consumes and generates RDF based heavily on the new visko-query vocabulary.
First Service: http://iw.cs.utep.edu/visko-sadi/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
- 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>
<pml-provenance:hasFormat rdf:resource="https://raw.github.com/nicholasdelrio/visko/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/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>
<visko-query:ServiceInvocation>
<prov:wasInformedBy>
<visko-query:ServiceInvocation>
<prov:used>http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps</prov:used>
<prov:wasAttributedTo>http://iw.cs.utep.edu:8080/toolkits-sadi/ps2pdf</prov:wasAttributedTo>
</visko-query:ServiceInvocation>
</prov:wasInformedBy>
<prov:wasAttributedTo>http://iw.cs.utep.edu:8080/toolkits-sadi/pdf2png</prov:wasAttributedTo>
</visko-query:ServiceInvocation>
</prov:hadActivity>
</visko-query:QueryPlan>
</rdf:RDF>
Second Service: http://iw.cs.utep.edu/visko-sadi/query-planner accepts "visko-query:QueryPlanRequest" and returns a "visko-query:QueryPlan" containing a service composition chain to achieve the requested visualization.
- Source Code: QueryPlanner.java
- Managed at http://iw.cs.utep.edu/visko-sadi
- The input to the planner manylinesQueryPlanRequest-1.owl asks for a postscript file to be viewed in Firefox
- Planner is invoked with
curl -d @manylinesQueryPlanRequest-1.owl http://iw.cs.utep.edu/visko-sadi/query-planner
other services that require them. - Input:
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest-1.owl#"
xml:base="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest-1.owl"
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: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-1.owl#manylinesQueryPlanRequest-1">
<visko-query:visualizes>
<dataset:PSDocument>
<pml-provenance:hasFormat rdf:resource="https://raw.github.com/nicholasdelrio/visko/master/rdf/formats/POSTSCRIPT.owl#POSTSCRIPT"/>
<pml-provenance:hasURL>http://www.adobetutorialz.com/content_images/AdobeTechnologies/PostScript/manylines.ps</pml-provenance:hasURL>
<visko-query:viewedIn rdf:resource="https://raw.github.com/nicholasdelrio/visko/master/rdf/mozilla-firefox.owl#mozilla-firefox"/>
<visko-query:viewedAs rdf:resource="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/ontology/visko-query.owl#wildcard"/>
</dataset:PSDocument>
</visko-query:visualizes>
</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#">
<visko-query:QueryPlan rdf:about="https://raw.github.com/nicholasdelrio/visko-rdf/master/rdf/queries/manylinesQueryPlanRequest-1.owl#manylinesQueryPlanRequest-1">
<visko-query:isFinalizedWith>
<visko-query:ServiceInvocation>
<visko-query:precededByInvocation>
<visko-query:ServiceInvocation>
<visko-query:isAttributedTo>http://iw.cs.utep.edu:8080/toolkits-sadi/ps2pdf</visko-query:isAttributedTo>
</visko-query:ServiceInvocation>
</visko-query:precededByInvocation>
<visko-query:isAttributedTo>http://iw.cs.utep.edu:8080/toolkits-sadi/pdf2png</visko-query:isAttributedTo>
</visko-query:ServiceInvocation>
</visko-query:isFinalizedWith>
</visko-query:QueryPlan>
</rdf:RDF>
- Limitations: where would service parameters go? This case (ps2pdf, pdf2png) requires no parameters, but we have many other services with large parameters sets. ANSWER: SADI secondary parameters!
- The main difference between between the RDF that services consume/generate is that the first service relies heavily on Prov-O languages constructs to describe the pipelines, where as the second service uses a custom language i.e., visko-query.
- How are the SADI services associated with the abstract visko-operator:Operators? Right now I didn't want to change how the visko pipeline generator constructs pipelines, so it still returns pipelines using OWLS-Services. However, my SADI query planner services do a bit of post processing on the pipelines and identifies SADI services that are associated with an OWLS-Service, via the RDF:
<rdf:RDF>
<rdf:Description rdf:about="https://raw.github.com/nicholasdelrio/visko/master/rdf/ps2pdf.owl#ps2pdfService">
<viskoS:hasEquivalentSADI rdf:resource="http://iw.cs.utep.edu:8080/toolkits-sadi/ps2pdf"/>
</rdf:Description>
</rdf:RDF>
With this added bit of RDF, my planner is able to return query plans of SADI services, rather than OWLS.
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.