[jboss-dev-forums] [Design of JBoss Remoting, Unified Invokers] - Extracting load balancing classes from AS cluster module for

bstansberry@jboss.com do-not-reply at jboss.com
Sun Aug 20 16:09:31 EDT 2006


Opening a forum thread for discussions of http://jira.jboss.com/jira/browse/JBCLUSTER-137

First fundamental issue is the dependencies that the LoadBalancePolicy interface brings with it:

1) public void init (HARMIClient father);

This method is only used by HARMIClient (which in the AS itself is only used by HA-JNDI, and JBREM-424 will probably make that go away.)  This method is implemented as a no-op in all the LoadBalancePolicy impls the AS ships with.

My inclination here is to remove this method from the interface we extract from the AS code, and leave a subinterface in the AS cluster module that includes this method.

2) public Object chooseTarget (FamilyClusterInfo clusterFamily);

This is the only method that any of our implementation classes actually implement.

Issue here is dependence on FamilyClusterInfo. Presence of this interface in the API means we need to continue to use it, or break existing custom LoadBalancePolicy impls that users may have.  That would make migrating to AS 5 harder.

Tom/Ron, how do you see FamilyClusterInfo fitting into what you want to do with failover in Remoting?

3) public Object chooseTarget (FamilyClusterInfo clusterFamily, Invocation routingDecision);

The overloaded Invocation param is not actually used in any of std LoadBalancePolicy impls.  However, it *is called* by all the detached invoker HAProxy impls.  The ClusterChooserInterceptor used by EJB3 does not call this method.

Again, I'd prefer not to break existing custom policies.  If necessary, I could add this method to the AS-specific subinterface discussed above for the init() method.  But, http://jira.jboss.com/jira/browse/JBREM-385 discusses moving all the old detached invoker stuff into Remoting, so keeping it in the main interface probably makes more sense.

The problem there is you get a circular dependency -- cluster project LoadBalancePolicy depends on Invocation class from a Remoting jar; Remoting depends on LoadBalancePolicy for HA features.  A solution is to move the load balance policies into Remoting as well, but then they pull FamilyClusterInfo with them.  (FamilyClusterInfo does not bring any further dependencies.)

Thoughts?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966341#3966341

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966341



More information about the jboss-dev-forums mailing list