-
1. Re: Refactoring of HAPartition-related services
jerrygauth May 10, 2006 3:16 PM (in response to brian.stansberry)In 5.0, HA-JNDI and DS have already been modified to use a shared instance of JBC as their data store. We should be able to modify these services to inject the cache instance instead of the current mechanisms.
I don't think that DRM has been examined but presumbaly it can also be modified to use a shared instance of JBC as its data store.
These services will also be evaluated to see if they can use a multiplexed JGroups stack with other services such as ClusterPartition. Since the channel is actually consumed by JBC, this may be dependent on JBC support for multiplexed channels. -
2. Re: Refactoring of HAPartition-related services
ben.wang May 11, 2006 2:01 AM (in response to brian.stansberry)I'd go for #2 as well. Abstractly, now that jgroups channel will be a service, I see the function of HAPartition in providing only maybe the RPC functionality. What else does it need?
-
3. Re: Refactoring of HAPartition-related services
jerrygauth May 17, 2006 4:45 PM (in response to brian.stansberry)1) HAPartition provides state transfer support in addition to providing RPC capabilities. So client services can get a reference to HAPartition through the ClusterPartition mbean and then subscribe to state transfer notifications. HAPartition also makes cluster memberhip changes available to clients.
Clients should be able to obtain these services directly from JGroups. Is the intent here to remove the cluster layer on top of JGroups and expose it directly?
2) DRM can presumably be modified to use JBC as its internal store but it seems to be a different fit. If I understand DRM correctly, for a given key, it stores node-specific objects, unlike clustered JBC where the value of a key is replicated across the cluster. Of ocurse, you could replicate node/key/value across the cluster so that each JBC node had a complete set of DRM values for all nodes/keys. -
4. Re: Refactoring of HAPartition-related services
ben.wang May 17, 2006 9:29 PM (in response to brian.stansberry)Re: #1, I think HAPartition providing view change is still useful. Jgroups only emit the events but someone need to aggregate it.
As for state transfer, do we know who is using this capability now? I'd assume outside user can pretty much find this in JBC already, IMO. -
5. Re: Refactoring of HAPartition-related services
belaban May 18, 2006 3:47 AM (in response to brian.stansberry)#1 I assume instead of JGroups you meant Multiplexer right ? No service should use JGroups directly, but if you want cluster method calls, use the Multiplexer.
Currently, most services that need cluster method calls use ClusterPartition, which (internally) uses the Multiplexer. That's fine, we can gradually move those services to use the Multiplexer directly, if we want to do this at all (Brian?) ! -
6. Re: Refactoring of HAPartition-related services
jerrygauth May 18, 2006 7:53 AM (in response to brian.stansberry)Bela - yes, I didn't mean direct instantiation of JGroups. I meant that third party services could configure DI of the multiplexer; this seems to be the easiest way to access multiplexed JGroups services.
-
7. Re: Refactoring of HAPartition-related services
jerrygauth May 18, 2006 9:36 AM (in response to brian.stansberry)Ben - ClusterPartition state transfer is currently used by DRM and HASessionStateTransfer.
-
8. Re: Refactoring of HAPartition-related services
brian.stansberry May 18, 2006 2:06 PM (in response to brian.stansberry)Re: having services work through ClusterPartition/HAPartition vs. using the multiplexer directly, I think having an abstraction on top of JGroups is useful. We're talking about having one in JBossCache as well. If people want to write services that depend on JGroups directly, they can always do that.
Right now HAPartition is really a hodge-podge. It directly provides 3 services -- RPC calls to the group, group membership, and initial state transfer. It also provides access to DRM and DS.
IMO, the first two logically go together in a service interface meant for group RPC. State transfer is a separate issue and doesn't belong in the group RPC interface. Maybe in a subinterface, but not in the base.
It would be good to remove finding the DRM and DS from the HAPartition interface. If these can be independently deployed, services that need them can have them dependency injected.
That leaves state transfer. DRM and HASessionState currently use this, but for 5.0 we are going to convert those to JBC, so they won't any more. Jerry has pointed out the service lifecycle issue where the HAPartition state transfer only works properly for mbeans deployed as part of cluster-service.xml. We could leave the state transfer methods in HAPartition as a convenience, although I'm mildly inclined to remove them.
I can see 3 broad alternatives:
1) Define a new group RPC interface. HAPartition extends this, adding in state transfer and access to DRM and DS. This provides full compatibility with the existing HAPartition. Our own code just writes to the group RPC interface, the other stuff is there for legacy user code.
2) Define a new group RPC interface. Scrap HAPartition.
3) Remove state transfer and DRM/DS access from HAPartition; it becomes the group RPC interface. I think this is bad; it's a major change w/o changing the name. Also, HAPartition is any overly broad name for a group RPC interface. -
9. Re: Refactoring of HAPartition-related services
ben.wang May 19, 2006 12:03 AM (in response to brian.stansberry)HASessionState is for the ejb2.1 sfsb, correct? So we will need to keep this in AS5.0, unfortunately.
So maybe your proposal #1 would make sense if it is not too much of hassle. -
10. Re: Refactoring of HAPartition-related services
brian.stansberry May 19, 2006 12:12 PM (in response to brian.stansberry)If possible, HASessionState is going to be moved to use JBC, so it won't need state transfer via HAPartition.
Option #1 is definitely not a hassle; may actually be less work.