Re: Public SPARQL endpoints:managing (mis)-use and communicating limits to users.

> Hi Rob,
>
> There is a fundamental problem with HTTP status codes.
> Lets say a user submits a complex but small sparql request.
>
> My server sees the syntax is good and starts to reply in good faith.
> This means the server starts the http response and sends an 200 OK
> Some results are being send....
> However, during the evaluation the server gets an exception.
> What to do? I can't change the status code anymore...

Is this really so? Failures in large transfers are common and there  
are a few ways to detect it from the client's end (wrong format, wrong  
Content-Length and dropped connection).

There are SPARQL server implementation specifics here, but it's  
possible to have a good statistical estimate of whether the query  
runtime or expected transfer amount will exceed the limits before  
firing the query. Since the query planner has to do this processing  
before returning triples, you can decide to fire the query or just  
refuse the request with an error header based on your limits.

If your estimation is wrong and you have to kill the query at runtime,  
you can re-tune the query planner / optimizer statistics to be more  
conservative at the next request.

rhw

Received on Friday, 19 April 2013 13:25:44 UTC