sendResponse()on the connection
[curator][lock-recipe] pre ZK 3.5 (container nodes), curator lock implementation creates persistent parent node and ephemeral-sequential child node. I believe this is done to mitigate herd-effect. But we have a use-case where 99.99% calls are unique, and we need lock just in case 2 duplicate calls come at the same time. Given that we are still stuck with ZK 3.4 and I want to avoid reaper (since it is deprecated), can I implement a lock recipe which just tries to create ephemeral node without any persistent nodes. Since ZK will fail if node already exists, this will ensure only one call (among the duplicate concurrent calls) will go through ?
Are there any corner cases where it will not work ?
Since I didn't find any library(recipe) with such implementation I was not sure about it.
Can someone please tell me if there is any problem with this approach for the use-case where duplicates are very rare, but whenever it happens we need to make sure only one call goes through?