1 Reply Latest reply on Apr 25, 2005 10:21 PM by Ben Wang

    TreeCache Structure

    Lakshmi Anantharaman Newbie

      Planning on using Jcache for handling temporary user cache. I have build a small model that is working right now.

      One of the concerns I have is, does the structure of the tree in any way contribute to the effectiveness of the cache.

      Another issue is with scaling . I have about 25000 users on 6 weblogic instances. Each user will have a node with atleast 50 or more child nodes

      This is a sample structure.

      - user/A/X/aa/ (Data) user/A/X/bb/ (Data) user/A/X/cc/ (Data)
      user/B/Y/aa (Data)
      user/C/Z/bb (Data)

      - user1/A/X/aa/ (Data) user1/A/X/bb/ (Data) user1/A/X/cc/ (Data)
      user1/B/Y/aa (Data)
      user1/C/Z/bb (Data)

      This is how I am expecting the cache to grow. There are atleast 5 different values in the second level node , the third level can grow without any limit and at the fourth level we have a data tied to each node. As in (user/A/X/aa (Data) user/A/X/bb (Data) user/A/X/cc (Data)).
      Here is my dilemma. Will changing this structure to three nodes instead
      of four and having data in there as key-value items in that node bring any additional performance improvement to the cache. What I am suggesting is user1/A/X/ -( Data aa/value) instead of
      user1/A/X/aa/ (Data key/value)


      Is there any limit on max nodes and how to configure memory for this app.

      We could also easily change the tree cache structure to A/User/X but this way we are not able to clean our back end tables at login logout.

      We expect the LRU default eviction of one minute to clean out the cache for us and improve performace compared to the system that is currently saving and retrieve user state data from the separate table.

      Thanks,
      I would appreciate any input .
      Lakshmi

        • 1. Re: TreeCache Structure
          Ben Wang Master

          Lakshmi,

          This post does not relate to design of JBossCache. So I will move it to user forum shortly.

          To answer some of you questions:

          1. Tree cache structure has implication on concurrency and locking. Currently the isolation level/locking is applied on per node basis. So if you have finer node, the concurrency can be better (but more cache overhead).

          2. To limit the memory, you can configure different region of the data such that /X and /X/Y can be different regions, for example.

          -Ben