5 Replies Latest reply on May 21, 2012 5:20 AM by sudheerk84

    Google Porotbuf Vs Jboss serialization for Infinispan

    sudheerk84

      As part of the optimization i am lookign at options to speed up our cache replication.

       

      Doesn any one have any expereinces to share with integhration infispan with protbuf ?  Or any comparison with  protobuff ?

       

      We use infinispan basically as a second level cache similar to hibernate and feel , thrs quite to optimize with marshelling and un marshelling.

        • 1. Re: Google Porotbuf Vs Jboss serialization for Infinispan
          sannegrinovero

          Hi,

          JBoss Marshalling is very fast, lean and efficient; also it works correctly in environments with multiple/modular classloaders.

           

          JBMAR is aiming Java only, while Protocol Buffers aims at language-neutrality; that's pretty cool but we don't need it and that feature definitely impacts performance, so actually comparing them would be unfair for ProtoBuf

           

          In fact JBMar are more of a stremlined set of helpers to correctly manage the streams; personally I love it because for each type it's easy for me to define how I want it wire-encoded: do you define your custom Externalizers?

           

          Custom Externalizers are the way to go for top performance ..

          1 of 1 people found this helpful
          • 2. Re: Google Porotbuf Vs Jboss serialization for Infinispan
            sudheerk84

            We are only looking for Java. So if i understand right  JBMAR performance would be better than protobuff.

             

            Basically our entities have datatypes like Dates , BigDecimals. Strings, Longs and Enums.

             

            Currently we do use the default java serialization. As part of out optimization phase we were looking at other custom serialzation options like custom eternalizers, jboss marshelling and protobuff.

            • 3. Re: Google Porotbuf Vs Jboss serialization for Infinispan
              sudheerk84

              You were very right in your prediction .

               

              I tried for one of our entities  and i see the follwing results

               

              Java serialization - 1127 bytes

              JBoss Serialization - 1125 byts

              Extrenalizable - 999 bytes  -   (Close to 10% less payload)

               

              Just publishing if any1 woudl benefit.

               

              Thanks

              • 4. Re: Google Porotbuf Vs Jboss serialization for Infinispan
                sannegrinovero

                The more your object get complex, the bigger the difference you would see. Also I think it's very welcome to separate the Externalizer definition from the class, as it make it easier to update the class without breaking the compatibility with the binary stream.

                 

                Did you try converting the same using protobuff?

                • 5. Re: Google Porotbuf Vs Jboss serialization for Infinispan
                  sudheerk84

                  Yes we are planning to seperate it out from the class definition as explained in the documentation.

                   

                  I have not tried protobuff, with teh assumption that externalization woudl be the best option :-)