curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <jor...@jordanzimmerman.com>
Subject Re: tree cache load time
Date Wed, 16 Sep 2015 00:01:41 GMT
How would you do multiple levels? Maybe I'm missing something, but don't you need to know the
names of the child nodes for a level before you can query the level below that?
Oh, that’s true. 



On September 15, 2015 at 6:59:46 PM, Cameron McKenzie (mckenzie.cam@gmail.com) wrote:

How would you do multiple levels? Maybe I'm missing something, but don't you need to know
the names of the child nodes for a level before you can query the level below that?

On Wed, Sep 16, 2015 at 9:58 AM, Jordan Zimmerman <jordan@jordanzimmerman.com> wrote:
You could even do multiple levels. Of course, you’d run into the 1MB limit at some point.
But, maybe if TreeCache knows it needs to do a certain amount of work it could batch it via
multi-transaction.


On September 15, 2015 at 6:57:36 PM, Cameron McKenzie (mckenzie.cam@gmail.com) wrote:

So you could execute the all the required getChildren calls for a particular level of the
tree in a single call to ZK?

On Wed, Sep 16, 2015 at 9:54 AM, Jordan Zimmerman <jordan@jordanzimmerman.com> wrote:
However, there is an optimization opportunity by using ZK’s multi-transactions. Maybe we
can explore this.

-Jordan



On September 15, 2015 at 6:44:46 PM, Cameron McKenzie (mckenzie.cam@gmail.com) wrote:

It would be largely dependent upon how much data you're caching. The tree cache needs to recursively
query ZK to populate the cache.
cheers

On Wed, Sep 16, 2015 at 9:30 AM, Vikrant Singh <vikrant.subscribe@gmail.com> wrote:
Hello All,
I am using tree cache for one of my project. Issue I am facing is with the time it is taking
for initialize itself. It is taking around 300ms to 3-4 s to load itself. 
This is how I am initializing the client and cache


 private val client = CuratorFrameworkFactory.newClient(hostList, new ExponentialBackoffRetry(ZookeeperCache.RetryInterval.toMillis.toInt,ZookeeperCache.RetryCount))

val cache = TreeCache.newBuilder(client, path).build()


post this I register for  a handler and then wait for "TreeCacheEvent.Type.INITIALIZED" event. 
It take on avg  300ms to 3-4 s.
IS there something I can do to improve this performance?
Thanks,
Vikrant






Mime
View raw message