Re: New ZooKeeper client library Cages

2010-05-12 Thread Dominic Williams
Hi Patrick, Internally, ZkMultiLock constructs single path ZkReadLock and ZkWriteLock objects to handle the lock paths you add to it. These work in a similar way to that described in the ZooKeeper recipes. If you only add a single lock path to ZkMultiLock, then when you try and acquire() it

Re: New ZooKeeper client library Cages

2010-05-12 Thread Dominic Williams
Hi Mahadev, Thanks for your interest. We currently use Cages to apply locking where necessary in our operations against the Cassandra database, to manage node membership of an in-house clustered distributed platform called Starburst, and soon for maintaining centralized configuration for those

Re: New ZooKeeper client library Cages

2010-05-12 Thread Dominic Williams
Anyone interested in using Cages and ZooKeeper with NoSQL databases might like new blog post http://ria101.wordpress.com/2010/05/12/locking-and-transactions-over-cassandra-using-cages/ On 12 May 2010 00:02, Dominic Williams thedwilli...@googlemail.com wrote: Anyone looking for a Java client

Re: New ZooKeeper client library Cages

2010-05-11 Thread Mahadev Konar
Hi Dominic, Good to see this. I like the name cages :). You might want to post to the list what cages is useful for. I think quite a few folks would be interested in something like this. Are you guys currently using it with cassandra? Thanks mahadev On 5/11/10 4:02 PM, Dominic Williams

Re: New ZooKeeper client library Cages

2010-05-11 Thread Patrick Hunt
Hi Dominic, this looks really interesting thanks for open sourcing it. I really like the idea of providing higher level concepts. I only just looked at the code, it wasn't clear on first pass what happens if you multilock on 3 paths, the first 2 are success, but the third fails. How are the

Re: Zookeeper client

2010-04-27 Thread Mahadev Konar
HI Avinash, The zk client does itself maintain liveness information and also randomizes the list of servers to balance the number of clients connected to a single ZooKeeper server. Hope that helps. Thanks mahadev On 4/27/10 10:56 AM, Avinash Lakshman avinash.laksh...@gmail.com wrote: Let's

Re: Bizarre ZooKeeper Client Behaviour

2010-04-27 Thread Ted Dunning
Lei, A contrary question for you is why you don't just share zk sessions within a single process. On Tue, Apr 27, 2010 at 5:17 PM, Lei Zhang lzvoya...@gmail.com wrote: I am in the process of changing to each thread of each daemon maintaining a zk session. That means we will hit this 10

Re: Bizarre ZooKeeper Client Behaviour

2010-04-27 Thread Lei Zhang
Ted - You can think of this as a problem with using singleton in a multi-threaded program. The solution that provides better code readability at affordable cost should win. Specifically the problem I am trying to solve is this: We have a multi-threaded webapp based on a framework (means I am

Zookeeper Client

2009-08-04 Thread Todd Greenwood
Is org.apache.zookeeper.ZooKeeper thread safe? I've started walking through the code to check for mutability, and although the first level children are protected, I haven't fully walked the graph. Perhaps I should ask, is it supposed to be thread safe? -Todd

Re: Multiple ZooKeeper client instances

2009-04-24 Thread Mahadev Konar
HI Satish, A zookeeper client usually has a very small footprint for memory and cpu. The mutithreaded version of zookeeper client creates an internal thread to do the io and callbacks. I would suggest using the same zookeeper client across the objects to have less number of threads in your