12 Replies Latest reply on Mar 14, 2008 8:13 AM by manik

    JBOSS Cache vs Gigaspaces

    mthoresen

      I would like to know if jboss cache would be suitable for the following. We have a view that returns a very large recordset. It can take up to 2-3 minutes for the data to actually be pulled from our DB to our client app. Can jboss cache be used to store this data in a central location that N number of clients can access? The cache would need to always be available. Also, is it possible to keep the cache current when new records, and or edits are made, and then broadcast these changes to our users? I am new at using cache managers and just want to know if this scenario would work with jboss cache? Much thanks.

        • 1. Re: JBOSS Cache vs Gigaspaces
          genman

          Why don't you play with the demo and check out the code?

          http://jbosscache.blogspot.com/2008/01/gui-demo-for-jboss-cache.html

          I've never used Gigaspaces but looking at the documentation it seems to have a different "feel" than importing a .jar file and working with configuration keys.

          • 2. Re: JBOSS Cache vs Gigaspaces
            manik

            Look at how Hibernate uses JBoss Cache. Sounds like the same scenario.

            Who owns the data in your database? I.e., is it only edited/updated by your application that caches the data, or can it be edited/updated by an external process?

            • 3. Re: JBOSS Cache vs Gigaspaces
              mthoresen

              All data is in my own schema. However, it is populated and maintained by another external process (besides our current client application as well). We have a service that currently monitors, what we call an audit table. When rows are added to this audit table, certain triggers are fired depending on weather it is an edit, or insert type of audit. Inserts will create new entries into our schema, and edits will update the existing data in our schema. Our client app updates and maintains our schema directly, but for only edit purposes.

              So, when these inserts are done, we would also like to create that new record in the cache, and have our clients apps updated as well. Currently, this is done by client JMS subscriptions. Same as the edits.

              • 4. Re: JBOSS Cache vs Gigaspaces
                bahata

                Hi
                I tried Gigaspace , ehcache, jboss pojo cache and some other caching solutions to find out which one was more suitable to my appliction.

                Atlast I sticked to JBoss pojo cache because:
                1) Hibernate was used in our project as ORM , and we loaded all the data
                from DB using hibernate association so that the internal object references were maintained . But GIGASPACE DOES NOT SUPPORT HIBERNATE ASSOCIATION to maintain the object graph unless you use it as hibernate second level cache.
                2) Also it does not support : object graph maintenance through object reference (if I am not wrong). UID is used to recreate the object references if needed, through transient objects

                If you do not have hibernate in your application ,or do not have complex objects, (none of your non-primitive object refers to another non-primitive object , which is quite unlikely), you can go for gigaspace.
                The good things with Gigaspace is that it supports partitioning, master-local topology ,and various other features.

                JBoss pojo cache is good in the sense that it supports maintaining the complex object graph with less effort.

                • 5. Re: JBOSS Cache vs Gigaspaces
                  mthoresen

                  In either case though, how would I accomplish the following:

                  Our client application will be written in C# (visual studio), and utilize the devexpress grid. Using GigaSpaces, I believe that they have APIs for C# .NET. Using JBOSSCache, what would be the best approach to populate the Data Grid?

                  • 6. Re: JBOSS Cache vs Gigaspaces
                    zurchman

                    JBossCache is a distributed cache and can handle your requirements. If the cache is updated, the peer caches are notified. It seems that your triggers could be used to update the cache.

                    Gigaspaces is based on JINI and might offer more flexibility if you have tens or hundreds of distributed nodes.

                    • 7. Re: JBOSS Cache vs Gigaspaces
                      manik

                       

                      "zurchman" wrote:

                      Gigaspaces is based on JINI and might offer more flexibility if you have tens or hundreds of distributed nodes.


                      JBoss Cache can scale to tens of nodes, I know of users using it on cluster sizes > 100 nodes too. The goal - with 3.x - is to scale to several hundred nodes.


                      • 8. Re: JBOSS Cache vs Gigaspaces
                        manik

                         

                        "MThoresen" wrote:
                        In either case though, how would I accomplish the following:

                        Our client application will be written in C# (visual studio), and utilize the devexpress grid. Using GigaSpaces, I believe that they have APIs for C# .NET. Using JBOSSCache, what would be the best approach to populate the Data Grid?


                        Sadly, we don't have any language bindings for anything other than Java. People have tried a few different approaches though, including wrapping JBC as a CORBA service or using GCJ for native compilation (for access from C/C++) or using IKVM for compiling JBoss Cache to .NET.

                        Certainly not something we support here, but if you do give it a try, I'd love to hear how you get on! :-)

                        • 9. Re: JBOSS Cache vs Gigaspaces
                          mthoresen

                          So, I have a Cache (JBOSS) that is filled with nRows.

                          Now, the problem is to get this data into some format that can populate a .NET Grid on a windows front end app. Is it possible to have a WS that can make a call and return the data in XML format?

                          • 10. Re: JBOSS Cache vs Gigaspaces
                            manik

                            If you have a wrapper that exposes JBC as a WS, then sure. :-)

                            • 11. Re: JBOSS Cache vs Gigaspaces
                              mthoresen

                              Are there certain methods that I can call that will generate this export XML, or do I need to construct it myself? What would be the best approach to do this?

                              • 12. Re: JBOSS Cache vs Gigaspaces
                                manik

                                You need to build a WS wrapper yourself and expose whatever you need to expose.