Closed TonyStarkGR closed 1 year ago
Hello @TonyStarkGR,
Is this what you are looking for? https://www.nuget.org/packages/IdempotentAPI.DistributedAccessLock.MadelsonDistributedLock/2.0.0-rc-01
You can find all IdempotentAPI NuGet packages here.
Have a nice day,
Good morning John, thank you for your reply. Most likely, although I see it's an RC and not a stable release. For now I went with https://github.com/madelson/DistributedLock
Is it ok to proceed with this solution ? (based on your experience)
The idempotency in a Cluster Environment (i.e., a group of multiple server instances) using Distributed Locks is supported in IdempotentAPI v2.0.0 Release Candidate (RC), which also includes some bug fixes. However, the RC is two months old, and there are no known issues. So, if your project is in a cluster environment, you could try the IdempotentAPI v2.0.0 RC.
Yes, you could use the https://github.com/madelson/DistributedLock
package directly and implement your idempotency logic/mechanism without using the IdempotentAPI package if this is simpler for your project.
Thank you for you reply. Actually, I'm tying a combination of both, meaning that I use the Idempotent API to send the proper headers in each request and then I've used the https://github.com/madelson/DistributedLock
inside the post/put requests implementation in the controller, meaning that all the DB insert and update operations are within spec. I did not create a custom logic. I just used the attributes as mentioned in the documentation and used a using
clause to engulf the DB operations. Are there any other guides/tutorials or examples that I could refer to in order to get more in depth on the subject ?
That's great! You can read the following article. I recommend preparing fallback scenarios (based on your use case) when the lock cannot be acquired or distributed lock provider is not working. https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html
Hello all, I wanted to use
IdempotentAPI.DistributedAccessLock.MadelsonDistributedLock
package as I'm facing issues with REST requests regarding duplicate entries, thus, I need the requests to be idempotent. However I can't find the specific package in the repository. Am I missing something ? should I look it up under a different name ? (the package title was copy-pasted from the code section)Thank you in advance