<div dir="ltr"><div>Hi Dave,</div><div>thanks for underlying the client perspective. I agree with you that, especially in case of errors during the transfer, it would be useful to have that information in the job info. Maybe it is not feasible to have a complete decoupling of the services.</div><div><br></div><div>Cheers,</div><div>Sonia<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 16 dic 2020 alle ore 02:18 Dave Morris <<a href="mailto:dave.morris@metagrid.co.uk">dave.morris@metagrid.co.uk</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Sonia, Brian<br>
<br>
The VOSpace specification was designed to act as an abstract interface <br>
layer, hiding the details of the underlying implementation from the <br>
client.<br>
<br>
A useful way to look at questions like this is how would an external <br>
user expect it to work and what would they want to know ?<br>
<br>
My own guess is that given a status of [PENDING|RUNNING|COMPLETED|ERROR] <br>
for a transfer job, most people would expect COMPLETED to mean all parts <br>
of the job have completed and all of the bytes were transferred <br>
successfully.<br>
<br>
If we set the status to COMPLETED as soon as the negotiation is done, <br>
then there is no way for the service to change that to ERROR later on if <br>
something goes wrong with the byte transfer (state change rules for UWS <br>
jobs would exclude a transition from COMPLETED to ERROR).<br>
<br>
Checking the job status is the only way that a client who is not <br>
directly involved in the transfer can tell if the the bytes have been <br>
transferred successfully or not. Knowing that the negotiation has been <br>
completed but not being able to tell anything about the actual byte <br>
transfer is less useful to a client.<br>
<br>
If you clicked a [download link] on a website and your browser <br>
immediately set the status to [done], you would be impressed at how fast <br>
seemed to be, but you would be disappointed if you looked in your <br>
downloads directory and the data wasn't there.<br>
<br>
At the moment I'm not convinced we should change the way that this <br>
works.<br>
<br>
Hope this helps,<br>
-- Dave<br>
<br>
--------<br>
Dave Morris<br>
Research Software Engineer<br>
Wide Field Astronomy Unit<br>
Institute for Astronomy<br>
University of Edinburgh<br>
--------<br>
<br>
On 2020-12-15 08:30, Zorba, Sonia wrote:<br>
> <br>
>> Regarding the 'phase' in the asynchronous pullFromVoSpace operation: <br>
>> the<br>
>> specification is probably not clear enough about how the jobs phases<br>
>> reflect transfer negotiation and the resulting byte transfer. With <br>
>> our<br>
>> 'vault' implementation (the one based on distributed object storage) <br>
>> we<br>
>> took a different approach: our jobs are in the EXECUTING phase during <br>
>> byte<br>
>> transfer, and then are set to COMPLETE or ERROR when that's done. <br>
>> However,<br>
>> this is problematic as the service handling the byte transfer must <br>
>> make a<br>
>> callback to vospace to set the final phase. This introduced an <br>
>> undesirable<br>
>> coupling between vospace and the service handling the byte transfer. <br>
>> Also,<br>
>> since that callback can fail, we need to monitor and correct those <br>
>> failures<br>
>> in an out-of-band process. If we get a chance to refactor this we <br>
>> will<br>
>> probably choose to set the phase to COMPLETE or ERROR immediately <br>
>> after<br>
>> transfer negotiation is complete, and consider the ensuing byte <br>
>> transfer an<br>
>> operation that is outside the scope of the VOSpace protocol.<br>
>> <br>
> <br>
> In the recommendation document, the first pullFromVoSpace example ends <br>
> with<br>
> "On successful file transfer completion the job will be COMPLETED", so <br>
> it<br>
> seems that your implementation is following the recommendation. Do you<br>
> think that this behaviour could be redefined in newer versions of the<br>
> document?<br>
> <br>
</blockquote></div>