Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How long should actionStatus resources be retained for? #102

Closed
benfrancis opened this issue Sep 16, 2021 · 1 comment
Closed

How long should actionStatus resources be retained for? #102

benfrancis opened this issue Sep 16, 2021 · 1 comment
Assignees

Comments

@benfrancis
Copy link
Member

benfrancis commented Sep 16, 2021

On the architecture call today I raised the point that the action protocol binding in the Core Profile describes creating ActionStatus resources which provide the status of an action, but doesn't say anything about how long those resources should be retained for.

Note that an action status can have different states ("pending", "running", "completed" or "failed") and in the REST API a Consumer needs to poll the action resource to know its state. If you cancel an action its ActionStatus resource is deleted, because the cancel operation maps onto a DELETE request in HTTP, but the ActionResource for an operation which completes (or fails) needs to be retained so Consumers can poll its status. However, there's currently no guidance about how long those resources should be retained for.

My personal thinking is that Web Things should not be expected to retain this historical data forever because they may be resource constrained devices with limited storage, but they also can't delete the resource as soon as an action completes because a Consumer needs to poll the resource to find out whether the action completed or failed. I would expect that a Web Thing would store action state in volatile memory and may flush old action states to conserve memory and when powering down.

It might be worth adding a note to the specification to make it clear that:

  1. ActionStatus resources don't need to be retained forever
  2. ActionStatus resources can't immediately be deleted once an action completes
  3. The duration for which the resource is retained may be implementation-specific as it may depend on hardware constraints
@benfrancis benfrancis self-assigned this Sep 16, 2021
mlagally added a commit that referenced this issue Sep 23, 2021
Define protocol binding for `queryallactions` - closes #99 and #102
@benfrancis
Copy link
Member Author

benfrancis commented Sep 27, 2021

Addressed by #103, new issue to discuss further improvements #106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant