On Mon, Sep 9, 2013 at 12:34 PM, Tristan Tarrant <ttarrant@redhat.com> wrote:
On 09/09/2013 11:18 AM, Dan Berindei wrote:
> Hi guys
>
> As you know, I'm working on ISPN-3051, allowing each node to take a
> higher or lower proportion of the entries in the cache. I've
> implemented this by adding a float "loadFactor" setting in each node's
> configuration, with 1 being the default and any positive value being
> accepted (including 0).
>
> There are two questions I wanted to ask you about the configuration:
>
> 1. What do you think about the "loadFactor" name? I started having
> doubts about it, since it has a very different meaning in HashMap. I
> have come up with a couple alternatives, but I don't love any of them:
> "proportionalLoad" and "proportionalCapacity".
Since this is "per-node", you want to use the "node" word in there, so
"nodeCapacity" would be good. Can this value change at runtime ?

nodeCapacity by itself would sound like we're limiting the actual number of keys held on this node, so I feel it would be misleading. You do have a point about having "node" in the name though... how about "nodeScale"?

The value can't change at runtime. TBH, I haven't even considered it.

 
> 2. Where should we put this setting? I have added it as
> CacheConfiguration.clustering().hash().loadFactor(), but I can't think
> of a reason for having different values for each cache, so we might as
> well put it in the global configuration.
Yes, global sounds good. And don't forget server :)


I guess the others disagree, so I'll keep it at the cache level.

I'll try to remember about server ;)

Cheers
Dan