Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The membership manager can forcefully shut down a Geode cache if it detects it is no longer a member of the distributed system.

Interfaces

There are a number of existing interfaces in Geode that must be implemented by the membership manager:

...

void beSick(), playDead(), beHealthy() - used for membership testing

void emergencyClose() - shut down threads & other resources like sockets

 

 

ServiceFactory - used by the membership manager to instantiate its services

...

String rejectionMessage authenticate(NetMember InternalDistributedMember m)

Object getCredentials()

...

HealthMonitor - monitors members and instigates removal of those deemed dead

void contactedBy(NetMember InternalDistributedMember m) - tells the monitor that we've had contact with another member

void suspect(NetMember InternalDistributedMember m) - tells the monitor that the member is suspected of being ill or dead

void checkSuspect(NetMember InternalDistributedMember m) - requests a health check on another member.  This should initiate removal of the member if it does not pass the test

...

void leave() - leaves the distributed system.  Should be invoked before stop()

void remove(NetMember InternalDistributedMember m) - force another member out of the system

InternalDistributedMember getMemberID()

 NetView getView()

 

Locator - used by TcpServer to handle peer-location requests.  Implements TcpHandler

...

void forceDisconnect(String reason)

boolean isShunned(DistributedMember mbr)

DistributedMember getLeadMember()

DistributedMember getCoordinator()

 

 

 

MessageHandler - receives messages from a Messenger

...

void send(DistributionMessage m) - sends an asynchronous message

NetMember InternalDistributedMember getMemberID() - returns the endpoint ID for this member

...

Properties getProperties()

 

Implementation Notes

In order to preserve as much of the current membership behavior as possible, fostering adoption of Geode by the GemFire user base the existing JGroupMembershipManager will be copied and most of its code will be preserved.  It will continue to hold the DirectChannel but will now also hold a ServiceConfig that it will use in place of the JGroups channel.

...

All of the JGroups statistics in DistributionStats need to be removed or replaced with corresponding stats based on the new implementation.

Testing

Since this is implementing an existing interface in Geode there are already a lot of tests that exercise it.  These tests will need some attention if they are referring to any JGroups code.  The use of interfaces in this version of the MembershipManager should allow us to create real unit tests, as opposed to integration tests, for each component to achieve a higher level of code coverage.

...