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

Expose drafter (endpoint) version as a HTTP response header on drafter queries #534

Open
RickMoynihan opened this issue May 26, 2021 · 0 comments

Comments

@RickMoynihan
Copy link
Member

RickMoynihan commented May 26, 2021

As part of the cache race work PR #522 we added a new drafter:version triple to endpoints and draftsets. This is currently exposed on the swagger rest API.

It would be useful to also surface this as extra metadata in the HTTP response header on SPARQL queries. My initial thoughts are that this should probably be an ETag.

I think for consistency API routes may also want to copy the version into an ETag, to more generically at the protocol layer support proxies etc.

The reasoning for this is that currently you'd need to make a request to the API for the version, then query it, by which point the version may have changed.

Use cases are:

  1. Reliably knowing the endpoint version that a SPARQL query result was generated from for caching / invalidation etc.
  2. Being able to cache API requests, e.g. data dumps where we return a whole endpoints contents as RDF.
  3. Consistency - Muttnik and many applications need to make multiple queries. In many scenarios it is useful to know nothing in the endpoint has changed between these queries; i.e. all queries were made against the same database value and the generated result is consistent.

Additionally:

  • SPARQL update requests to drafter should return the new drafter:version as an ETag after they have run
  • Drafter client should provide a means to obtain the version of any SPARQL result / request (we should break this out into a new issue).
@RickMoynihan RickMoynihan changed the title Expose drafter (endpoint) version as a HTTP response parameter on drafter queries Expose drafter (endpoint) version as a HTTP response header on drafter queries May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant