Re: [jgroups-dev] client / server jgroups functionality

Bela Ban <[email protected]> Sat, 29 Sep 2012 15:41:35 +0200
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>

On 9/29/12 1:26 PM, muxer wrote:
>
>
> Bela Ban wrote:
>>
>> But maybe you have different requirements ? If so, could you let me know
>> what they are ?
>>
>
> I think that service discovery by clients


What are clients ? Processes outside of a cluster (not members) ?


>  in a cluster is something that
> JGroups would be very good at, especially if there would be a way to prevent
> clients to discover each other - in a more native way than I'm implementing
> at the moment: which is that a client will ask every member in it's view if
> it's a server or not.


So in this definition, a client is a member, ok...


> Some additional, more or less generic requirements I'm working on:
> - generation of dynamic proxy that implements a service interface
> - discovery of remote services implementing this service interface within an
> application domain


So far this is Jini


> - selecting a service using a pluggable algorithm (random, or selecting on lowest system load)


OK


> - fail-over mechanism


Clients failing over to a different member I assume ?


You're assuming that clients are members, but  I'm not really fond of 
this idea, as I think clients should be very light-weight, start quickly 
etc. To create a channel and join a cluster is a somewhat heavy operation.

If you want to implement some Jini style services, I'd see the services 
as cluster members, but not the clients. Clients could, however, keep a 
notion of membership, which is a list of currently active members and is 
updated on a client-server interaction (if changed). Thus, a client 
could simply pick a different member when the previous member crashed or 
left. I've actually implemented this bit in my Java client for the STOMP 
protocol.

Of course, the downside is that for initial client startup, the address 
of one member has to be known. But this could be done by using the 
regular discovery, e.g. file system / GossipRouter etc.

My 3 cents,

-- 
Bela Ban, JGroups lead (http://www.jgroups.org)

------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Javagroups-development mailing list