Re: long running actions

> For really long lived actions, it becomes interesting to consider a means to provide a progress indicator and a means for cancelling the action. One idea is for the method used to invoke the action to synchronously return an identifier that can be used to cancel the action, and potentially to drive a progress indicator.


Sorry to miss the meeting in Japan. I had some personal business to take care of. I trust everyone is safely home by now.

Yes, this reminds me of the REST action pattern we were discussing. Invoking an action may create a temporary resource that represents the state of the action,. That resource may then be monitored, subscribed to synchronize the application state (like a progress meter), and it may be modified or deleted to enable the application to change the state of the running (or scheduled) action.

There is a written description of a REST version this pattern using hypermedia controls in this article. It’s rather long, just skip to the Collections and WoT Interaction Model part about Actions and Events.

http://iot-datamodels.blogspot.com/ <http://iot-datamodels.blogspot.com/>

Best regards,

Michael

PS My submissions to the list don’t get published for some reason. Could you please forward or reply? Thanks!


> On Nov 3, 2015, at 9:00 AM, Dave Raggett <dsr@w3.org> wrote:
> 
> Hi Johannes,
> 
> In respect to the distinction between short and long running actions, I thought it would be worth some further discussion.
> 
> Even short lived actions should be considered as asynchronous due to the possible delays incurred by invoking them across the Internet, and the possibility of waiting for a sleeping device to awake.
> 
> For really long lived actions, it becomes interesting to consider a means to provide a progress indicator and a means for cancelling the action. One idea is for the method used to invoke the action to synchronously return an identifier that can be used to cancel the action, and potentially to drive a progress indicator.
> 
> If the method used to invoke the action returns a promise, I guess the identifier could be a property on the promise, but am unsure of the details. We should look into that.
> 
> Cheers,
> —
>    Dave Raggett <dsr@w3.org <mailto:dsr@w3.org>>
> 
> 
> 

Received on Tuesday, 3 November 2015 18:00:06 UTC