xrds
xrds

Reputation: 61

why Jena fuseki has no response to owl reasoning?

I want to use Jena Fuseki to construct a SPARQL endpoint for some ontology file. and my fuseki config as follow:

@prefix fuseki:  <http://jena.apache.org/fuseki#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .

<#service1> rdf:type fuseki:Service ;
    fuseki:name                       "ds" ;       # http://host:port/ds
    fuseki:serviceQuery               "sparql" ;   # SPARQL query service
    fuseki:serviceQuery               "query" ;    # SPARQL query service (alt name)
    fuseki:serviceUpdate              "update" ;   # SPARQL update service
    fuseki:serviceUpload              "upload" ;   # Non-SPARQL upload service
    fuseki:serviceReadWriteGraphStore "data" ;     # SPARQL Graph store protocol (read and write)
    # A separate read-only graph store endpoint:
    fuseki:serviceReadGraphStore      "get" ;      # SPARQL Graph store protocol (read only)
    fuseki:dataset                   <#dataset> ;
    .

<#dataset> rdf:type ja:RDFDataset ;
    ja:defaultGraph <#inf_model> ;
    .

<#mv_data_model> a ja:MemoryModel;
    ja:content[ja:externalContent <file://D:/Program%20Files/d2rq-0.8.1/movie.nt>] ;
    ja:content[ja:externalContent <file://D:/Program%20Files/apache-jena-fuseki-3.13.1/run/ontology.ttl>]
    .

<#inf_model> a ja:InfModel ;
    ja:baseModel <#mv_data_model>;
    ja:reasoner [ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>] ;

    #ja:reasoner [
    #    ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner> ; 
    #    ja:rulesFrom <file://D:/Program%20Files/apache-jena-fuseki-3.13.1/run/rule.ttl>; ]
    .

I run fuseki as a Standalone Server.when I close the OWL reasoner it works well.But once the OWL reasoner is enabled,the server has no response for the query,even the query like

SELECT ?s ?p ?o
WHERE {
    ?s ?p ?o
}
limit 10

has no response, and then throw a Exception: java.lang.OutOfMemoryError. However,the RuleReasoner works well. And my ttl file has about 1500000 triples, is the data scale is too large for the OWL Reasoner to have a inference? All work is done on my pc,can any friend offer me a help? Thanks

Upvotes: 0

Views: 1163

Answers (1)

Lucas Resende
Lucas Resende

Reputation: 35

In fuseki, when running a Reasoner over a too big DataSet, the inferences will be applied to All Graph in query execution time. Besides that, all inferences will be materialized in Fuseki TDB case reasoner applies forward reasoning. It will burden the system, cause the graph will be to big to materialize and reason using RAM memory.

We have alredy crashed a machine dedicating 1 TD RAM to Fuseki.

A possible solution is to split your dataset into independent parts for tunning the queries. For more information, look at hadoop and AllegroGraph solution for high-perfomance with Clusters https://allegrograph.com/hadoop-and-allegrograph-the-semantic-data-lake-for-analytics/

It depends on your demand. In an unlimited scale, cluster solution seems to be the best, but maybe locally increasing the dedicated RAM memory to JVM solve your problem.

Upvotes: 0

Related Questions