danielstjules / redislock Goto Github PK
View Code? Open in Web Editor NEWNode distributed locking using redis
License: MIT License
Node distributed locking using redis
License: MIT License
Hi, after reading documentation on npm package page, is there a way to auto extend timeout of lock, to prevent code executed outside the lock after expiring? Considering it may possible that some async work haven't finished. Thank you.
Hi, thanks for making this available. I started with the patterns on https://redis.io/commands/set, after some googling found yours.
Will it work in a cluster?
Like this: https://redis.io/topics/cluster-tutorial
or this: https://aws.amazon.com/elasticache/ (in cluster mode)
I 'm assuming this is not an implementation of https://redis.io/topics/distlock?
hi there,
been a long time since there was any activity on this project.
has it been abandoned in favor of https://github.com/makeomatic/ioredis-lock?
if your'e still here let us know :)
i'm thinking of building semaphore functionality using the api you already implemented, would do it as a PR on this repo if its still active and not abandoned.
open to discussing it as well.
cheers!
I'd love to see the ability to pass -1 as an option to retries to keep retrying forever.
In my use case I have several servers running a job scheduler, but I don't want all three scheduling duplicate jobs. But if one of the scheduler processes crashes (or the server goes down), I want another scheduler to acquire the lock and take over.
On first glance the implementation here seems to be the same as the lock implementation of redis-py, a very common python redis client implementation.
As debugging (and especially reproducing) lock errors can be very hard though, could someone with more insight (maybe @danielstjules?) confirm that this implementation is compatible with the way redis-py implements its locks?
https://github.com/andymccurdy/redis-py/blob/b940d073de4c13f8dfb08728965c6ac7c183c935/redis/lock.py
The Lua Scripts in both implementations basically do the same and the lock acquiring is the very same call.
Hello, man , I wanna to get suggested about which kind of strategy to pick when using RedisLock
Which one do you prefer?
hi!
thanks for helping.
just asking, i just need to create a new session id, like uuid. it says this is the simple use case, but i dont get it. what do i do with the lock? i just want to add a new unique id if it doesn't exist , how do i do it?
thanks so much!
ciao!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.