Very quick reply; I'll have to think more...
1) Probably relatively little of the *existing* AS server side code. The AS code is based
around the DistributedReplicantManager interface, the implementation of which uses
HAPartition, which is built on an RpcDispatcher. In AS 5 it may use JBoss Cache. Neither
matches what you're doing very well. The interface and some concepts probably should
be reused, but we'd need a new implementation.
The stuff that should be reused is the interceptor model. The AS currently has two
interceptor models; the old pre-aop model used by most clustered services and the
Remoting- and aop-based EJB3 model. Tom Elrod is working to come up with a unification of
the two, based on the EJB3 one. Clearly it's best if Messaging can use the same stuff.
I'll look at the EJB3 stuff this weekend and reply with thoughts and how to move
forward.
2) The JGroups view can't be used directly, as a JGroups Address is not suitable for
use as a Remoting InvokerLocator. At minimum a different port. Quite possibly a different
IP address (e.g. client connections use a different NIC than clustering traffic.) I think
the thing to do is something like adding another Request type where a server publishes its
InvokerLocator(s); the rest of the cluster maintains a map of that data. That's
basically the DistributedReplicantManager concept.
3) That's tricky. The AS' model for telling the client about the cluster topology
is to piggy-back any new topology on the response to a client request. So, client
doesn't know new topology until it successfully makes a request, possibly after a
failover. So, we can't count on the client and server making the same decision (e.g.
failover to next node in list) because the "list" may be different on client and
server.
Perhaps an approach where the client fails over to anyone, but if the server isn't the
appropriate one it communicates that back to the client, along with the updated topology
and info as to who the failover server should be.
Stupid question: why does the client need to fail over to a particular server? The
failover server needs to do work to recover persistent messages from the store, but once
it's done that, aren't they available to a client connecting to any server?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976667#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...