Remote MBean discovery, deployment in JMX spec 1.5
rwvanderlaan Jul 9, 2002 8:24 AMHello there,
I have some questions regarding future directions of JBossMX. Soon the JMX 1.5 specification will be out for public review and will taeckle issues like discovery of remote MBeans, unique identification of remote MBeans, remote event handling, deployment and more.
Does the JBossMX team have any knowledge about the impact of the new specification on the current JBossMX implementation?
Our company wants to prototype a distributed system using JBossMX. It has a gateway topology with one central control node running full JBoss. Furthermore it has several processing nodes, like advanced motion controllers and number crunchers, these all using a lightweight JMX implementation like JBossMX.
Because of the distributed design of the system we need to overcome some shortcomings of the current JMX spec. We need a publishment and discovery mechanism for remote MBeans. Therefore we will use Jini as the underlying discovery protocol. A special MBeanRegistry bean will be equiped for this task. Furthermore we need a remote MBean deployment/instantiation and a remote event notification mechanism. We could use the MBeanServer RMI connector for all this, but there are some issues regarding the
design we need.
In order to create transparency in the location awareness of MBeans, a MBean event subscriber should lookup the broadcaster MBean using its local MBeanServer. Then it should add itself as a listener to the broadcaster MBean. Using the RMI connector a MBean could register itself as listener (the RMI connector incorporates the handling of remote MBean events), but this way the MBean has to know on which remote MBeanServer the broadcaster resides. This violates our location transparency. Furthermore the RMI connector implements a simple model for remote event notification. We would like to have a lease based subscription model with certain retry strategies for remote exceptions etcetera. The RMI connector might only be useful for remote instantiation of MBeans on our processing nodes. This because during this scenario there is knowledge about the location of the remote MBeanServer (this either e.g. using hostname or a description on a higher meta level).
My idea (and I remember that Rickard Oberg also went this direction) is to implement a MBean for remote discovery and publishment of MBeans. I would like to dynamically generate MBean proxies that will live on every connected node.
Then I might move the whole remote event notification part to the proxies. For MBeans implementing the broadcaster interface I will generate special broadcaster proxies. These proxies will handle calls for event subscriptions. They will keep track of subscribed listeners and will remotely export an object that will be later used as a callback mechanism to inform the local listeners. The remoteref of the exported object will be passed to the backend implementation of the proxy. There all remoterefs are kept (for event multiplexing). On the backend a surrogate eventlistener is subscribed to the real broadcaster MBean implementation. When the broadcaster notifies the surrogate listener, the listener
will pass the event to the earlier described callback handler (this in a thread decoupled way). The callback handler will inform every subcribed listener.
These are all ideas. Hopefully there are people that like to discuss more on these topics. Maybe if the JBoss team already has knowledge about the contents of the next JMX specification, they can clear some things up.
From 14-7 till 5-8 I will be unable to reply due to my holidays.
Kind regards,
Richard van der Laan / [L]uminis
Email : richard.vanderlaan@luminis.nl