Re: Transactions when using SPARQL update

2018-02-18 Thread Andy Seaborne



On 18/02/18 19:16, Andrew U Frank wrote:

I have read the discussion on transactions, especially the hint
"Transactions are whatever the dataset provides - for TDB that's 
multiple read-and-singlewriter (MR+SW) all at the same time. " (by andy 
ssaborne).


i use TDB but store data using the SPARQL update functions (INSERT DATA 
especially). is it correct that each such SPARQL http call is a 
transaction on the TDB database?


Yes

Every Fuseki request is a transaction - the request is to a TDB dataset, 
the TDB transaction mechanism is used.


Andy



thank you for a very powerful tool!
andrew


Re: Transactions when using SPARQL update

2018-02-18 Thread Andrew U Frank

I have read the discussion on transactions, especially the hint
"Transactions are whatever the dataset provides - for TDB that's 
multiple read-and-singlewriter (MR+SW) all at the same time. " (by andy 
ssaborne).


i use TDB but store data using the SPARQL update functions (INSERT DATA 
especially). is it correct that each such SPARQL http call is a 
transaction on the TDB database?


thank you for a very powerful tool!
andrew


Re: Configuring fuseki with TDB2 and OWL reasoning

2018-02-18 Thread Andy Seaborne

Barry NL's comment on StackOveflow looks relevant:

> :dataset a ja:RDFDataset ;
>  ja:defaultGraph   <#model_inf> ;
> tdb:location  "c:\\fuseki/run/databases/gsip".
>
>
> <#model_inf> a ja:InfModel ;
>   ja:baseModel <#graph> ;
>   ja:reasoner [
>   ja:reasonerURL 
>   ] .
>
> <#graph> rdf:type tdb:GraphTDB ;
>tdb:dataset :dataset .
>

Whaty we want is:

service
  -> Dataset with inference graph as default graph
  -> inference graph uses TDB2 default graph
  -> TDB2 dataset whose dft graph is the storage

-
## Dataset to hold the inference graph
:dataset a ja:RDFDataset ;
ja:defaultGraph   <#model_inf> .

<#model_inf> a ja:InfModel ;
  # Inference graph uses #graph as base
  ja:baseModel <#graph> ;
  ja:reasoner [
  ja:reasonerURL 
  ] .

## Base is a TDB2 graph.
<#graph> rdf:type tdb2:GraphTDB ;
   tdb2:dataset :datasetTDB2 .

## Storage
:datasetTDB2 rdf:type tdb2:DatasetTDB2 ;
tdb2:location ""c:/fuseki/run/databases/gsip".
-

I have a suspicion that the :dataset loopback results in 
non-deterministic behaviour as one item has two roles and that it worked 
for TDB1 is down to luck.


Andy

On 16/02/18 13:51, Eric Boisvert wrote:

So, here's my complete test

small naive dataset

@prefix rdf:  .
@prefix rdfs:  .
@prefix owl:  .
@prefix hy: .

hy:rechargeZone a owl:ObjectProperty;
owl:inverseOf hy:sourceOf.
hy:sourceOf a owl:ObjectProperty.


hy:rechargeZone .

so,

DESCRIBE .

should return

 hy:sourceOf <
http://domain.org/id/waterwells/0001>.

This configuration runs, but no inference (I'm testing with standalone)
@prefix :   .
@prefix rdf:    .
@prefix ja: .
@prefix rdfs:   .
@prefix fuseki:  .
@prefix tdb:    .
@prefix tdb2:    .



:service_tdb_all  a   fuseki:Service ;
 fuseki:dataset:dataset ;
 fuseki:name   "gsip" ;
 fuseki:serviceQuery   "query" , "sparql" ;
 fuseki:serviceReadGraphStore  "get" ;
 fuseki:serviceReadWriteGraphStore "data" ;
 fuseki:serviceUpdate  "update" ;
 fuseki:serviceUpload  "upload" .

:dataset a tdb2:DatasetTDB2 ;
 ja:defaultGraph   <#model_inf> ;
tdb2:location  "c:\\fuseki/run/databases/gsip".


<#model_inf> a ja:InfModel ;
  ja:baseModel <#graph> ;
  ja:reasoner [
  ja:reasonerURL 
  ] .

<#graph> rdf:type tdb2:GraphTDB2 ;
   tdb2:dataset :dataset .

LOG: (no log file, this is the stdout of fuseki standalone. -- I assume
it's the same ?)

[2018-02-16 08:26:57] Server INFO  Apache Jena Fuseki 3.6.0
[2018-02-16 08:26:57] Config INFO  FUSEKI_HOME=C:\fuseki\.
[2018-02-16 08:26:57] Config INFO  FUSEKI_BASE=C:\fuseki\run
[2018-02-16 08:26:57] Config INFO  Shiro file:
file://C:\fuseki\run\shiro.ini
[2018-02-16 08:26:57] Config INFO  Configuration file:
C:\fuseki\run\config.ttl
[2018-02-16 08:26:57] Config INFO  Load configuration:
file:///C:/fuseki/run/configuration/gsip.ttl
[2018-02-16 08:26:59] Config INFO  Register: /gsip
[2018-02-16 08:26:59] Server INFO  Started 2018/02/16 08:26:59 EST on
port 3030
[2018-02-16 08:27:12] Fuseki INFO  [1] POST
http://localhost:3030/gsip/data
[2018-02-16 08:27:12] Fuseki INFO  [1] POST /gsip :: 'data' ::
[multipart/form-data] ?
[2018-02-16 08:27:12] Fuseki INFO  [1] Filename: test.ttl,
Content-Type=application/octet-stream, Charset=null => Turtle : Count=4
Triples=4 Quads=0
[2018-02-16 08:27:12] Fuseki INFO  [1] 200 OK (465 ms)

changed the configuration to

:dataset a tdb2:DatasetTDB2 ;
 tdb2:defaultGraph   <#model_inf> ;  # Changed defaultGraph prefix,
it's cargo cult at this point
tdb2:location  "c:\\fuseki/run/databases/gsip".
- stopped server
- deleted gsip database and wiped out system content
- restart
- reload the dataset

still no inference (identical log)

DESCRIBE .

returns nothing beside prefix declaration (no error)



  Thanks for your help


2018-02-15 16:47 GMT-05:00 Andy Seaborne :



 From SO comments:
[[
Does the Fuseki log file contain any useful information? – AndyS yesterday

Does non-inferred data show up? I notice you are using the same file area
for TDB1 and