6 Replies Latest reply on Apr 5, 2011 6:14 AM by Thomas Fuller

    [ANN] Grails Plugin for Infinispan version 0.4.0 released today!

    Thomas Fuller Newbie

      Hi Folks,

       

      The Grails Plugin for the Infinispan distributed cache version 0.4.0 has been released today.

       

      Feel free to follow the official Grails Infinispan Plugin account on Twitter for announcements.

       

      This release delivers:

      *
      New mixins that allow the developer to do the following:

       

          def results = agentCache.query (Agent.class, "weapon", "gun")

          results.each { println "it: $it" }

       

      and

       

          testCache.transactionally {

              testCache.remove (DEFAULT_KEY)

          }

       

      and

       

          agentCache.onCacheEntryActivated {

              // ...Handle event.

          }

       

      Note that we have listeners for the cache manager as well.

       

      * An enhanced DSL -- for example:

       

      register {

          cacheManager {

              named "matrixCacheManager"

                  configured {

                      externally {

                          using "grails-app/conf/infinispan/workingQuery.xml"

                      }

                  }

              caches "agentCache", "illinoisCitiesCache"

          }

          queryHelper {

              named "agentQueryHelper"

              referencing "agentCache"

              properties "hibernate.search.default.directory_provider" : "org.hibernate.search.store.RAMDirectoryProvider"

              classes infinispantestapp.Agent, infinispantestapp.SuperHero

          }

      }

       

      * Additional unit testing (84 in total).

       

      * Additional error checking.

       

      Note that we've changed the license from the Apache license to the LGPL so that the plugin license matches the Infinispan license.

       

      The web page for this plugin can be found here: http://www.grails.org/plugin/infinispan.

       

      Looking forward we intend to isolate a subsection of the plugin and make it available in a single jar. The next step after this is to make this available via Grape so that developers can use the Groovy enhancements in scripts which do not require Grails.

       

      Please let me know if you have any questions or recommendations for improvements.

       

      Tom

        • 1. [ANN] Grails Plugin for Infinispan version 0.4.0 released today!
          Sanne Grinovero Master

          Hi Tom, I'm not a Grails expert, but it looks very nice! A little warning, we're finally dedicating some time to polish the Query API, hopefully already in 5.0.0.Beta1 you won't need the queryHelper anymore, and soon we'll expose many other query options. (the "basicQuery" is a bit like a toy ). Let me know how we can create the best API ;)

          • 2. [ANN] Grails Plugin for Infinispan version 0.4.0 released today!
            Thomas Fuller Newbie

            Hi Sanne,

             

            Thanks for the compliment. I'm aware that the queryHelper will no longer be needed with Infinispan v. 5.0 -- in fact I spoke with Manik on this forum about this in the past.

             

            I look forward to the new enhancements and I'm deliberately holding off on implementing them before Infinispan 5 goes to GA.

             

            I'll definitely come back to you with questions and suggestions regarding the API and, likewise, feel free to come back to me with ideas as I'm very happy to listen.

             

            Best,

             

            Tom

            • 3. [ANN] Grails Plugin for Infinispan version 0.4.0 released today!
              Sanne Grinovero Master

              Hi Tom, in the last Infinispan 5 (Alpha4) the QueryHelper was removed already. I'm going to add more methods to provide better search API soon, but I guess you can start removing the references to the QueryHelper at all. Please refer to the unit tests to see how to create a Query now, it's quite simple I just removed some needed steps - blog coming when the final API is ready.

              • 4. [ANN] Grails Plugin for Infinispan version 0.4.0 released today!
                Thomas Fuller Newbie

                Hi Sanne,

                 

                Thanks for the heads-up -- I'll take a look and start planning the changes.

                 

                Best,

                 

                Tom

                • 5. [ANN] Grails Plugin for Infinispan version 0.4.0 released today!
                  Sanne Grinovero Master

                  Hi Thomas,

                  as you know the Query API in v.4 was meant as a technology preview, nothing final.

                  We need to stabilize it soon, and I whish to change:

                  - all service names (QueryFactory -> SearchManager, SearchProvider, GridSearcher, TheGridReaper? )

                  - removing the method org.infinispan.query.QueryFactory.getBasicQuery(String, String) and it's overloaded peers, only getQuery(Query luceneQuery, Class<?>... classes) should be used.

                   

                  Using a Lucene Query is far more powerfull, if you think in the scope of your plugin it makes sense to have the simpler method you'll have to move the QueryParser code in the plugin.

                   

                  If you really need some slow deprecation->removal phase, please warn me. But I hope you don't I think it's important we remove the old methods quickly.

                  There's a thread going on on the mailing list, feel free to join there.

                  • 6. Re: [ANN] Grails Plugin for Infinispan version 0.4.0 released today!
                    Thomas Fuller Newbie

                    Hi Sanne,

                     

                    Regarding your comments above:

                     

                    - all service names (QueryFactory -> SearchManager, SearchProvider, GridSearcher, TheGridReaper? )

                     

                    This should be easy enough to do -- maybe SearchProvider (as above), SearchFactory, GridQuery. Or you could keep QueryFactory, but put it in another package and then deprecate the old QueryFactory aggressively (?).

                     

                    Let me know once this part of Infinispan has stabalized and I'll start looking into what changes need to be made.

                     

                    - removing the method org.infinispan.query.QueryFactory.getBasicQuery(String, String) and it's overloaded peers, only getQuery(Query luceneQuery, Class<?>... classes) should be used.

                     

                    This I can take care of almost immediately.

                     

                    If you really need some slow deprecation->removal phase, please warn me.

                     

                    This is not a problem.

                     

                    Tom