[Design of POJO Server] - Client-side clustering classes in the aspects module
by bstansberry@jboss.com
There are 3 classes in the aspects module org.jboss.aspects.remoting package that I'm thinking of moving over to the ha-client project for inclusion in the jboss-ha-client.jar. ClusterConstants, ClusterChooserInterceptor, FamilyWrapper. These are client-side clustering classes, and encapsulating client-side clustering classes is the purpose of jboss-ha-client.jar.
Only downside I see is they add a dependency on Remoting to ha-client. Not IMHO a big problem if remoting is what we are using long term for client-server communications.
An alternative is to create some sort of general "remoting-aspects" project for org.jboss.aspects.remoting classes. But then it would need to depend on jboss-ha-client.jar. I'd prefer to see these client-side clustering classes in ha-client.
Thoughts? I'm asking now because I want to move jboss-ha-client.jar off a snapshot, so would prefer to deal with this before cutting a beta.
Tangential topic: if we don't go the "remoting-aspects" route, there are a few classes in org.jboss.aspects.remoting that would go in the ha-server project when I get to that; for inclusion in a jboss-ha-server-api.jar.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108693#4108693
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108693
16 years, 5 months
[Design of JBoss Remoting, Unified Invokers] - Service discovery; clustering; load-balancing; etc.
by david.lloyd@jboss.com
I've come up with a basic client API for service discovery and utilization. Basically the idea is you create a ServiceLocator (which identifies what service you want to talk to), and you apply that to a Session (if you want to talk to a specific Endpoint) or to your local Endpoint (if you want your local Endpoint to decide what other Endpoint(s) you want to talk to).
Either way you get back a ContextSource instance, which can be used to mass-produce Contexts that communicate with that service. Since the acquisition of Contexts is abstracted behind this simple interface, an implementation may choose to rotate between multiple remote Endpoints when acquiring Context instances, or apply a load-balancing policy, etc.
In order to facilitate the various use cases for this, the ServiceLocator class has a series of properties that can be set to allow a ServiceLocator to match one or more candidates for a load-balancing arrangement.
The properties are as follows:
* serviceType - the actual kind of service you're looking for. All service instances with a given serviceType would have consistent request and reply object types, so that a piece of code that talks to that service type can be reused to talk to any other implementation of that same type.
* serviceGroupName - the name of the group providing this service. A service might be available as two distinct groups - for example, a production group and a testing group. A "*" would mean match any service group.
* serviceGroupMemberName - the name of the individual member within a group. A service might be deployed in more than once place for a group; this would allow you to select a specific node or member of the group. A "*" (which would be the default value) would mean match any service group member.
This arrangement allows us to do a few things:
* Deploy multiple instances of a service of the same type into a single Endpoint - an example application would be a system with multiple test environments.
* Correlate services running on multiple Endpoints - for example, a cluster or load-balancing situation where there are two nodes that access a common database.
Please give me your thoughts and comments.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108656#4108656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108656
16 years, 5 months