Allow the http client to specify a timeout on query. We support this internally, but the client is not able to specify this on a per-query basis through the REST API. The openrdf API has a mechanism for this as well. We do already support placing a timeout on the entire webapp through web.xml, but that does not support use cases where only queries from some end points should have a timeout applied.
I think that the timeout should be communicated through either an http header or perhaps the Request-URI, but it should be something that can be imposed by an HTTP proxy. This will make it possible to define a proxy that automatically imposes a timeout for HTTP connections arriving on some ports or URLs while not imposing that timeout on other connections. This could support a variety of use cases, including long running administrative queries, forcing a timeout on some servers in an HA replication cluster in order to bound their load, etc.
Integrate support for this into the BigdataSailRemoteRepository through TupleQuery, GraphQuery, and BooleanQuery.setMaxQueryTime(). Be careful about the units (milliseconds vs ...).
This needs to be handled in the QueryServlet, which needs to look at the HTTP header and then set the timeout on the TupleQuery, GraphQuery, or BooleanQuery. The internal APIs will then set it on the underlying IRunningQuery.