tetherless-world / whyis

Whyis is a nano-scale knowledge graph publishing, management, and analysis framework.
Apache License 2.0
52 stars 30 forks source link

Enabling timeout/force-stop on SPARQL endpoints #227

Open mdeagen opened 4 years ago

mdeagen commented 4 years ago

Terminating execution of intractable queries would improve performance of the SPARQL endpoint.

Problem: Intractable queries (e.g., too broad, containing logical error, ...) may take several minutes or longer to return results. Without the ability to force-stop, a malformed query can slow down the entire system. In the worst cases, Blazegraph may require a restart.

UI/UX Fix: When the user runs a query, a loading icon is displayed. If the query is modified before results are returned, the loading icon disappears. However, the query still runs in the background (and results are sometimes returned several minutes or hours later without indication that the query is still running). If a still-running query is slowing things down, user should have option to stop the query or be made aware that the query is still running.

Backend Fix: Enable a timeout or force-stopping of queries, especially before a query is re-run after being modified.

mdeagen commented 4 years ago

Does/should Whyis use the Blazegraph Python Client? This commit may be relevant https://github.com/blazegraph/blazegraph-python/commit/33cf933353b6555617e6a598cc331724bc61953a