VisualDataWeb / LD-VOWL

Visualizing Linked Data endpoints
http://vowl.visualdataweb.org
MIT License
36 stars 12 forks source link

Is there a cache on the demo server? #16

Open frmichel opened 3 years ago

frmichel commented 3 years ago

Hey guys,

I just discovered LD-VOWL, this is awesome! The killer app that WebVOWL was missing.

I've been playing with the demo server at http://vowl.visualdataweb.org/ldvowl/ with 2 endpoints. That works great for one of them. The second is really huge (1.3 M triples) and it seems that queries fail or time out. So I changed the data to have just a small subset, but nothing changes: the result is still "no classes found". I emptied my browser's cache to make sure. My endpoint is: http://covidontheweb.inria.fr/allInOne/sparql

It seems like there is a cache somewhere on the server, such that although the data has changed in my endpoint, the result remains the same.

Is that the case? Is there a way you could clear that cache? Or is there really something in this endpoint that makes it not work with LD-VOWL?

Any advise welcome. Thx, Franck.

marc92w commented 3 years ago

Hi Franck,

thanks for your message. No it's not a caching problem, I manually checked the initial query on the your endpoint and it seems that the server does not like the default timeout of 30 seconds (timeout=30000) and just returns an empty result:

http://covidontheweb.inria.fr/allInOne/sparql/?query=SELECT+DISTINCT+%3Fclass+%28count%28%3Fsub%29+AS+%3FinstanceCount%29+%0D%0AWHERE+%7B+%3Fsub+a+%3Fclass.+%7D+%0D%0AGROUP+BY+%3Fclass+ORDER+BY+DESC%28%3FinstanceCount%29+%0D%0ALIMIT+10+OFFSET+0&format=application%2Fsparql-results%2Bjson&timeout=30000&debug=on

{ "head": { "link": [], "vars": ["class", "instanceCount"] }, "results": { "distinct": false, "ordered": true, "bindings": [ ] } }

But if you change the timeout to 0 it returns results as expected:

http://covidontheweb.inria.fr/allInOne/sparql/?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E+%0D%0APREFIX+skos%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E+%0D%0ASELECT+DISTINCT+%3Fclass+%28count%28%3Fsub%29+AS+%3FinstanceCount%29+%0D%0AWHERE+%7B+%3Fsub+a+%3Fclass.+%7D+%0D%0AGROUP+BY+%3Fclass+ORDER+BY+DESC%28%3FinstanceCount%29+%0D%0ALIMIT+10+OFFSET+0&format=application%2Fsparql-results%2Bjson&timeout=0&debug=on&run=+Run+Query+

{ "head": { "link": [], "vars": ["class", "instanceCount"] },
  "results": { "distinct": false, "ordered": true, "bindings": [
    { "class": { "type": "uri", "value": "http://www.w3.org/ns/oa#TextQuoteSelector" }  , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "2375909" }},
    { "class": { "type": "uri", "value": "http://www.w3.org/ns/oa#Annotation" } , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "2375909" }},
    { "class": { "type": "uri", "value": "http://www.w3.org/ns/prov#Entity" }   , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "1860320" }},
    { "class": { "type": "uri", "value": "http://www.w3.org/ns/oa#TextPositionSelector" }   , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "1860319" }},
    { "class": { "type": "uri", "value": "http://www.arg.dundee.ac.uk/aif#I-node" } , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "119053" }},
    { "class": { "type": "uri", "value": "http://purl.org/ontology/bibo/AcademicArticle" }  , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "111257" }},
    { "class": { "type": "uri", "value": "http://schema.org/ScholarlyArticle" } , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "111257" }},
    { "class": { "type": "uri", "value": "http://ns.inria.fr/covid19/DocumentBody" }    , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "111256" }},
    { "class": { "type": "uri", "value": "http://purl.org/spar/fabio/Abstract" }    , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "111256" }},
    { "class": { "type": "uri", "value": "http://purl.org/spar/fabio/ResearchPaper" }   , "instanceCount": { "type": "typed-literal", "datatype": "http://www.w3.org/2001/XMLSchema#integer", "value": "111256" }} ] } }

So I think this is a configuration issue on your endpoint, e.g. the endpoint http://covidontheweb.inria.fr/sparql works fine with timeout=30000.

If you have further questions feel free to ask.

frmichel commented 3 years ago

Hi Mark, thx for your quick reply, much appreciated.

I understand what you say, although I'm not sure how I can change that from my side: our Virtuoso is configured with quite large timeouts: MaxQueryCostEstimationTime = 4000 ; in seconds MaxQueryExecutionTime = 3600 ; in seconds

The query that you show is the one sent by LD-VOWL, right? How can I ask LD-VOWL to set a timeout=0 instead of 30000? Is it a config parameter somewhere? Or maybe you mean that I should deploy my own instance of LD-VOWL to set this parameter?

Thx, Franck.

marc92w commented 3 years ago

Hi Franck,

the Virtuoso settings you mention don't explain the endpoint behavior, because it seems to return empty results for any timeout which is not zero, including small values which should be fine according to these settings. So I still think you have a configuration issue there.

Unfortunately you can't change the timeout for the demo server, but you could run LD-VOWL locally and do one of the following:

I just tried both ways and it works fine on your endpoint, see screenshot below:

covidontheweb-ldvowl

frmichel commented 3 years ago

Thx a lot for the explanation Mark.

Indeed I tried with a timeout up to 4 minutes and the server still returns an empty response, whereas the query completes in 4 to 5 seconds if the timeout is set to 0. So there must be something wrong on that side.

Thanks also for the hint about the configuration of LD-VOWL, I'll try to deploy one.

By the way, that would be great if you guys could add some documentation, typically about the sparqlTimeout parameter, but maybe also on parameters (?).

Thx for your support, Franck.