[ 
https://issues.apache.org/jira/browse/JENA-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13238408#comment-13238408
 ] 

Andy Seaborne commented on JENA-218:
------------------------------------

I've applied the patch but have some comments.

1/ Specifying timeouts: there two timeouts, time to first answer and time to 
last answer.  Setting the overall timeout high but short time to first answer 
makes sense as a timeout after first answer before the last is likely to result 
in bad syntax in the results.

For compatibility with HTTP, the HTTP timeout is going to have to be one 
number.  This should be time to first answer (and last) because it should 
correspond to HTTP 408.  We now have the typical problem of HTTP response codes 
- they go out before the results start.

But for ?timeout= and for the config file, I suggest allowing the ""X,Y" form 
as well as plain number.  i.e. allowTimeoutOverride is a string (as well as a 
number).

c.f. QueryExecutionBase.setAnyTimeouts.

2/ Should the presence of fuseki:maximumTimeoutOverride 10 imply 
fuseki:allowTimeoutOverride=true?

3/ Units.  Elsewhere, including setting the setting timeouts by context, is by 
milliseconds.  Granted, it might be better to use seconds uniformly but given 
where we are, maybe milliseconds everywhere is better than a mixture.

     ja:context [ ja:cxtName "arq:queryTimeout" ;  ja:cxtValue "10000" ] ;

I'm open to changing arq:queryTimeout to be seconds.

                
> Fuseki should allow timeouts to be specified on a per-request basis
> -------------------------------------------------------------------
>
>                 Key: JENA-218
>                 URL: https://issues.apache.org/jira/browse/JENA-218
>             Project: Apache Jena
>          Issue Type: Improvement
>          Components: Fuseki
>    Affects Versions: Fuseki 0.2.1
>            Reporter: Alexander Dutton
>            Assignee: Andy Seaborne
>              Labels: needsdocumentation, timeout
>         Attachments: config-tdb.ttl, jena-218-1.diff
>
>
> A query endpoint might want to have different timeouts depending on whether 
> queries are from untrusted or trusted users, or maintenance processes. The 
> timeout could be passed with an X- header, a Timeout header as per 
> http://tools.ietf.org/html/draft-loreto-http-timeout-00, or a query 
> parameter, respecting the system default if none is provided. The query 
> parameter might be less favourable as it'd be harder to filter out for Fuseki 
> instances behind Apache.
> There is a risk that changing the behaviour to allow timeouts to be 
> overridden will lead to DoSs of query endpoints open to the world to some 
> extent. This can be mitigated by defaulting to disallowing timeout overrides.
> I'm happy to put a patch together and document it at 
> http://incubator.apache.org/jena/documentation/serving_data/.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to