Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share data to a SPARQL endpoint #64

Closed
ffsinger opened this issue Aug 31, 2021 · 5 comments
Closed

Share data to a SPARQL endpoint #64

ffsinger opened this issue Aug 31, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ffsinger
Copy link
Contributor

There should be a "share" button that uploads the RDF data of the user to a file on the SPARQL endpoint. This can be done with an INSERT query.

@ffsinger ffsinger added the enhancement New feature or request label Aug 31, 2021
@ffsinger ffsinger self-assigned this Aug 31, 2021
@ffsinger
Copy link
Contributor Author

ffsinger commented Sep 1, 2021

Current progress (f9da969):

  • The endpoint can be run on the command line like this: npx comunica-sparql-file-http --update -p 3001 file.ttl
  • There is a module (utils/endpoint.js) for sending queries and updates (SELECT, INSERT DATA, INSERT WHERE) to the endpoint
  • A share button is available on the interface, the user can use it to send the generated RDF data.

Faced issues:

  • Inserts do not work correctly

Experimentations:

  • SELECT/CONSTRUCT queries work correctly, either via the app, the command line, or curl
  • INSERT queries made via the app raise an error in the library fetch-sparql-endpoint. There may be a bug in the library itself. The error is raised before even sending the request to the endpoint.
  • INSERT queries made via the command command line (e.g. by running npx comunica-sparql https://fragments.dbpedia.org/2016-04/en --to http://localhost:3001/sparql "INSERT { ?s ?p ?o. } WHERE { SELECT * WHERE { ?s ?p ?o } LIMIT 10 }") hit the endpoint but raises Actor [...] could not detect a destination with 'application/sparql-update' as 'Accept-Patch' header
  • INSERT queries made via curl (curl -X POST -d 'update=INSERT%20DATA%20%7B%20%3Chttp%3A%2F%2Fschema.org%2FOrganization%2F%2540Apple%3E%20%3Chttp%3A%2F%2Fschema.org%2Fname%3E%20%22Apple%22%20.%20%7D' http://localhost:3001/sparql) hit the endpoint with a "400 Bad request" and raises Actor [...] received an invalid rdfjsStore.

@ffsinger
Copy link
Contributor Author

ffsinger commented Sep 1, 2021

As mentioned in comunica/comunica#796 :

At the moment, only in-memory updates are supported (to RDF/JS stores).
Other types (LDP, SPARQL GSP, local file, ...) can easily be added in the future by hooking on to the rdf-update-quads bus.

In other words, what we want to do (updating local files) is not supported yet. We will probably have to find a different implementation for the endpoint.

@ffsinger
Copy link
Contributor Author

ffsinger commented Sep 3, 2021

Due to a bug in a dependency of a dependency of Comunica, sending update requests to the endpoint does not work when we are in browser mode. The problem is not the endpoint, it's the Comunica client.

The issue is known (mysticatea/abort-controller#32) but it seems that the maintainers are dead.

@pdehaye
Copy link
Contributor

pdehaye commented Sep 3, 2021

My understanding of the above is that there are thus two problems with Comunica (or a dependency) relating to INSERTs. Both to receive and to send INSERTs. The problems thus have nothing to do it seems with the deployment mode (in browser, server, etc).

@ffsinger
Copy link
Contributor Author

Progress is on branch https://github.com/hestiaAI/hestialabs-experiences/tree/revised-sharing, closing for inactivity

fquellec added a commit that referenced this issue Nov 26, 2021
fquellec added a commit that referenced this issue Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants