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

Support for SPARQL queries stored in nanopubs #438

Open
albertmeronyo opened this issue Oct 5, 2023 · 1 comment
Open

Support for SPARQL queries stored in nanopubs #438

albertmeronyo opened this issue Oct 5, 2023 · 1 comment

Comments

@albertmeronyo
Copy link
Member

albertmeronyo commented Oct 5, 2023

It would be good to have support to create APIs from SPARQL queries stored in nanopublications.

Perhaps the easiest way of doing this is by using the specUrl option, using the nanopub URI as query locators. If dereferencing the URI returns a plain grlc decorated SPARQL query, that should be enough to build the spec.

Other options could be to have people write their own template of how to use the nanopubs to compose the API, so to let them build their APIs by just publishing nanopublications. For this we’d need new grlc code but I think it’d be rather minimal—possibly in the fileLoader.

But ideally grlc could check several places in the nanopub network, where the nanopub is available at various locations, so the downtime of a single server would affect the retrieval of the content. The above nanopub is available at these places for example:

So ideally grlc could check several servers. This could be via a hard-coded list of servers, or later by querying the network itself for
an up-to-date list. Or as an URL argument, so the grlc request would include
"?nanopub-servers=https://np.petapico.org/+https://np.knowledgepixels.com/+https://server.np.trustyuri.net/".

@tkuhn
Copy link

tkuhn commented Dec 6, 2023

Thanks for summarizing our discussion here, and sorry for taking so long to react.

I think doing it via specUrl first is indeed the best first step. I will build this into the next generation of nanopub services that I am currently working on. So they can produce the spec as grlc expects it, and no change on the grlc side is needed for the time being.

Later we could investigate how grlc could work with nanopubs directly and exploit the decentralization/redundancy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants