Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sponsored by the National Science Foundation Towards an Ontology-savvy Aggregate Manager API Marshall Brinn GENI Program Office Sept. 17, 2015.

Similar presentations


Presentation on theme: "Sponsored by the National Science Foundation Towards an Ontology-savvy Aggregate Manager API Marshall Brinn GENI Program Office Sept. 17, 2015."— Presentation transcript:

1 Sponsored by the National Science Foundation Towards an Ontology-savvy Aggregate Manager API Marshall Brinn GENI Program Office Sept. 17, 2015

2 Sponsored by the National Science Foundation2 Motivation GENI Resource Specifications (RSpecs) are notoriously difficult to work with –They are ad-hoc and have no underlying ontology or semantics –They are therefore quite hard to understand, expand and reason over. Partially as a result, –The AM API ListResources call (what do you have?) does not support any queries (what do you have that meets the following criteria?) –One cannot request resources using an RDF/NDL graph, as may be natural.

3 Sponsored by the National Science Foundation3 Drinking the Kool-aid Trying to address these issues, a broad email thread called “Drinking the Kool-aid” sprang up in early 2015 –Primarily Ilya Baldin, Timur Friedman, Brecht Vermeulen, Alex Willner, and Marshall Brinn –Discussing how semantic representation and queries might fit into the AM API in a relatively natural way We sketched out a design and I built/demonstrated a prototype capability along these lines. This presentation summarizes the design and demo capability

4 Sponsored by the National Science Foundation4 AM API Affordances As it turns out, the GENI AM API supports (in principle) multiple RSpec representations –In ‘getVersion’, an aggregate lists what RSpec formats it handles. –In ‘listResources’, can specify what RSpec format is requested for the response –Omni already allows RSpec format using ‘—rspectype’ In practice, few tools and aggregates support more than the standard GENI RSpec format V3. – But it provides a foothold for adding new support

5 Sponsored by the National Science Foundation5 Get Advertisement [ListResources no slice] : What do you have? Omni and the V2 AM support new options to support querying for resources using SPARQL queries. The options are: --query_type : The type of the query provided (currently, only sparql is supported) --query : The text of the provided query --query_filename : The name of the file containing the provided query If query_type is not provided or neither query or query_filename is provided, ListResources operates as usual, provided the full advertisement RSpec. If query_type is provided (and is sparql) and either query or query_filename is provided, then the AM will use the sparql query to find all resources that match the query and return an XML version of the SPARQL result. For example, If $GCF/examples/medium.sparql contains the query: PREFIX compute: SELECT ?subj ?cn WHERE { ?subj compute:sliver_type "medium". ?subj compute:component_name ?cn } the omni call python omni.py -a https://localhost:8001 listresources --query_type sparql --query_file $GCF/examples/medium.sparql produces a SPARQL result describing only those resources of sliver_type medium:

6 Sponsored by the National Science Foundation6 Get Advertisement [2] 09:15:53 INFO : Listed advertised resources at 1 out of 1 possible aggregates. 09:15:53 INFO : 09:15:53 INFO : <!-- Resources at AM: URN: unspecified_AM_URN URL: https://localhost:8001 --> 09:15:53 INFO : <binding name="subj" value="urn:publicid:IDN+geni:gpo:gcf+fakevm+1a22743e-35ac-4f4b-897f-5ce025d506ca"/> <binding name="subj" value="urn:publicid:IDN+geni:gpo:gcf+fakevm+3db69135-356b-48e4-b8e7-615b8dcf763f"/> <binding name="subj" value="urn:publicid:IDN+geni:gpo:gcf+fakevm+fa073e24-7b95-44b0-9628-442f9d9cf5f3"/>

7 Sponsored by the National Science Foundation7 CreateSliver CreateSliver supports the ability to use an NDL graph rather than a request RSpec to specify the results requested. For this call, the pre-existing option --rspectype must be provided. Only rdf 1.1 is supported. For example, if the following RDF graph is contained in the file GCF/examples/2n-ndl.xml, <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:compute="http://geni-orca.renci.org/owl/compute.owl#" > The following call python omni.py -a https://localhost:8001 --rspectype rdf 1.1 createsliver FOOBAR $GCF/examples/2n-ndl.xml will provide the following result, with the manifest provided in RDF as well (rather than as a manifest rspec):

8 Sponsored by the National Science Foundation8 CreateSliver [2] 09:25:00 INFO : Creating sliver(s) from rspec file /Users/mbrinn/rspecs/ndl/2n-ndl.xml for slice urn:publicid:IDN+geni:gpo:gcf+slice+FOOBAR 09:25:00 INFO : Got return from CreateSliver for slice FOOBAR at https://localhost:8001: 09:25:00 INFO : 09:25:00 INFO : <!-- Reserved resources for: Slice: FOOBAR at AM: URN: unspecified_AM_URN URL: https://localhost:8001 --> 09:25:00 INFO : <rdf:RDF xmlns:compute="http://geni-orca.renci.org/owl/compute.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> urn:publicid:IDN+geni.gpo.gcfv3+fakevm+...4c urn:publicid:geni.gpo.gcfv3+authority+am urn:publicid:IDN+geni.gpo.gcfv3+sl...4c-geni--gpo—gcfFOOBAR urn:publicid:IDN+geni.gpo.gcfv3+fakevm...ca urn:publicid:geni.gpo.gcfv3+authority+am urn:publicid:IDN+geni.gpo.gcfv3+sl...ca-geni--gpo—gcfFOOBAR 09:25:00 INFO : ------------------------------------------------------

9 Sponsored by the National Science Foundation9 Get Manifest [ListResources with slice] : What do I have on this slice? The ListResources AM call with a slice provided also takes an rspectype argument (only ndl 1.1 supported). If provided, the return will be an NDL graph rather than a manifest. For example, given the createsliver call above, the following call python omni.py -a https://localhost:8001 --rspectype rdf 1.1 listresources FOOBAR Would provide the following output:

10 Sponsored by the National Science Foundation10 Get Manifest [2] 09:26:38 INFO : <!-- Reserved resources for: Slice: FOOBAR at AM: URN: unspecified_AM_URN URL: https://localhost:8001 --> 09:26:38 INFO : <rdf:RDF xmlns:compute="http://geni-orca.renci.org/owl/compute.owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> urn:publicid:IDN+geni.gpo.gcfv3+fake...4c urn:publicid:geni.gpo.gcfv3+authority+am urn:publicid:IDN+geni.gpo.gcfv3+sl...4c-geni--gpo—gcfFOOBAR urn:publicid:IDN+geni.gpo.gcfv3+fake...ca urn:publicid:geni.gpo.gcfv3+authority+am urn:publicid:IDN+geni.gpo.gcfv3+sl...ca-geni--gpo—gcfFOOBAR 09:26:38 INFO : ------------------------------------------------------

11 Sponsored by the National Science Foundation11 Changes Summary Changes to AM (GRAM) –Support RDF Rspec format and SPARQL queries –Associated changes to ListResources and CreateSlice Changes to OMNI –Add –query, --query_type, --query_file arguments and support –Add support for printing RDF query responses NB: The code for this capability is on a branch in the old GPO GCF repository –Not carried forward to the geni-tools GitHub repo, but would be easy to move there if interest exists.

12 Sponsored by the National Science Foundation12 Questions, Comments, Suggestions?


Download ppt "Sponsored by the National Science Foundation Towards an Ontology-savvy Aggregate Manager API Marshall Brinn GENI Program Office Sept. 17, 2015."

Similar presentations


Ads by Google