[TAP] sync vs async - time outs

Guy Rixon gtr at ast.cam.ac.uk
Thu Mar 5 01:29:26 PST 2009


Tom,

we need not mandate any length of query. However, I think a service  
should state its run-time limit in its capability, and that limit  
should be achievable for all clients. I strongly suspect that most  
services will have limits greater than an HTTP timeout; say around an  
hour. These will need asynchronous calls.

Cheers,
Guy

On 4 Mar 2009, at 15:48, Tom McGlynn wrote:

> Hi Gerard,
>
> I agree with what you had said more elegantly in your earlier  
> message. My point was to emphasize my sense that that people were  
> saying asynchronous calls somehow obviated the need for careful  
> timeout handling.  E.g., Guy suggested that we have to allow  
> asynchronous calls if we can't handle queries synchronously.  But  
> this is really just a statement about the length of queries we are  
> going to support.  Do we mandate that we have to support queries  
> that take 24 hours?  100?  1000?  10000?  Our services will all  
> presumably implement some cutoff.  Are we mandating some minimum  
> value for that cutoff?  My sense is that we don't typically mandate  
> such limits on our services, but we may want to manifest whatever  
> limits there are in the metadata.
>
> I suspect that not having support for timeout queries is a pretty  
> common issue in the various APIs to the various databases.  However  
> I think one can generally get around that by setting a timer in  
> another thread/process, terminating the query when that timer goes  
> off, and reporting a clean error to the user.  I'd think that would  
> be especially easy in Java.  Might leave some ghost query running,  
> but that's not the client's problem!
>
> 	Regards,
> 	Tom
>
>
> Gerard wrote:
>>  Hi Tom
>>> One thing that confuses me a little about this discussion, seems  
>>> to be the implicit assumption that we don't need to worry about  
>>> timeouts for asynchronous queries.
>> async was included in the discussion (http://www.ivoa.net/forum/ 
>> dal/0903/1028.htm)
>>> For synchronous services it's a little harder since we need to  
>>> make sure that we send an appropriate message before the  
>>> connection dies.
>> Indeed, one of the questions I get now and then is what the  
>> meaning is of
>> the message: Bad Gateway!
>> The proxy server received an invalid response from an upstream  
>> server. ...
>>> Maybe allow a timeout value for synchronous services? [Does it  
>>> already exist?]
>>>   While I'm not sure that the underlying databases support  
>>> timeouts, it's easy enough to put the timeout in the layer that  
>>> calls the database.
>> Postgres' JDBC driver for a long time (still?) did not support the
>> setQueryTimeout.
>> Gerard

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2104 bytes
Desc: not available
URL: <http://www.ivoa.net/pipermail/dal/attachments/20090305/24a48352/attachment-0003.bin>


More information about the dal mailing list