Docmaps-Project / docmaps

Extensible protocol for document history metadata exchange, to enable trustworthy, rapid, open science, by and for preprint science communities.
MIT License
15 stars 1 forks source link

http-server: server should fail fast if backend config is unreachable #147

Open ships opened 1 year ago

ships commented 1 year ago

Feature Request

Packages to improve:

Description

Currently, a well-formed but incorrect URL supplied as --backend.sparqlEndpoint.url will successfully start but fail on every query. This is incorrect. There should be a health check that pings the sparql endpoint up front.

Use case

Makes operations easier and clearer.

Proposed solution

Just run a trivial query.

Additional information

Intriguing question is like, do we maintain liveness checks consistently? Seeing as SPARQL is not connection-based, what is the desired behavior of this container if the backend dies in the middle? Should it fail itself or continue to respond with 404s?