zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rakesh Radhakrishnan <rakeshr.apa...@gmail.com>
Subject Re: Distributed Applocation using Zookeeper
Date Sat, 07 Jun 2014 18:32:01 GMT
I hope you will be keeping each IP address as an znode in ZooKeeper. Also,
if you don't have any costly operation before storing the znode in
ZooKeeper, there is an optimistic way. When a request comes, pick one of
the available IP from the pool and try create IP znode in ZooKeeper. Say,
if two are trying to create same znode in ZK simultaneously, one will get
"KeeperException.NodeExistsException". Now pick another available one
optimistically and creates again.


On Sat, Jun 7, 2014 at 11:33 PM, Kapil <kapildeshpande.1988@gmail.com>

> Thanks Rakesh for mail,
> My functionality is as follows.
> I am going to use zookeeper to allocate IP addresses. So it will allocate
> Ip
> address from given pool of available IP addresses each time request comes.
> Once Ip address allocated I am going to store it in znode to maintain
> record
> so that I can know dynamically each time which IP addresses are available.
> So each time while allocating IP address I have some concurrency mechanism
> to do this.
> So I was only confused that if updates are A-Sequential why do we need
> locks. But I think I now understand that since my update operation is
> divided into number of individual atomic updates I will have to implement
> locking.
> Thanks
> --
> View this message in context:
> http://zookeeper-user.578899.n2.nabble.com/Distributed-Applocation-using-Zookeeper-tp7579952p7579966.html
> Sent from the zookeeper-user mailing list archive at Nabble.com.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message