Questions tagged [distributed-lock]

53 questions
0
votes
1 answer

it seems that redisson distributed lock does not work

I'm testing whether distributed lock of redisson does work correctly, with kotlin and coroutine. runBlocking { repeat(1000) { launch { val lock = nonReactiveClient.getLock("lock") …
geunyoung
  • 23
  • 4
0
votes
0 answers

Handle distributed locks for critical section

I have a requirement where there are 2 instances of the application on different DCs running. It uses distributed locks so at any given point of time only 1 instance will have the lock. So say instance A has the lock but while running some critical…
Sachin Jain
  • 97
  • 1
  • 10
0
votes
1 answer

Hazelcast IMap tryLock bulk multiple keys

I have a clustered program where each thread wants to lock a set of keys. As I understood the simplest solution using hazelcast: private void lock(SortedSet objects) { try { IMap lockMap = getLockMap(); …
0
votes
2 answers

Resource locking and business logic

Consider the following situation: There is an update request on Entity A, to create sub-entity A.B. there might be many B's on A, each B has unique email address. The entity A is a shared entity, and the same request can happen in multiple servers…
0
votes
1 answer

Distributed Lock on GAE/J

I'm developing an application on GAE/J and looking into how to implement distributed lock on it. My requirement is quite same with this question. But this question is about 7 years old, so I can't find whether the answers are still valid. Also I…
N.F.
  • 3,844
  • 3
  • 22
  • 53
0
votes
1 answer

Race condition in distributed locks with Redis

I've read the post about distributed locks with Redis at http://redis.io/topics/distlock. There's a lua script to describe how to do "unlock". if redis.call("get",KEYS[1]) == ARGV[1] then return redis.call("del",KEYS[1]) else return 0 end I…
SunRunAway
  • 305
  • 4
  • 10
0
votes
1 answer

How to design a transaction management system for a custom key-value store

My application uses a custom key-value store as data persistence layer. This key-value store is developed in-house and has some APIs to work with, however, it does not provide anything around transaction management or locking (especially distributed…
Niranjan
  • 2,601
  • 8
  • 43
  • 54
0
votes
1 answer

Zookeeper Producer Consumer

I have few doubts on how producer consumer recipe will work with Zookeeper. All the examples I have seen so far have producers and consumers in the same java processes as separate thread. But the whole point of being distributed is to have different…
1 2 3
4