7 Replies Latest reply on Nov 13, 2002 1:47 PM by hchirino

    Invokers

      The client/server communication should use the invokers.

      This has a number of advantages, including:
      1) The invokers handle the communication layer,
      leaving JMS to handle the messaging layer.
      2) As new invokers are written JMS can use them,
      e.g. the HTTP invoker allows tunneling through firewalls.
      3) Clustering, the HA invokers will automatically give us
      client side clustering support
      4) Local optimization
      5) Decoupling - the JMS server can be redeployed
      without the client having to regain a connection

      Regards,
      Adrian

        • 1. 3858129
          hchirino

          That should work as well.

          • 2. Re: Invokers
            hchirino

            Small problem with that. The current Invoker design only adresses allowing the client to invoke the server.

            JBossMQ has to have the ability to invoke a client. This is how asynch messages get delivered to receiving clients without them having to poll the server for messages.

            Do you think the Invoker design will be updated to include this requirment??

            Regards,
            Hiram

            • 3. Re: Invokers

              Hi Hiram,

              This will only be a problem for bi-directional protocols
              such as nio or plain sockets.

              In general the JMS Server should expect to receive
              a client proxy.
              It does not necessarily use the same physical connection
              or even the same protocol.

              Consider the hypothetical case where a JMS Client is
              behind a firewall.
              It retrieves the http-invoker and contacts the
              servlet with a client proxy that requests delivery
              using e-mail :-)

              From: JBossMQ
              To: Client
              Subject: Pong

              Regards,
              Adrian

              • 4. Re: Invokers

                Yes I know the Pong actually comes back in the
                http response, but it isn't as funny :-)

                Regards,
                Adrian

                • 5. Re: Invokers
                  hchirino

                  That's what the JMS server receives today (a client proxy). Remeber that our JMS server can work with RMI as it's transport.

                  But I'm talking about our invoker architecture: it is tied to JMX which is server side only (currently). So the client proxy will not be able to go though a simmilar inovker system to get back to the client. I'm the kinda guy that like symetry.

                  Regards,
                  Hiram

                  • 6. Re: Invokers

                    The invokers shouldn't be tied to JMX.

                    They work by looking up a target in the Registry
                    and at the moment do a JMX invocation assuming the
                    target is an ObjectName.

                    Object mbeanServer(target, invocation);

                    JMX Decoupling is useful on the server.

                    The target could be an aspect invocation handler,
                    in which case the invoker does

                    Object handler(invocation);

                    This new method in the aspect invocation handler
                    is responsible for adding the new flow/metadata
                    to the already existing invocation.

                    In fact the MBeanServer implementation could have
                    a similiar method to add the extra decoupling.

                    The other JMX aspect of the invokers is the
                    service lifecycle and dependent MBeans.

                    If the invokers are POJOs these JMX aspects can
                    be added on the server and replaced with something
                    else on the client.

                    Should this be in the aspect forum? :-)

                    Regards,
                    Adrian

                    • 7. Re: Invokers

                      Correction of signatures.

                      Object mbeanServer.invoke(target, invocation);

                      Object handler.invoke(invocation);

                      Regards,
                      Adrian