2 Replies Latest reply on Jul 11, 2011 12:46 PM by Raúl Raja Martínez

    Clustered Lucene Cache Loader

    Raúl Raja Martínez Newbie

      I have a Hibernate application that uses infinispan for the 2nd Level Cache and the Hibernate-Search integration.

      Currently I'm using a File cache loader to store the cache for the lucene indexes on the HD. I want to avoid doing this and I am considering using either the Cassandra Cache Store or any Store that would store the cache in a DB via JDBC.

       

      I'm concerned about performance and scalability in both cases and I'd like some advice in the following questions.

       

      1. Is there a aout of the box JDBC Cache loader and if so is this a better approach than using a Lucene JDBC directory?

      2. What is the advantage or disadvantages of using Cassandra as cache store vs JDBC.

       

      My ultimate goal is not rely on the FS to store the cache and since my Lucene Directory. Also worth mentioning my Lucene directory is about 3 gb at this time.

       

      Thanks! and any advice and help are highly appreciated.

        • 1. Re: Clustered Lucene Cache Loader
          Sanne Grinovero Master

          Hi,

           

          1. Is there a aout of the box JDBC Cache loader and if so is this a better approach than using a Lucene JDBC directory?

          I'm likely not undersanding the question, as in the other thread you seem well aware of the JdbcStringBasedCacheStore. Do you mean a different kind of "out of the box" ? In that case I think the answer is no, but please clarify what you would have liked to have so we might consider making it.

           

          2. What is the advantage or disadvantages of using Cassandra as cache store vs JDBC.

          I'm not an expert on Cassandra. In my opinion they are both a good fit for this purpose, as usually the indexes are order of magnitude smaller than the database they're related to.

           

          Cassandra might scale better/be a better fit if you're having an extreme high load or huge index, still it requires you to configure and setup Cassandra, and likely you'll need some experience with it as it's not really a small toy, while if you have Hibernate around I'm going to assume you have a rock stable and simple JDBC database already so it should be easier to setup and backup, and you'll have one less service to monitor and keep alive.

          • 2. Re: Clustered Lucene Cache Loader
            Raúl Raja Martínez Newbie

            Thanks Sanne, I'm giving a go to JdbcStringBasedCacheStore. I posted this question before that other one where you had already helped me with it.