7 Replies Latest reply on Nov 12, 2007 8:23 AM by manik

    Can JBossCache scale in such case

    yaumunlam

      Hi,

      we are developing an Eclipse 3.3 RCP application with Spring 2 and Hibernate JPA 3.

      In case of the ticket sales system for the Olympics
      http://news.bbc.co.uk/2/hi/asia-pacific/7070446.stm
      , can JBossCache handle this in theory?

      Thanks,

      Yau.

        • 1. Re: Can JBossCache scale in such case
          manik

          Hi,

          yes, depending on your system architecture. Basically using JBoss Cache as a 2nd level cache for Hibernate will mean that you reduce strain on your database backend, if that is in fact your bottleneck. If your bottleneck is elsewhere, e.g., in rendering parts of your application, depending on your specific logic JBoss Cache can potentially help here as well.

          In terms of handling that kind of load (the article mentions 200k hits per second on a website) again, depending on your server hardware and architecture, you can build a cluster using JBoss Cache to cope with this.

          Hope this helps.

          - Manik

          • 2. Re: Can JBossCache scale in such case
            yaumunlam

            Hi,

            thanks, but in http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheHibernateTransactionsStandaloneExample

            NOTE: In spite of the example working, transaction management is not working appropriately when it comes to both Hibernate and JBossCache participating of the same transaction. We're working to resolve this issue and provide a new version of this example.


            Have it been resolved? What's the problem?

            Besides, i've successfully integrated Cayenne 1.4.1.SP6, but have problem on @Transient field because i want to use it as a lock to indicate an object is in used, is it possible to tell JBossCache also transfer @Transient field?


            Thanks,

            Yau.

            • 3. Re: Can JBossCache scale in such case
              manik

              By definition a @Transient field will not get serialized/streamed. If you are using it as a lock to synchronise on, that lock would only be valid on a single JVM.

              Regarding the issue with JBoss Cache, Hibernate and JBoss Transactions, this is to do with Hibernate using a transaction manager outside of an app server. If you are using this combination within a Java EE app server you should be fine.

              • 4. Re: Can JBossCache scale in such case
                yaumunlam

                So, it is not possible to stream @Transient field across JVMs?

                The issue with JBoss Cache, Hibernate and JBoss Transactions without a Java EE app server still have problem?

                Any chance i can hack them all?

                Thanks,

                Yau.

                • 5. Re: Can JBossCache scale in such case
                  manik

                  Take a guess - what do you thnik @Transient means? :-) anything with this attrib will *not* be seralized when you use an ObjectOutputStrean to generate a byte stream to transmit on a network!

                  Re: the Hibernate/JTA issue, note that the wiki page has been updated. Sure you can hack them to work together all it needs is a bit if glue code... !

                  • 6. Re: Can JBossCache scale in such case
                    yaumunlam

                    Of course, i know what does @Transient means in a single JVM, but how about cluster wide @Transient across JVMs?

                    Can u point me where to hack first?

                    For the Hibernate/JTA issue, there seems no problem for me to make JTA works.

                    Thanks,

                    Yau.

                    • 7. Re: Can JBossCache scale in such case
                      manik

                      JBoss Cache uses a standard ObjectOutputStream to write your objects to a byte stream.

                      If your class implements Externalizable instead of Serializable, you can implement writeExternal() and readExternal() to stream your class the way you want it.