<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Dear GWS,</div>
<div class=""><br class="">
</div>
<div class="">this is my interpretation on this matter</div>
<div class=""><br class="">
</div>
<div class="">* There is no creationTime property defined in UWS (so AFTER and LAST work only on startTime)</div>
<div class="">* StartTime is the time at which a job is put into the EXECUTING phase - so will be NULL before this (i.e. in the PENDING phase)</div>
<div class=""><br class="">
</div>
<div class="">So my resolution would be that any jobs with a NULL startTime do not appear in either the AFTER or LAST filtered lists - i.e. these lists only contain jobs not in the PENDING phase - if a client wants to list these jobs then it uses the PHASE=PENDING
 filter (which is like Grégory’s (c) resolution below, but without introducing a creationTime).</div>
<div class=""><br class="">
</div>
<div class="">I think that this could be accommodated into the current UWS 1.1 RFC as a small clarification.</div>
<div class=""><br class="">
</div>
<div class="">There might be a case for introducing a creationTime property, but I do not think that it would be that helpful (the most interesting jobs are those that have run at some point) and would add extra complexity to the filtering.</div>
<div class=""><br class="">
</div>
<div class="">The real distinction between the AFTER and LAST filters was that LAST allows a fixed number of entries to be displayed, rather than in some sense being “more recent”.</div>
<div class=""><br class="">
</div>
<div class="">Regards,</div>
<div class=""><span class="Apple-tab-span" style="white-space:pre"></span>Paul.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On 2015-10 -16, at 15:19, Grégory Mantelet &lt;<a href="mailto:gmantele@ari.uni-heidelberg.de" class="">gmantele@ari.uni-heidelberg.de</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<div class="moz-cite-prefix">Dear Grid,<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; As Kristin knows, I have not yet implemented in the UWS-Library the AFTER and LAST filters for Jobs Lists (indeed, they were not yet in the working draft version I based my work on for Sesto's IVOA meeting). So, her question sounds really pertinent for
 me, and I would be particularly interested by the answer(s) of Grid members.<br class="">
<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; Re-Reading the paragraph highlighted by Kristin, I understand these 2 parameters as follows:<br class="">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - AFTER filters jobs on startTime &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and sorts them by startTime<br class="">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; - LAST&nbsp;&nbsp;&nbsp; filters jobs on creationTime (&quot; most recent jobs&quot;) and sorts them by startTime<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; Honestly, I've just discovered these parameters recently, and for me, instinctively AFTER and LAST are about the creation time. But it seems AFTER is designed to retrieve already started (and maybe finished...but they may also be running) jobs, and LAST
 to retrieve the most recent jobs (whatever is their phase). Why not!<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; However, I do not think the behavior of LAST is really coherent: we expect to get the last created jobs - filter on creationTime - but we get them sorted by startTime. For me it may be a bit confusing: the constraint and the sort for this parameter should
 be done on the same attribute: createTime (or startTime if it was the original intent).<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; Anyway, to go back on the startTime=NULL problem mentioned by Kristin, I would think that AFTER returns only already started jobs. So there is no issue for AFTER: only jobs with a startTime different from NULL would be returned.<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; However, for LAST there is an issue. If we suppose we keep the behavior written in the Proposed Recommendation, both strategies - putting the pending jobs at the end or at the beginning of the list - make equally sense:<br class="">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; a- at the end because the jobs will possibly be executed in the future (the beginning is the past, the end is the future, in the case of an ascending sorted list),<br class="">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; b- or at the beginning because the jobs are not yet executed and they should be remembered first to the user for execution (indeed, it was probably the reason of this LAST filter).<br class="">
&nbsp;&nbsp;&nbsp; And again, it is also possible to do the same as for the AFTER filter:<br class="">
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; c- not displaying the startTime=NULL's jobs (only the started jobs are visible).<br class="">
&nbsp;&nbsp;&nbsp; But in this case, why put a filter on creation time and filtering implicitely afterwards on startTime? (in addition, we may get less jobs that the asked amount)<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; Personally I would change the behavior of LAST so that filtering AND sorting on the same attribute: createTime ; it is a more intuitive understanding of a LAST filter on a list. For that, as Kristin mentionned, an attribute &quot;createTime&quot; (or &quot;creationTime&quot;
 as you prefer), should be visible for the users.<br class="">
<br class="">
<br class="">
&nbsp;&nbsp;&nbsp; Additional question: I consider jobs in ERROR or ABORTED phase as finished. In this sense, the start- and endTime should be set to something different from NULL (possibly to the same date-time if the job failed or has been cancelled either immediately or
 really fast). So, for me, only jobs in PENDING phase has a start- and endTime set to NULL. Is it wrong?<br class="">
&nbsp;&nbsp;&nbsp; Maybe a clarification about when these two attributes should be set could be also added to UWS 1.1....but maybe it is too late for that...<br class="">
<br class="">
Cheers,<br class="">
<br class="">
Grégory<br class="">
<br class="">
<br class="">
On 10/13/2015 12:31 PM, Kristin Riebe wrote:<br class="">
</div>
<blockquote cite="mid:561CDD73.2070403@aip.de" type="cite" class="">
<pre wrap="" class="">Dear Grid members,

sorry to bother the list again with issues on UWS 1.1, but I think this
may be of interest for a number of people:

How are NULL values in datetimes to be treated when sorting?
(Is there an agreement on this within the IVOA?)

UWS 1.1 introduces filtering for the most recent jobs (LAST-keyword) or
for jobs started after a certain date-time (AFTER keyword). This refers
to the startTime for each job, see 2.2.2.1 Job list in
<a class="moz-txt-link-freetext" href="http://www.ivoa.net/documents/UWS/20150907/PR-UWS-1.1-20150907.pdf">http://www.ivoa.net/documents/UWS/20150907/PR-UWS-1.1-20150907.pdf</a> (page
13).

For pending jobs, in our UWS service at AIP, we set the startTime to
NULL or Nil in xml:
&lt;uws:startTime xsi:nil=&quot;true&quot;/&gt;

(And some of our jobs in ERROR/ABORTED phase can also have no startTime
since they never started.)

Now, how are these to be treated when sorting? Should they be added at
the beginning or the end when sorting by increasing startTime? Or would
it make more sense to introduce a &quot;createTime&quot; and sort by this?

Did anyone finish including AFTER and LAST in their UWS 1.1
implementations, yet? How are you handling this?

Cheers,

Kristin

</pre>
</blockquote>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
<div apple-content-edited="true" class="">
<div class="">
<div style="font-size: 12px; orphans: 2; widows: 2;" class="">Dr. Paul Harrison</div>
<div style="font-size: 12px; orphans: 2; widows: 2;" class="">JBO, Manchester University</div>
<div style="font-size: 12px; orphans: 2; widows: 2;" class=""><a href="http://www.manchester.ac.uk/jodrellbank" class="">http://www.manchester.ac.uk/jodrellbank</a></div>
</div>
<div class=""><br class="">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="">
</body>
</html>