Search code examples
hadoopconcurrencyapache-zookeeperdistributed-transactionslocks

Distributed Application using Zookeeper


I need to design distributed application using zookeeper. This is the first time I am using Zookeeper so I am little confused with its usage. I have read that Zab protocol ensures serializability when it comes to multiple updates but I am unable to understand, if that is the case than it will automatically allow lock free implementation. So why locks are needed in first place? It will be great if some one can help here.

Thanks


Solution

  • Zab protocol is a critical PART of zookeeper.It ensures atomic broadcast of messages to the replicas . Zab protocol ensures serializability but the concept of serializability only ensures atomic data deliver to a single application . Apache used this protocol to implement atomic broadcast in zookeeper.

    Zookeeper is used for distributed services co-ordination .In a system where n processes are coordinating , to maintain a particular sequence of execution we need distributed locks.