Re: [jgroups-users] Ability to set the coordinator programaticaly and the ability to maintain a shared state

Questions/problems related to using JGroups <[email protected]> Sat, 5 May 2018 10:10:56 +0530
Newsgroups gmane.comp.java.javagroups.general
Message-ID <mailman.4192.1525495305.27734.javagroups-users@lists.sourceforge.net>
Hi all,

Thank a lot for the answer. The reference http://www.jgroups.org/manual4
/index.html#MembershipChangePolicy seems to be promising. It has most of
the requirements I wanted to implement. In fact, my solution requires some
of the nodes are prevented from becoming the coordinator. In other words,
out of all the nodes, there are set of nodes which are designated clients
(they shouldn't become the master at any point because they don't have the
data layer). Rest of them can become masters and there is a priority order
for leadership. So as I understood the MembershipChangePolicy allows me to
specify the priority of designated masters. But I am still wondering
whether I can prevent some of the nodes becoming the coordinator while they
get all the view changes and messages. Any help on this would be highly
appreciated.


Thanks & Regards!
Tharindu


Tharindu Munasinghe.
Undergraduate, Department of Computer Science and Engineering
University of Moratuwa.
Contact no. +94770460887



On Thu, May 3, 2018 at 12:56 PM, Questions/problems related to using
JGroups <[email protected]> wrote:

>
>
> On 29/04/18 10:45, Questions/problems related to using JGroups wrote:
>
>> Hi all,
>>
>> I am new to jGroups but I found this is an elegant library for cluster
>> management. I have 2 main requirements for one of my projects.
>>
>> First, is it possible to programmatically change the coordinator of
>> the jGroups cluster?. I am using the jgroups coordinator as the application
>> level master (for some domain-specific application) of the server's
>> cluster. But for a given server to become the application level master
>> there are some application level criteria to be fulfilled. So in case of
>> the jGroups coordinator cannot fulfill those requirements I want to change
>> the coordinator of the jGroups programmatically. I found [1] for this
>> purpose, but I wanted to understand whether this is a reliable method or is
>> there any side effects of doing this. If there is a recommanded approach,
>> please share that with me.
>>
>
> [1] certainly works, but is a kludge. I recommend implementing a
> membership plugin [2], which determines the order of members in a view. You
> can thus control who the coordinator is/becomes. [1] can be used to change
> the coordinator when no view is getting installed, e.g. triggered by the
> application.
>
>
> The second question is about the ability to maintain a shared state. Is it
>> possible to maintain a state which is visible across the cluster?. So the
>> changes are synchronized among the available members and visible to all
>> members without explicit message passing about the changes.
>>
>
> Yes, use state transfer, check the manual for details. Note that the state
> is the same across *all* cluster members, which may lead to heap exhaustion
> if you have a large state and/or many members.
>
>
> [2] http://www.jgroups.org/manual4/index.html#MembershipChangePolicy
>
>
>> [1] https://github.com/belaban/JGroups/wiki/Changing-the-coordin
>> ator-of-a-cluster
>>
>> Thanks & Regards!
>> Tharindu,
>>
>> Tharindu Munasinghe.
>> Undergraduate, Department of Computer Science and Engineering
>> University of Moratuwa.
>> Contact no. +94770460887
>>
>>
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>
>>
>>
>> _______________________________________________
>> javagroups-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/javagroups-users
>>
>>
> --
> Bela Ban | http://www.jgroups.org
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> javagroups-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/javagroups-users
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
javagroups-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/javagroups-users