S2S

The start

This page holds some information related to the RPI S2S program and an effort to build out a set of services on this server to allow use of the S2S faceted interface. Note that we have build out faceted interfaces with the Exhibit framework (ref: http://data.oceandrilling.org/labs/exhibit/loguitest1.html. The goal with S2S is to use something faster so that it can scale to the 100 million+ triples we will have with the full data set.

Assets

Status so far

The Go based service is running and simply needs to be ported to the server and have an nginx entry made in it.

  • I need to flesh out the creation of the various SPARQL commands based on the URL parameters. (need to learn Go a bit better WRT string manipulation)
  • Get the JSON format correct for S2S
  • Deploy the Go based app to the server and then front it with nginx. Also will want to set up the caching values and cross site entries in nginx.

Goal

Create a service like the BCO-DMO one above that returns JSON data required by S2S to build out the faceted interface. The SPARQL calls will look something like (RESULTS):

# get counts based on paremters
PREFIX iodp: <http://data.oceandrilling.org/core/1/>
SELECT  DISTINCT   (COUNT( ?uri) AS ?count) ?label ?id
FROM NAMED  <http://data.oceandrilling.org/logdbv2#>
FROM NAMED  <http://data.oceandrilling.org/codices#>
FROM NAMED  <http://data.oceandrilling.org/vocabularies#>
WHERE {
    GRAPH <http://data.oceandrilling.org/logdbv2#> {
        ?uri ?p ?o .
        ?uri iodp:parameter ?id .
    }
    GRAPH <http://data.oceandrilling.org/vocabularies#> {
         ?id skos:prefLabel ?label .
    }
}
                

Later though we will need to be able to dynamically build out SPARQL calls based on the paramters in the request URL. So a URL like:

            curl "http://localhost:8080/s2s/parameters?measurement=DEPTH,PRES"
        

Needs to be able to result in a call like (RESULTS)

PREFIX iodp: <http://data.oceandrilling.org/core/1/>
PREFIX iodpal: <http://data.oceandrilling.org/core/asciilogs/>
SELECT  DISTINCT   (COUNT( ?uri) AS ?count) ?label ?id
FROM NAMED  <http://data.oceandrilling.org/logdbv2#>
FROM NAMED  <http://data.oceandrilling.org/codices#>
FROM NAMED  <http://data.oceandrilling.org/vocabularies#>
WHERE {
    GRAPH <http://data.oceandrilling.org/logdbv2#> {
        ?uri ?p ?o .
        ?uri iodp:parameter ?id .
        ?uri foaf:primaryTopic ?fptop .
        {?uri iodp:measurement iodpal:DEPTH .}  UNION {?uri iodp:measurement iodpal:PRES .}
    }
    GRAPH <http://data.oceandrilling.org/codices#> {
         ?fptop iodp:expedition "306" .
    }
    GRAPH <http://data.oceandrilling.org/vocabularies#> {
         ?id skos:prefLabel ?label .
    }
}