From: yos_titi <nu...@jb...> - 2005-06-12 10:59:14
|
Hi. I'm a programmer from the same group, and I would like to elaborate more, as this is a pressing issue for us. So I'm sorry in advance for the length of the response ( - : We currently are using a system that has an implementation of a cache that uses several static hashmaps in order to manage all in-memory static objects. We're trying to use jbosscache (AOP) behind the scenes to make the move to a distributed application. We chose jbosscache because it offers (or at least claims to offer) a way to work with distributed applications with very little added code. The idea was to put all our hashmaps on an instance of treecacheAOP, and to let the cacheMapInterceptor (and of course all aspectized sub POJOs) do all the distributed work behind the scenes. Our module includes a load which consists of non-frequent put actions, but a very heavy load of get actions. We joined two servers as a cluster and ran the following test: Server number 1 performed a put of a hashmap on the cache once in the initialization stage of the server. It also ran a thread that changed a member of the map every 30 seconds (just to add some noise). Server 2 did map = cahce.cache.getObject on its initialization routine and then performed a map.get(object) on each transaction. After debugging the code we learned that the MapInterceptor.get calls getObject which goes to the network each time. As we need to perform for each user transaction several get operations on diffrent hash maps, this is not acceptable. The question is: why does getObject goes to the network each time? And, if this is a bug, what can we do? (A side from dropping jbosscache). We thought about creating our own implementation of a cached map, which holds all aspectized pojos localy, and performs getObject only if the local key does not exist. But then we will have to deal with the removal of objects from the cache (Unless the POJO reference itself will become null?). Any suggestions (Please)? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3881208#3881208 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3881208 |