xoom-directory.propertiesfile, which looks like this.
DirectoryClientcomponent, which is an
Stagein which the
DirectoryClientactor should live.
ServiceDiscoveryInterest, which is a subscriber to service discovery information notifications provided by the directory.
io.vlingo.xoom.wire.multicast.Groupto join in order to receive broadcast notifications.
32767, provide this value.
DirectoryClientis started, you may send it messages to request registration of your service/application. This is accomplished using the
"agilepm-context"with three nodes, each on different servers with different IP addresses. The nodes available with your service are configured as the nodes within a XOOM Cluster. When the
"agilepm-context"is shutting down it can unregister itself from the directory services. Unregistering will inform other services that the named service is not currently available.
ServiceDiscoveryInterestduring the registration of the
ServiceDiscoveryInterestinstance is responsible for informing its interests in any particular service, and in reacting to the notification of newly discovered services and recently unregistered services.
agilepm-service—will gain access to the services that it depends on—
"identity-access-service". This knowledge includes the IP addresses of the dependent services, which is one means to reach those services, such as with REST requests. How can this information be spread to all nodes in the service/application cluster? You can have a
ServiceDirectoryInterestsubscriber listening in every node. Or, you may decide to put the relevant
ServiceRegistrationInfointo one or more cluster-wide attributes.
io.vlingo.xoom.directory.model.DirectoryServiceActor. The directory information is both maintained here and broadcast from this point. For this discussion see the following packages:
MulticastPublisherReader, which is alluded to in this discussion and used by the
assignLeadership(), which is how a given XOOM Directory cluster node knows that it is in the lead and is the active UDP multicaster/publisher. Any other cluster nodes are standby in case the leader node is lost for any reason.
DirectoryClient, which is any service that wants to register and/or discover via the XOOM Directory, sends and receives availability information in the form of
ServiceRegistrationInfoby supporting the
io.vlingo.xoom.directory.model.DirectoryApplication, which is a
ClusterApplicationAdapter, informs its own
DirectoryServiceActorto go into either active or passive mode. Active mode is described above. Passive mode is any cluster node member that is not the leader. These (most typically 2 of 3 nodes in the cluster) simply collect publishable data that the leader receives. The leader tells them this via the cluster
AttributesProtocol attributesClient. This means that the leader uses the cluster-wide attribute publishing facility to share registration information with all passive nodes. If the leader is lost, then a passive node will be elected as the leader, and already has most or all of the current registration information. Any lag in current registration information will soon be cleared up when directory clients begin live (pulse-based) updating to the new directory leader.