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

Respond with current revision (as header) of Ditto managed entities on each API call #2055

Open
thjaeckle opened this issue Oct 30, 2024 · 1 comment
Milestone

Comments

@thjaeckle
Copy link
Member

Currently, the current revision is only returned when e.g. modifying a complete thing (as part of the etag header).

It would however be beneficial if the current revision is always returned as Ditto defined header.

  • for modifying requests
  • but also for retrieving requests

That way, an implementation can e.g. use the "revision" to do a conditional update in the next request.

@thjaeckle thjaeckle added this to the 3.7.0 milestone Nov 18, 2024
@thjaeckle thjaeckle moved this to Todo in Ditto Planning Nov 29, 2024
@thjaeckle
Copy link
Member Author

It would be also good if we could use _revision in a condition to update things ..
That way, just by using the header and a eq(_revision,42) with the next update, optimistic locking can be achieved. Ditto will reject the update if another change was done in the meantime.

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

No branches or pull requests

1 participant