On Apr 22, 2011, at 10:34 AM, Tom Mueller wrote:
> As part of the work for the ad hoc clustering feature, I'm planning to look through the code at the various calls to isDas and try to determine what question is really being asked.
I'm sure you'll see these easily enough, but there are some cases that don't fit the original question. For instance, the GMS health history object is created with a Cluster. It iterates through the Server objects in cluster.getInstances(), and stores the ones that are not a DAS using server.isDas() to differentiate. So in that case, it's not "am I a DAS?" but "is the server I'm inspecting a GMS core member or spectator?" (DAS is a spectator.) There may be other cases where the code isn't figuring out its own identity, but someone else's instead, and these may need to be changed to ask the "real" question rather than if the object is a DAS or not.
If it saves some time, the other main GMS distinction is that the DAS can belong to several clusters, but an instance can't. So at startup, the DAS needs to create/find the GMS service for each cluster in the clusters list, but instances only create/find the service for the one cluster that they belong to.
Cheers,
Bobby