UWS 1.1 multiple PHASE filters for job list

Paul Harrison paul.harrison at manchester.ac.uk
Fri Oct 9 15:58:39 CEST 2015


> On 2015-10 -09, at 13:41, Kristin Riebe <kriebe at aip.de> wrote:
> 
> Dear Grid members,
> 
> I know, it's already quite late for comments on UWS 1.1. But while
> implementing some of its features, I got into discussions with my
> colleagues about the syntax with multiple phase-filtering.
> 
> Currently, the document says:
> (2.2.2.1. Job List,
> http://ivoa.net/documents/UWS/20150907/PR-UWS-1.1-20150907.pdf, page 13)
> 
> "If the PHASE filtering parameter is repeated, then
> the service should list all the jobs in the union of the enumerated PHASEs."
> 
> So does it mean one should use:
> 
> {base-url}/{jobs}?PHASE=EXECUTING&PHASE=PENDING

The above is was what is intended 
> 
> or
> 
> {base-url}/{jobs}?PHASE1=EXECUTING&PHASE2=PENDING

and definitely not this
> 
> ?
> 
> From what I tested with the version at CADC
> (http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/tap/auth-async) and
> Grégory's UWS library, it seems the first version is supported there.
> But the standard's phrase "enumerated phases" sounds like the second
> version should be implemented?

yes perhaps a different wording would be better - “repeated phases”
> 
> From other websites using filtering by multiple keys (e.g. wordpress),
> it seems that common practice would be using the '+' sign to append
> multiple values for one key, i.e.:
> 
> {base-url}/{jobs}?PHASE=EXECUTING+PENDING

this could have been a possibility I agree, but I think not worth allowing for the reasons below.
> 
> I must say I like this much better than having multiple PHASE-keys
> (which break a lot of frameworks that assume unique keys) or enumerating
> them with PHASE1, PHASE2 etc.
> 
> What do you think?
> 
> Either way, I'd suggest to add at least one example for filtering by two
> phases in the standard to make it clearer.

I have to say the all of the frameworks that I have used tended to return the repeated keys as arrays or lists without it causing a particular problem, and I had sort of assumed that it was a standard convention - I do not think that there is anything in any of the relevant standards that does not allow repeated keys in the url parameters, so any framework that does assume repeated keys cannot occur is making an invalid assumption. Indeed I believe that a HTML form SELECT element that allows multiple selection behaves by repeating the key (and is the reason why this pattern was chosen), but I cannot actually find a reference that says it must be done this way - though see http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_select_multiple for an example of this in action.

Given that the UWS standard currently uses repeated keys (which I think is not illegal and at least conventional), I think that we should not change this to allow specifying multiple PHASEs as a space separated string on the PHASE at this stage. If anyone can find a reference in any standard to the repeated key behaviour of form SELECT, I would be grateful.

As a minimum though I will rephrase the “enumerated phases” in the UWS standard.

Cheers,
	Paul.







More information about the grid mailing list