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

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

Open
abhishek-goyal opened this issue Feb 4, 2017 · 2 comments

Comments

@abhishek-goyal
Copy link

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 abhishek-goyal changed the title Is redis-quartz using Pub sub mechanism to pub/sub mechanism to implement global locking? Is redis-quartz using Pub/sub mechanism to implement global locking? Feb 4, 2017
@kehati
Copy link
Contributor

kehati commented Feb 20, 2017

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.

@abhishek-goyal
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants