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

Feature Request: Takeover/force lock #243

Open
pchr-srf opened this issue Nov 7, 2023 · 5 comments
Open

Feature Request: Takeover/force lock #243

pchr-srf opened this issue Nov 7, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@pchr-srf
Copy link

pchr-srf commented Nov 7, 2023

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.

@dpiatek
Copy link
Contributor

dpiatek commented Nov 15, 2023

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 dpiatek added the enhancement New feature or request label Nov 15, 2023
@Srushtika
Copy link
Member

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.

@pchr-srf
Copy link
Author

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 👍

@Srushtika
Copy link
Member

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.

@pchr-srf
Copy link
Author

pchr-srf commented Jan 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants