CentreForDigitalHumanities / CentreForDigitalHumanities/readit-interface
Forward BlazeGraph query result as-is
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Currently, when we send a SPARQL query, it is first serialized by the Fuseki server, then parsed by our backend, re-serialized by our backend and finally sent to the frontend, where it is parsed again. That parsing and re-serializing in the middle appears to take a substantial amount of time (see https://github.com/UUDigitalHumanitieslab/readit-interface/pull/302#issuecomment-649602206) and isn't necessary.
Fuseki supports all variants of the SPARQL query result format as well as Turtle, JSON-LD, RDF/XML and N-triples. So as long as we don't plan to support other formats in content negotiation, it should be possible to just take the response body from Fuseki and forward it verbatim to the client.
I'm proposing to do this only for the SPARQL endpoints to be introduced with #89, and only after that is fully implemented and well established. For simple CRUD operations, the performance gain is relatively minor. Forwarding the Fuseki response verbatim also has some disadvantages as it requires bypassing rdflib's `Graph` abstraction.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.