Open pchampin opened 9 months ago
2 ideas come to my mind:
Actually, the demo of Sparnatural working purely on local files using browser-side SPARQL engine (https://github.com/Callidon/sparql-engine) is here : https://github.com/sparna-git/sparnatural.eu/blob/main/demos/demo-local/index.html#L495
I suspect, although I am not sure, that Comunica works the same way : resolve an RDF response from a SOLID server, dealing with authentication, etc, and then querying it locally.
Not exactly. This would actually depend on the underlying sources. As far as I understand, Comunica is able to forward (part of) the query to the a SPARQL endpoint, split it into triple patterns if the source is a TPF endpoint. It also has a query-traversal feature, that allows it to retrieve data from new sources as partial results are discovered...
Alternatively, we could generate something else than SPARQL
This would not be required for Comunica, which accepts SPARQL queries as its input, and does all the magic (decomposing it, retrieving data from different sources...) behind the scene. See https://comunica.dev/docs/query/getting_started/query_app/
Comunica has browser-ready packages at https://github.com/rdfjs/comunica-browser This could be integrated via the customization object : http://docs.sparnatural.eu/Javascript-integration.html#sparnatural-customization-object-reference
I would be super interested in building a Solid application using Sparnatural. The only problem is that Sparnatural currently relies on the existence of a SPARQL endpoint (i.e. a server speaking the SPARQL protocol), while in Solid, servers expose simple RDF "files".
Would it make sense for a future version of Sparnatural to use a modular backend, which could use SPARQL endpoints, "static" RDF resources, and possibly other sources of data? Comunica would look like an interesting candidate, as it already supports different kinds of sources.
In particular, Comunica has a module for querying data on Solid pod, taking into account authentication and the fact that data can be distributed across multiple resources: https://github.com/comunica/comunica-feature-solid