4 Replies Latest reply on Aug 16, 2016 10:38 AM by sreeramkosaraju

    Infinispan persistence

    sreeramkosaraju

      Dear Community,

       

      I am running a java application on wildfly 9 using Infinispan 7.2.3 with 2 replicated nodes in asyncmode.

      I wanted to add persist my cache into Berkeley DB.

       

      But, I read that Infinispan 7.x does not support Berkeley DB and I do not see the class loaders associated with it.

      Do I have any alternatives?

       

      Also, I want my persistence to be replicated so as to avoid a single point of failure.

      Can this be achieved?

       

      Plz advice.

       

      Thanks,

      SK.

        • 1. Re: Infinispan persistence
          rvansa

          The closest alternative would probably be LevelDB, as a mature K/V DB where Infinispan provides just a thin adaptation layer. We also consider RocksDB (fork of LevelDB), but this has not been tested yet. Infinispan has also two its own cachestores, the Single File Store (chose this one if you can hold all keys in memory) or Soft Index File Store.

           

          Why do you want to chose Berkley DB?

           

          Cache loader/store SPI is quite narrow; writing your own cache store is not a complex task. You can take LevelDB as a template.

          • 2. Re: Infinispan persistence
            sreeramkosaraju

            I have considered the Single File Store. But if the node which contains the single file store goes down, I cannot recover from the other..

            I believe file based cache stores are not replicated and cannot be shared.

             

            My client application should be able to run on single node too.

             

            The reason we chose Berkeley DB is that we are running it within the organization and we wanted to leverage the same resources.

            I will take a look at the Cache loader/store SPI..

             

            Thanks much.

            SK

            • 3. Re: Infinispan persistence
              rvansa

              IIUC BerkleyDB is embedded DB, so it's not shared either. The idea is that through replicated mode you keep the in-memory and on-disk data in sync (though not always, with async replication), and if one node crashes the other has all the data.

               

              True, if there's single node and this crashes, current stores don't guarantee recovery (local stores are meant to offload memory to disk, not guarantee consistency). Haven't checked if BerkleyDB offers consistent state even after failure.

              • 4. Re: Infinispan persistence
                sreeramkosaraju

                Is LevelDB replicated? I cannot find this info in the documentation.

                If it is, I might consider LevelDB.

                 

                If not, Can you please let me know what K,V based cache stores are supported with infinispan 7.2?