Closed ikyriak closed 1 year ago
My 5 cents: Redis itself is difficult to clusterize (= broken and unmanageable), so it'd be great to have an abstraction, maybe existing caching abstraction will do?
Hello @Rast1234
Thank you for your input. That's true. An abstraction would be placed. However, we have to keep in mind that there are applications on single servers (where Distributed Locks are not needed).
I was thinking of providing an implementation for Redis. However, the following library also seems nice to use various technologies easily.
Hello @Rast1234
The feature of supporting idempotency in a Cluster Environment (i.e., a group of multiple server instances) using Distributed Locks has been included in the v2.0.0-RC.01 release 🎆🎉.
Refactoring has been performed to include additional abstractions and distinguish the Caching (IIdempotencyCache
), Distributed Locks (IDistributedAccessLockProvider
), and Accessing of them (IIdempotencyAccessCache
).
Currently, we support the following two implementations for Distributed Locks:
In addition, the DistributedLockTimeoutMilli
attribute option is included to configure the time the distributed lock will wait for the lock to be acquired (in milliseconds).
Can you please check if this is working for your case?
Impressive! We already implemented minimal working idempotent-ish solution for our case but i'll tell the team and put a task into our backlog. This looks very promising!
To support idempotency in a cluster environment (i.e., a group of multiple server instances), we could use Distributed Locks with Redis via the proposed Redlock algorithm.