2 Replies Latest reply on Jan 14, 2009 7:35 AM by ollip

    Remotely accessing JBossCache instance

      Hello,

      I need to access the JBossCache instance used by my application from several clients running in different VMs and different machines. Is there a way these clients can access the JBossCache instance through JGroups? Just some idea as I read that JBossCache for clustering makes use of JGroups. I want to check out whether I need to write my own RMI/JMS/whatever solution to make clients communicate with the central JBossCache instance beyond VM boundaries or whether I can re-use the JBossCache internal transport layer based on JGroups for this.

      Thanks, Oliver

        • 1. Re: Remotely accessing JBossCache instance
          manik

          JBC is a p2p based cache, and there is no client-server module as such (at least not at the moment).

          However, there is something you can do: use the TcpDelegatingCacheLoader. Set up cache instances on each VM, as a "light" front-cache, with an aggressive eviction policy so it doesn't impact memory usage on the client VMs much, and these should also be configured with a TcpDelegatingCacheLoader that points to a central, dedicated cache instance fronted by a TcpCacheServer.

          Provided, of course, that is what you are trying to achieve. :)

          • 2. Re: Remotely accessing JBossCache instance

            Oops. This is nice. Spares me from having to set up my own JTA transactions (to span both JMS and JBC) and I get improved performance through local caching as well ;-). I'm thinking of adding a Linda-style frontend to JBC similar to JavaSpaces. Will be a spare time effort. So I will have to see how far I get within reasonable time. But I guess it will be fun.

            Thanks, Oliver