Answer the question
In order to leave comments, you need to log in
Is it possible to implement a mutex on a store where there are only set and get?
Redis has a wonderful Redlock algorithm that allows you to reliably implement mutex (mutual exclusion) on distributed storages. But it is based on the insert-if-key-no ( SET ... NX
) operation.
The question arose: is it possible to implement mutex based on storage VKontakte, where there are only operations set( key, value)
and get(key)
? There is a utils.getServerTime() method to get server time accurate to seconds.
The task is to coordinate several independent agents among themselves, so that at any time one of them will take on the task. The only connection they have with each other is through this VK storage.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question