0

I am using apache jena fuseki server to load the data in a .ttl format and then querying the data.But the problem is i am not able to serve multiple data simultaneously.

I am starting the server using the following command.

 ./fuseki-server --update --mem /ds

The server version i am using is 1.1.1

/home/user/jena-fuseki-1.1.1/./s-put http://192.168.1.38:3030/ds/data **default** /home/user/data.ttl

I was thinking like if we change the default option in s-put command,is there any other options to serve concurrent data as separate instances. ./s-put http://192.168.1.38:3030/ds/data default /home/user/data.ttl

I am having a rest api from which multiple users can load the data and do SPARQL queries on top of it.But when each time a new user loads the data the server gets the new data and the previous data is gone.

I want each user to have his own data to be maintained by the server.Is there some mistake in the way i am loading data ?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
lost Coder
  • 577
  • 2
  • 8
  • 34

1 Answers1

1

To add data, not replace it, use POST and command s-post. HTTP PUT means "replace", HTTP POST is "append" (which forRDF just means "add").

PS Try Fuseki 2.3.0

AndyS
  • 16,345
  • 17
  • 21
  • the problem is if i use post i will be adding to the existing data. i need each user to maintain seperate rdf/data. Is there any way to make it possible? so that each user can query the server based on users uploaded data. – lost Coder Nov 12 '15 at 04:10
  • 2
    Put the data in separate places - either separate graphs per user or separate datasets per user. – AndyS Nov 12 '15 at 16:54
  • i am maintaining seperate .ttl files for each user. But when i am uploading the data, existing data is overwritten or gets appended as per your answer.But how to put in seperate places – lost Coder Nov 13 '15 at 04:25
  • I tried with a differenet graph name "test" like this. /home/user/jena-fuseki-1.1.1/./s-put http://192.168.1.38:3030/ds/data test /home/user/data.ttl Error 400: Bad IRI: no IRI scheme name: test – lost Coder Nov 13 '15 at 05:01
  • POST http://192.168.1.38:3030/ds/upload 400 No name for content - can't determine RDF syntax (35 ms) – lost Coder Nov 13 '15 at 05:07
  • I am able to load data in seperate graphs /home/user/jena-fuseki-1.1.1/./s-put http://192.168.1.38:3030/ds/data http://example/test /home/user/data.ttl But when i try to query the db using s-query command,it is still taking the default graph. How can i change this. /home/user/jena-fuseki-1.1.1/./s-query --service http://localhost:3030/ds/query 'sparql query to the data' – lost Coder Nov 13 '15 at 06:39
  • 1
    Either use GRAPH <...> to access a named graph Or you can make all the named graphs in dataset be a single union graph as the default graph. See documentation on TDB. – AndyS Nov 13 '15 at 10:43
  • . /home/user/jena-fuseki-1.1.1/./s-query --service localhost:3030/ds/query GRAPH 'sparql query to the data' . is it the right way ? – lost Coder Nov 13 '15 at 10:59
  • can you post this answer including your last 2 comments so i can accept it. – lost Coder Nov 13 '15 at 11:14