5 Replies Latest reply on May 7, 2003 2:15 PM by marc.fleury

    EJB-centric versus MBean-centric?

    arabinow

      We are designing a distributed system, based on JBoss, with a server as a heart of the system, and MBeans on the remote nodes (which are several thousand computers outside of the cetral location).
      A traditional approach is to use EJBs on the server, and call MBeans from them, having a lot of business logic on the server in EJBs, and leaving just atomic operations on MBeans.
      Another approach is to decentralize the system by moving business logic from EJB's to MBeans in order to maximize the power of the system by using remote nodes CPUs to solve problems. The server will just handle JMS communications between the remote node MBeans.

      What is a better approach? What would you recommend?

        • 1. Re: EJB-centric versus MBean-centric?
          marc.fleury

          do what I do, whent it is all pretty much the same so you need to
          1- ask yourself if you prefer it in blue or red
          2- ask yourself which one you prefer
          3- flip a coin

          • 2. Re: EJB-centric versus MBean-centric?
            hezekiel

            Several thousand computers? Depending on what you are trying to achieve jini and javaspaces could also be one possibility.

            If it is a layered client-server architechture, my coin would flip on J2EE side. If it's more like 'real distributed' system - many computers solving the same problem or something like that - javaspaces would give you an easy access to 'shared process space' between all those computers.

            • 3. Re: EJB-centric versus MBean-centric?
              marc.fleury

              the client server nature is just an aspect of EJB, if you are using a proxy.

              The main point is that it would give the gentlemen a clean component model (mbean) and the way invocations are carried is through the invokers

              the point of shared data space is what we are doing with the Cache implementation and would in fact achieve the replication of information you are looking for

              • 4. Re: EJB-centric versus MBean-centric?
                davidjencks

                AFAIK javaspaces give you a more flexible approach to distributed computing than anything available in j2ee or jboss. You do have to do more work yourself in a jini environment than a j2ee environment with managing transactions, security, etc.

                For a long time I've thought bringing the models together would be a good idea. I started a javaspaces jca connector (its available as a patch): now that jca 1.5 is more or less available it could be extended to deliver messages via javaspaces "take".

                • 5. Re: EJB-centric versus MBean-centric?
                  marc.fleury

                  I am not familiar with javaspaces that much but from what I remember we were talking about RMI and distributed access

                  The advantage of the MBean/AOP replication approach is that we can maintain local copies of the data to work upon and apply various levels of isolation depending on the type of data and usage you do of it