> Well that wasn't the question you asked!
Sorry, if I wasn't clear enough.
> The workaround for that is to define two different services, one for query
> which uses the inference dataset and one for update that uses the TDB dataset
> directly and direct queries and updates to the two different services.
I tried the configuration presented below and it works for me as a
workaround. Is it similar to what you propose?
[] a fuseki:Server ;
fuseki:services ( <#service1> <#service2> ) ;
.
<#service1> a fuseki:Service ;
fuseki:name "default" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceQuery "query" ;
fuseki:dataset <#defaultDataset> ;
.
<#defaultDataset> a ja:RDFDataset ;
ja:defaultGraph <#infModel> ;
.
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "/etc/fuseki/databases/fuseki-db/default" ;
.
<#tdbGraph> a tdb:GraphTDB ;
tdb:dataset <#tdbDataset> ;
.
<#infModel> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [
ja:reasonerURL <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner> ;
] ;
.
<#service2> a fuseki:Service ;
fuseki:name "private" ;
fuseki:serviceQuery "sparql" ;
fuseki:serviceQuery "query" ;
fuseki:serviceUpdate "update" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:dataset <#privateDataset> ;
.
<#privateDataset> rdf:type tdb:DatasetTDB ;
tdb:location "/etc/fuseki/databases/fuseki-db/private" ;
.
> AFAIK there is no way to have a single dataset definition with your desired
> behaviour currently though I could be wrong.
Does it make sense to create a feature request? Maybe there exists
such issue already?
Thank you!
Maxim
On Thu, Mar 10, 2016 at 5:47 PM, Rob Vesse <[email protected]> wrote:
> Well that wasn't the question you asked!
>
> This is because updates go into the general dataset which is in-memory and
> non-persistent and not the persistent TDB dataset which backs the
> configured default graph
>
> The workaround for that is to define two different services, one for query
> which uses the inference dataset and one for update that uses the TDB
> dataset directly and direct queries and updates to the two different
> services
>
> AFAIK there is no way to have a single dataset definition with your
> desired behaviour currently though I could be wrong
>
> Rob
>
> On 10/03/2016 10:55, "Maxim Kolchin" <[email protected]> wrote:
>
>>Hi Rob,
>>
>>Yes, it works that way (from [0]), but the problem is that newly
>>created named graphs (created with INSERT query) are not stored on the
>>disk, i.e. after restart the named graphs disappear.
>>
>>[0]:
>>https://github.com/apache/jena/blob/master/jena-fuseki1/config-inf-tdb.ttl
>>
>>Maxim
>>
>>On Thu, Mar 10, 2016 at 12:28 PM, Rob Vesse <[email protected]> wrote:
>>> You seem to have a circular reference in your setup so I am surprised it
>>> does anything at all
>>>
>>> <#dataset> references <#infModel> which references <#tdbGraph> which
>>> references <#dataset>
>>>
>>> So what I think is happening is that one of declarations is getting
>>>ignored
>>>
>>> If you look in the distribution you should see an example called
>>> config-inf-tdb.ttl where you can see how to configure this. The key is
>>> that you need to declare a general dataset with a default graph of the
>>> inference model which is then backed by a separate TDB dataset
>>>declaration
>>>
>>> Rob
>>>
>>> On 09/03/2016 17:21, "Maxim Kolchin" <[email protected]> wrote:
>>>
>>>>Hi,
>>>>
>>>>(This is a response to the thread which ended in 2014 with [0] mail)
>>>>
>>>>I have the same problem which was discussed in this thread and also
>>>>there is the same question on StackOverflow [1], so it means that at
>>>>least three persons in the world has or had this problem.
>>>>
>>>>I managed to configure Fuseki to store every named graph in TDB. Here
>>>>is a minimal configuration (Fuseki 2.3.1 is used):
>>>>
>>>>[] a fuseki:Server ;
>>>> fuseki:services ( <#service1> ) .
>>>>
>>>><#service1> a fuseki:Service ;
>>>> fuseki:name "ds" ;
>>>> fuseki:serviceQuery "sparql" ;
>>>> fuseki:serviceQuery "query" ;
>>>> fuseki:dataset <#dataset> .
>>>>
>>>><#dataset> rdf:type tdb:DatasetTDB ;
>>>> tdb:location "./fuseki-db" .
>>>>
>>>>The other part of the question (which I did not find a answer to) is
>>>>how to enable reasoning on the default and all named graphs? Or at
>>>>least on the default graph?
>>>>
>>>>I already tried different combinations, but without any success, one
>>>>of them is the following:
>>>>[] a fuseki:Server ;
>>>> fuseki:services ( <#service1> ) .
>>>>
>>>><#service1> a fuseki:Service ;
>>>> fuseki:name "ds" ;
>>>> fuseki:serviceQuery "sparql" ;
>>>> fuseki:serviceQuery "query" ;
>>>> fuseki:dataset <#dataset> .
>>>>
>>>><#dataset> rdf:type tdb:DatasetTDB ;
>>>> tdb:location "./fuseki-db" ;
>>>> ja:defaultGraph <#infModel> .
>>>>
>>>><#tdbGraph> a tdb:GraphTDB ;
>>>> tdb:dataset <#dataset> .
>>>>
>>>><#infModel> a ja:InfModel ;
>>>> ja:baseModel <#tdbGraph> ;
>>>> ja:reasoner [
>>>> ja:reasonerURL
>>>><http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>
>>>>;
>>>> ] .
>>>>
>>>>[0]:
>>>>http://mail-archives.apache.org/mod_mbox/jena-users/201405.mbox/%3C53711
>>>>D5
>>>>[email protected]%3E
>>>>[1]:
>>>>http://stackoverflow.com/questions/35428064/reasoning-with-fuseki-tdb-an
>>>>d-
>>>>named-graphs
>>>>
>>>>Thank you in advance!
>>>>Maxim Kolchin
>>>>PhD Student @ ITMO University (National Research University)
>>>>E-mail: [email protected]
>>>>Tel.: +7 (911) 199-55-73
>>>>Homepage: http://kolchinmax.ru
>>>
>>>
>>>
>>>
>
>
>
>