HORNETQ-316 Make cluster discovery pluggable
igarashitm Jan 10, 2011 11:27 AMhttps://issues.jboss.org/browse/HORNETQ-316
http://community.jboss.org/thread/148457
To cluster discovery get work on amazon AWS, we need 2 steps:
- make cluster discovery pluggable and add JGroups discovery plugin
- verify at least the one of GossipRouter, FILE_PING and S3_PING woks fine on amazon AWS
First I'm considering about step-1. Please review my idea.
- classes to add
- org.hornetq.core.cluster.impl.DiscoveryGroupFactory
- : if config has valid "class" attribute, create it. otherwise, create existing DiscoveryGroupImpl
- org.hornetq.core.server.cluster.impl.BroadcastGroupFactory
- : if config has valid "class" attribute for broadcast-group, create it. otherwise, create existing BroadcastGroupImpl
- org.hornetq.integration.discovery.jgroups.JGroupsDiscoveryGroupImpl
- org.hornetq.integration.discovery.jgroups.JGroupsBroadcastGroupImpl
- behavior changes on existing classes
- org.hornetq.core.client.impl.ServerLocatorImpl#initialize() call DiscoveryGroupFactory#createDiscoveryGroup() instaed of call new DiscoveryGroupImpl() directly.
- org.hornetq.core.server.cluster.impl.ClusterManagerImpl#deployBroadcastGroup() call BroadcastGroupFactory#createBroadcastGroup() instead of call new BroadcastGroupImpl() directly.
- hornetq-configuration.xml changes
<broadcast-groups>
<broadcast-group name="my-broadcast-group">
<param key="class" value="org.hornetq.integration.discovery.jgroups.JGroupsBroadcastGroupImpl"/>
<param key="jgroups-channel-name" value="hornetq-discovery"/>
<!-- attributes for BroadcastGroupImpl
<param key="group-address" value="231.7.7.7"/>
<param key="group-port" value="9876"/>
<param key="broadcast-period" value="100"/>
<param key="connector-ref" value="netty-connector"/>
-->
</broadcast-group>
</broadcast-groups>
<discovery-groups>
<discovery-group name="my-discovery-group">
<param key="class" value="org.hornetq.integration.discovery.jgroups.JGroupsDiscoveryGroupImpl"/>
<param key="jgroups-channel-name" value="hornetq-discovery"/>
<!-- attributes for DiscoveryGroupImpl
<param key="group-address" value="231.7.7.7"/>
<param key="group-port" value="9876"/>
<param key="refresh-timeout" value="10000"/>
-->
</discovery-group>
</discovery-groups>
- TODOs
- abstraction of org.hornetq.api.core.DiscoveryGroupConfiguration
- currently, tightly coupled with existing DiscoveryGroupImpl
- consider where to put the jgroups stack configuration for client, and standalone server
- in JBossAS, we can put it in deploy/cluster/jgroups-channelfactory.sar/META-INF/jgrouls-channelfactory-stacks.xml
- abstraction of org.hornetq.api.core.DiscoveryGroupConfiguration
any advice would be appreciated
Thanks