Answers inline below...

----- Original Message -----
From: "Sergio Bossa" <sergio.bo...@gmail.com>
To: "tc-dev" <tc-dev@lists.terracotta.org>
Sent: Sunday, May 17, 2009 10:47:12 AM GMT -06:00 US/Canada Central
Subject: [tc-dev] Clarification about CSM implementation

Hi guys,

I'd like to a have a clarification about the ConcurrentStringMap (CSM)
implementation and behavior in a well-partitioned scenario.

Let's say I have a CSM using String objects for both keys and values:
the map may have thousand (maybe million) values, but every L1 node
reads/writes only a subset of all values, thanks to some kind of
partitioning strategy.
Now my questions:
- Are *all* values kept in memory on *every* L1 node, even if each
node reads/writes only a subset of?

-> no, all *keys* are in-memory on every node, but just values that have been 
used on the node.

- Does the L1 node eventually flush unused values to the L2, or does
it risk to go out of memory?

-> yes, the L1 node will flush unused values.  

- Given that String are literal values and seems not to be partially
loaded, would it be different if string values were wrapped into some
kind of holder object?

-> csm works only with string keys as the key value is used to derive the lock 
name in a 1-1 mapping.  Discussions about other options to reduce memory or 
loosen this constraint are possible and ongoing.


Thanks,
Cheers,

Sergio B.

-- 
Sergio Bossa
Software Passionate and Open Source Enthusiast.
Blog : http://sbtourist.blogspot.com
Pro-Netics : http://www.pronetics.it
Sourcesense : http://www.sourcesense.com
_______________________________________________
tc-dev mailing list
tc-dev@lists.terracotta.org
http://lists.terracotta.org/mailman/listinfo/tc-dev
_______________________________________________
tc-dev mailing list
tc-dev@lists.terracotta.org
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to