1 Reply Latest reply on May 26, 2005 1:32 PM by mranga

    TreeCacheAop needs your idea

    Ben Wang Master

      (cross-posting this to cache desing forum as well)

      I am starting to gather a use case for the TreeCacheAop white paper after the fine-grained http session replication is almost complete.

      I want your contribution for any idea if you have!

      The use case that I am looking for will be either running outside or inside of the web application. But here are the key traits that need to have:

      1. Use of fine-grained replication for performance. Ideally to have a large collection (huge list) and each element has another complex object. When a singular field is modified, it will only replicate that field (instead of the whole list!). In addition, for chatty replication, it can also do batch processing as well for performance optimization.

      2. Transparent management of object relationship after replication. Each object potentially can also have object graphs that can have multiple or recursive references. Regular cache replication has no way of managing this relationship (when failing over, for example, and as a result, demands developer intervention). But TreeCacheAop can manage this automatically.

      3. (Optional) Use of CacheLoader +CacheAop to provide state persistency. Some state data may need to guarantee persistency so it will be less expensive to reconstruct it. This can be either an individual or shared cache loader.

      So far, an example that I can think of is in the line of PIM (Personal Information Management).

      Let's say I need to keep track of a list of company employees. Each employee has the following fields:

      - Company address
      - Home address
      - Personal relationship (spouse, relative, friend)
      - Work relationship (boss, subordinate)

      So if I only change Joe's wife's age (in this case, Mary in another company), for example, I have a fine-grained replication scenario inside a huge list and fair size object.

      In addition, when replicated, the relationship is perserved automatically. Meaning, you only update it one place, and the Joe/Mary spousal relationship is preserved on the replicated node (this is good, right? :-).

      Do you better ideas or can you enhance this?

      Post it here or email me benwang at jboss dot com.

        • 1. Re: TreeCacheAop needs your idea
          mranga Newbie


          There are various ways in which to reduce network traffic. One such way that is commonly used is code shipping.

          Using AOP, watch each cached object. Say you update a data value in a cache dobject. You can generate some code that makes the updates in the same order on all the replicated nodes and keep these in a buffer. So if I modify say a.b in a cached object in my application, generate code that does the same update on all copies of the cached object. Just ship the code around. You can then apply the diffs on the cached copies or run the shipped code on the cached copies when the tx commits.

          I dont know if there are any gotcha's with this WDYT?