UWS result URL - is relative URL okay?

Dave Morris dave.morris at metagrid.co.uk
Mon Nov 4 15:46:14 CET 2019


My own thought would be no.

Firstly, it makes the specification simpler if we just say all URLs MUST 
be absolute. If we allow relative URLs, then we have to say what they 
are allowed to be relative to. With relative URLS the response is no 
longer self describing. It relies on context information that is not in 
the response document.

Consider a use case for multiple long running asynchronous jobs :

A client program fires off 1,000 jobs to 20 different services, some of 
which may take several hours to complete.

For something like this our astronomers often use a combination of wget 
and shell script text processors to create their first prototype.

The simple way of handling persistence on the client would be to fetch 
the status response for each and save it as an XML file on disc. Then 
come back later and iterate through the XML documents and fetch the 
results of the ones that have completed.

If the response contains relative URLs, then the client has to store the 
additional context information about which service
this job is running on and how it was accessed (http or https) etc.

Case in point, there is nothing in the XML posted in the GitHub issue 
that indicates where this job is/was running. We need the additional 
context given in the human readable text to know that it was using the 
"using CEFCA TAP services .. with authenticated access".

As a general rule, services should produce self-describing documents 
that can be stored and used later, without needing external context 
information. Which means services MUST produce fully qualified URLs.

However, a good client should be robust enough to be able to process 
relative URLs when they encounter them.

I think this generally agrees with the second part of Paul's response.

Hope this helps,
-- Dave


--------
Dave Morris
Research Software Engineer
Wide Field Astronomy Unit
Institute for Astronomy
University of Edinburgh
--------

On 2019-10-31 19:54, Christine Banek wrote:
> Hi all,
> 
> 
> I just got an interesting bug report on pyvo today and after reading
> the UWS spec hoping for some clarity, I'm at a loss if this is
> allowed.  Here's the original issue:
> 
> 
> https://github.com/astropy/pyvo/issues/191?
> 
> 
> Basically, the result URL field in a UWS async job is a relative URL.
> Is this allowed / part of the spec?  If relative is allowed, is that
> URL considered relative to the UWS Job URL?  Since it seems to work
> with TOPCAT, I've added Mark as well to get his feelings.
> 
> 
> Thanks all,
> 
> Christine


More information about the grid mailing list