Community
Participate
Working Groups
We need a lock service in Gyrex which allow to acquire globally synchronized locks. This should be possible out of the box with ZooKeeper. At least, ZooKeeper already has a receipt for it. The operations should be relatively simple. The lock service allows to created different types of locks. At first, we need an exclusive lock. An exclusive lock can only be held by one client at any point in time. A second lock type might be (recoverable) shared locks. We also need to decide about lock persistence. Typically, locks should only guarantee durability as long as the cloud connection (eg. ZooKeeper session) is alive. However, there are use cases where we may need durable persistent locks. For example, we may use locks in order to control node software updates. Only one node should update at a single point in time. As part of updates a node reboot might be required. Only after successful reboot we might want to release the lock in order to allow the next node to start updating itself.
There is now a ILockService in Gyrex. It support exclusive (i.e. session) as well as durable locks. An exclusive locks expires when the sessions expires (eg. disconnects). Durable locks don't expire in such a case but break and must be recovered.