redis-quartz icon indicating copy to clipboard operation
redis-quartz copied to clipboard

Is redis-quartz using Pub/sub mechanism to implement global locking?

Open abhishek-goyal opened this issue 8 years ago • 2 comments

As per the blog: https://redislabs.com/blog/run-quartz-the-java-job-scheduler-on-top-of-redis/, redis-quartz should be using pub/sub mechanism to implement global locking. Instead I see the library using JedisLock to implement this (which is in-turn using setNX and timeout for locking).

An additional element used in Redis JobStore is global locking with Redis' publish and subscribe mechanism (Pub/Sub), in which JobStore listens to an ‘unlock’ message.

I also see a class UnlockListener is defined in the RedisJobStore but is not being used anywhere.

abhishek-goyal avatar Feb 04 '17 19:02 abhishek-goyal

Hi @abhishek-goyal , when the above blog post was published, redis-quartz had used pub/sub to implement global locking. It is using jedis-lock now, which is implementing redis distributed lock.

kehati avatar Feb 20 '17 12:02 kehati

Hi @kehati ,

Thanks that clarifies my doubt. Just wondering why did we move away from pub-sub mechanism of locking? Does distributed lock mechanism we are using (jedis-lock) provides a performance gain or is more reliable?

Regards, Abhishek

abhishek-goyal avatar Feb 23 '17 07:02 abhishek-goyal