users@shoal.java.net

Re: [Shoal-Users] Can Shoal be used to create a Leader-Follower cluster?

From: Joseph Fialli <joe.fialli_at_oracle.com>
Date: Mon, 03 May 2010 14:19:43 -0400

On 5/3/10 2:05 PM, Ramakrishnan, Lakshmanan [Tech] wrote:
> Hi,
> I am new to Shoal. So pardon my ignorance.
> We are trying to create a cluster for our application and came across
> Shoal. Here is a simplified requirement. We have many instances of the
> application running one of them will be a leader. When this instance
> fails, another instance will become the leader.
See GroupLeadershipNotificationSignal javadoc
<https://shoal.dev.java.net/nonav/docs/api/com/sun/enterprise/ee/cms/core/GroupLeadershipNotificationSignal.html>
for documentation on GMS notification that occurs when a group
leadership change occurs.
Within Shoal gms workspace, check out
tests/com/sun/enterprise/shoal/groupleadertest/GroupLeadershipNotificationTest.java
for an example
on how one can register a callback for GroupLeadershipNotification from
GMS system.

> Can this be implemented in Shoal? I see that there are 2 types of
> membership in Shoal ie spectator and core. Is there a way
> programmatically change the membership from spectator to core (and
> vice versa)?
One specifies whether a member is CORE or SPECTATOR at configuration time.
It is a property passed into GMSFactory.startGMSModule(...).
<https://shoal.dev.java.net/nonav/docs/api/com/sun/enterprise/ee/cms/core/GMSFactory.html#startGMSModule%28java.lang.String,%20java.lang.String,%20com.sun.enterprise.ee.cms.core.GroupManagementService.MemberType,%20java.util.Properties%29>

-Joe Fialli
> Thanks
> Lakshmanan