spaces
spaces copied to clipboard
Feature Request: Takeover/force lock
In time-sensitive situations where every second counts, we need to be able to take over a lock, even though a resource is already locked by someone else. Is that something you could support? E.g.
await space.locks.acquire('my-resource', { force: true });
A use case is an article on a news site where the situation changes rapidly. If some editor is blissfully unaware and typing away on something and the editor-in-chief doesn't have time to call the currently editing editor or find him, they should be able to force-lock the article (effectively kicking out the previous editor) to update the content.
hello @pchr-srf, thanks for opening this issue & feedback.
We're working on a feature roadmap for Spaces 1.0, so this is very helpful. I'll put forward your request to our product team.
Hi @pchr-srf, it looks like we can achieve what you need with not many changes to the SDK. We are discussing the best way to do that and it's implications on the future direction of the API but will get back to you soon with more info.
Hi @Srushtika , that is very good news! Right now we're using a second channel where we send a simple "hey everyone please release your lock for resource X", for which we now have to use AblyProvider
and a Provider for the takeover channel:
It works™️ but if it's natively supported by Ably and we could get rid of these extra steps it would be extremely convenient 👍
Hi @pchr-srf - sorry for the radio silence here, most of our team is just getting back from holidays this week. We'll get back to you soon.
No worries, we're also still slowly returning from our hibernation :)