spaces icon indicating copy to clipboard operation
spaces copied to clipboard

Feature Request: Takeover/force lock

Open pchr-srf opened this issue 1 year ago • 5 comments

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.

pchr-srf avatar Nov 07 '23 14:11 pchr-srf

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.

dpiatek avatar Nov 15 '23 12:11 dpiatek

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.

Srushtika avatar Dec 12 '23 10:12 Srushtika

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: image It works™️ but if it's natively supported by Ably and we could get rid of these extra steps it would be extremely convenient 👍

pchr-srf avatar Dec 12 '23 10:12 pchr-srf

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.

Srushtika avatar Jan 04 '24 10:01 Srushtika

No worries, we're also still slowly returning from our hibernation :)

pchr-srf avatar Jan 04 '24 10:01 pchr-srf