5 Replies Latest reply on Jan 8, 2008 1:42 AM by Bruce Snyder

    SMX VM Optimization

    Patrick Mulligan Newbie

      Is there any VM optimization when passing messages that the SMX implementation make use of?

       

      The spec specifies the semantic ownership of MEs when performing the MEPs.  But, are there any optimizations that happen with references within the VM?

        • 1. Re: SMX VM Optimization
          Bruce Snyder Novice

           

          Is there any VM optimization when passing messages that the SMX implementation make use of?

           

          The spec specifies the semantic ownership of MEs when performing the MEPs. But, are there any optimizations that happen with references within the VM?

           

           

          When you say VM optimizations, that makes me think of JVM tuning via command line options to the JVM. Is this what you're referring to here? It doesn't sound like it. References within the VM - please clarify as I don't follow.

           

          Bruce

          • 2. Re: SMX VM Optimization
            rg64 Newbie

            I believe Patrick is referring to potential message passing optimizations the container might apply between in-vm components. Under specific circumstances, does ServiceMix ever apply optimizations like those typically performed by J2EE app servers for remote method invocations on local session beans? Here, some app servers can be configured to pass the method parameters by reference to avoid serialization overhead. In ServiceMix with a JMSFlow configured, if one CXF-SE service invokes another CXF-SE service co-located in the same vm, could the container be configured to perform a direct method invocation rather than sending a message from the one service to the other over a JMS queue?

             

            Let me know if you need add'l explanation.

             

            Thanks,

             

            - Ron

            • 3. Re: SMX VM Optimization
              Bruce Snyder Novice

               

              I believe Patrick is referring to potential message passing optimizations the container might apply between in-vm components. Under specific circumstances, does ServiceMix ever apply optimizations like those typically performed by J2EE app servers for remote method invocations on local session beans? Here, some app servers can be configured to pass the method parameters by reference to avoid serialization overhead. In ServiceMix with a JMSFlow configured, if one CXF-SE service invokes another CXF-SE service co-located in the same vm, could the container be configured to perform a direct method invocation rather than sending a message from the one service to the other over a JMS queue?

               

               

              If the services are located in the same ServiceMix instance then no remoting is needed and the NMR uses the SEDA flow. The JMS flow is only used when remoting is necessary from one ServiceMix instance to another.

               

              Bruce

              • 4. Re: SMX VM Optimization
                Patrick Mulligan Newbie

                Hi Bruce,

                 

                Based on the fract that SEDA uses the java.concurrent.quueus, and no AMQ/JMS queues, that would mean that the ME's are still passed via queues (per the spec rules or ME ownership).  So the final answer here is the mazimum optiimazation available is controlled via java.util.concurrent.

                 

                This would assume that a full ME is placed into these internal VM queues versus a reference to an ME correct?

                 

                Edited by: pmmulligan on Jan 4, 2008 2:09 PM

                • 5. Re: SMX VM Optimization
                  Bruce Snyder Novice

                  Instead of reading the JBI spec and assuming the implemention in ServiceMix, you should really just look at the code for the SedaFlow and the SedaQueue to see how they work. Then take a look at how they're used by the rest of the code base.

                   

                  Bruce