jeff-zucker / sparql-fiddle

a JavaScript SPARQL API and online fiddle
MIT License
18 stars 7 forks source link

SPARQL query #4

Open RezMosa opened 1 year ago

RezMosa commented 1 year ago

Hello, My SPARQL query on CSS return whole file content. If I use your created sparql-fiddle, It returns only relevant triples. In this way, the whole RDF file is loaded from Solid server (Pod) into client side (App) and then SPARQL query will be run. Am I right? I am looking for to run SPARQL query in server side without loading whole RDF file to client side. Because my RDF file size is too big and query takes longer time. I like to have e better response time. Thanks

jeff-zucker commented 1 year ago

Yes, you are correct, this library works client side. There is no Solid specification about server-side SPARQL so you can not count on it being available. I think there is a way to get CSS to do server-side SPARQL but you should probably ask in the CSS gitter chatroom.

This library is quite old and I will be deprecating it soon. Instead, please use the sol-sparql web component which does what this library does but more. It allows the user to choose between the rdflib SPARQL engine and the comunica SPARQL engine. The comunica engine is possibly faster than rdflib and will do server-side querying if it is available or client-side querying if not. This means that an app can get server-side querying for either pods or non-pods when it is available but will fall back on client-side querying if no server endpoint exists.

RezMosa commented 1 year ago

Thank you for your reply. I am running a CSS in my machine with some Pods. If I want to add SPARQL endpoint to it I need to restart it with SPARQL configuration. The SPARQL endpoint will be set for SOLID server, for each Pod, or each data resource?

jeff-zucker commented 1 year ago

That's a good question and I'm afraid I haven't set up a SPARQL endpoint on CSS yet so I don't know the answer. Try asking in the chatroom at https://app.gitter.im/#/room/#CommunitySolidServer_community:gitter.im.

RezMosa commented 1 year ago

Thank you

RezMosa commented 1 year ago

Sorry Jeff a question: the CSS configuration generator (https://communitysolidserver.github.io/configuration-generator/v6/) makes possible to select SPARQL endpoint using file system as data storage and web access control as authorization. It adds css:config/ldp/authorization/webacl.json. This configuration of SPARQL is not supporting the authorization in CSS?