-
1. Large number of cache instances
manik Apr 29, 2011 10:46 AM (in response to dror76)1 of 1 people found this helpfulWe haven't tried this with tens of thousands of cache instances, but I don't conceptually see anything wrong with it provided you have enough memory and horsepower on each node.
Quick question though, why not just use one cache for all of this, and "namespace" each entry by using "ChatroomName_<key>" as your key?
-
2. Large number of cache instances
ckulenk Apr 29, 2011 4:36 PM (in response to dror76)1 of 1 people found this helpfulThe DeltaAware/Delta interfaces may be of interest too. DeltaAware for a Chatroom, Delta for a message...
-
3. Re: Large number of cache instances
navs Jun 16, 2011 7:39 AM (in response to manik)Hey
I have a question on the same topic
When a map of objects is maintained in the cache, and a object changes, is the whole object resent for replication or only the dellta part?
The object are simple once with a few fields in it....
-
4. Re: Large number of cache instances
manik Jun 21, 2011 5:59 AM (in response to navs)The whole object. Unless your map is an AtomicMap, created using the AtomicMapLookup helper.
-
5. Re: Large number of cache instances
navs Jun 21, 2011 7:12 AM (in response to manik)Hey Manik
Thanks for the reply!
I have one more question, If I use a nested AtomicMap will only the parent map be delta replicated or even the nested AtomicMaps will be delta replicated?
-
6. Re: Large number of cache instances
navs Jun 22, 2011 6:54 AM (in response to manik)another question, which is advisable a cache with structure <String,HashMap<String,SmallObject>> or hundreds of caches, one for each SmallObject (keeping frequent changes to SmallObject and need to delta replicate them in mind).
Is there a big overhead in having many caches vs 1 cache?
-
7. Re: Large number of cache instances
ckulenk Jun 22, 2011 7:25 AM (in response to navs)Why not <KeyPath,SmallObject> with KeyPath={key1,key2,...} or something similar? I think massive amounts of caches aren't a good idea.
-
8. Re: Large number of cache instances
manik Jun 23, 2011 11:23 AM (in response to navs)AtomicMaps weren't designed to be nested. I think this will cause issues.
-
9. Re: Large number of cache instances
manik Jun 23, 2011 11:23 AM (in response to ckulenk)Yes, this is certainly a better option.
-
10. Re: Large number of cache instances
navs Jun 24, 2011 8:29 AM (in response to manik)Hey Manik
Thanks for you replies!
I am trying to implement a DeltaAware SortedSet (call it DeltaAwareTreeSet) for my application. Is is just enough to implement DeltaAware and Delta interface, and externalize delta object (call is TreeSetDelta)
I see AtomicHashMap has its own implementation of externalizer which is registered in Eternalizer class and mapped to it by ID assigned to AtomicHashMap.
If I create my delta aware SortedSet, how would I implement externalizer for my class?
-
11. Re: Large number of cache instances
navs Jun 24, 2011 9:37 AM (in response to navs)hey....the imlementaion worked fine!...never mind