5 Replies Latest reply on Aug 3, 2010 7:41 AM by galder.zamarreno

    Infinispan hybrid distributed cache (data grid)?

    feci

      Hi,

       

      I want to set up create distributed hybrid cache using infinispan. Whats the easiest way?

      I was thinking about creating own loaders for the hot rod server, but maybe It's not the best way.

       

      I want to have cluster of cache worker nodes, where every node is connected to one single storage space - e.g. file system (I think you call it shared).

      I will have tens of clients, which will need the data, so they will request the data from cache cluster, and if the data is in one of their nodes, it returns it, if not, the data are loaded to cache through customized loader, put to chache and send to client...

        • 1. Re: Infinispan hybrid distributed cache (data grid)?
          feci

          too weird use case? :-)

          or there is no one, who can give me simple answer?

          • 2. Re: Infinispan hybrid distributed cache (data grid)?
            manik

            Not sure if I understand what you mean by Hybrid. 

             

            I presume you want a client tier which connects to a remote data grid tier?  So your client tier could use RemoteCache instances (Hot Rod client library), ad the remote data grid nodes could each be running a Hot Rod server.  The remote grid nodes would also be configured to use distribution + a cache store to spill over to disk.  Is this what you had in mind?

            • 3. Re: Infinispan hybrid distributed cache (data grid)?
              feci

              By hybrid I mean, that if the cache will be requested for data, it returns the data no matter what. I mean it returns it even when the data are not in memory, or it's persistent storage. The cache will also retrieve data from some datasource. Let say TeraBytes of flat files, from which it will read.

               

              Let say I have stock price data, terabytes of them. I will not use RDBMS, or some key value store, as I can implement reading of time series data more efficiently. So I was thinking about creating own cache loader and combine it with cache solution.

               

              If client requests data, if they are in memory, they will be returned, if not, loader loads them to memory and returns to client...

               

              And I want to have contgrol over cache instances in a way, that I want to embed it in my cluster app. Is hot rod embeddable?

              • 4. Re: Infinispan hybrid distributed cache (data grid)?
                manik

                Yes, you can write your own custom cache store.

                 

                If you need the cache to be embedded, then don't use Hot Rod - just use the Cache and CacheManager API classes directly from your code - much simpler!

                • 5. Re: Infinispan hybrid distributed cache (data grid)?
                  galder.zamarreno

                  Following on what Manik said, you might wanna have a read to http://community.jboss.org/docs/DOC-15557