Hi Jordan,

Planning to have 1 persistent node for the application, say
"/entity_locks/". And then all entities will be trying to create ephemeral
nodes under this parent node.

We will be creating 100 million unique entities in a given day. So each
unique entity will try to take the lock before persisting to data-store. So
if ZK will fail to create ephemeral node if it already exists under same
parent node, then we can go with this simple implementation.

Unless there are some corner cases where this might not work ?

Thanks,
Rajat

On Tue, Feb 4, 2020 at 8:28 PM Jordan Zimmerman <jor...@jordanzimmerman.com>
wrote:

> > can I implement a lock recipe which just
> > tries to create ephemeral node without any persistent nodes.
>
> Ephemeral nodes cannot have any children. Unless you create your lock at
> the root ("/") you'd need some parent persistent node. Is this a big
> problem for you? Unless you have 1000s of unique lock paths there shouldn't
> be any problem with persistent parent node.
>
> -Jordan

Reply via email to