...
Excerpt |
---|
Talon provides built-in discovery providers that are used to simplify configuration and make the overall system less tightly coupled. This page describes where discovery is used in the platform and how it can be configured. |
- Application cluster establishment (store discovery). To achieve High Availability you will typically launch 2 or more instances of your application which discovery discover one another to form an HA Cluster based on the application name.
- XVM discovery
- Allows management clients such as Robin and Lumino to discover running XVMs and their applications.
- Allows application's applications using the direct message bus binding implementation to find peer applications and connect to them.
...
Field | Description |
---|---|
Entity Owner | The unique id of the discovery cache that advertised the entity |
Entity Type | The type of entity. Talon uses:
|
Entity Name | The unique name of the entity being advertised. |
Entity Instance | The unique instance identifier for the entity. For example, an ODS Store Member would have the same name in each XVM for the same application , but would have a uniquely identifiable instance id. |
Entity Host | The host from which the entity was advertised. |
Entity Address Descriptors | Each entity added to the cache includes a list of adress address descriptors that contain connection information that can be used by |
Entity Age | Get an entity's current age. See |
Entity Max Age | Each entity instance is associated with a maximum age and, at any point in time, a current age. A cache member 'expires' (removes from its local cache) a discovered entity when its current age reaches its maximum age. To prevent entity expiry, member owners periodically broadcast ESA (Entity State Advertisement) packets. The receipt of a an ESA by non-owner causes the entity's age to be reset. An entity's maximum age is also used (in conjunction with other configurable parameters) by owner members to determine when to send ESAs. |
...
A discover cache is specified as a descriptor string of the form <provider>://<address>[&prop1=value]...[propN=valueN]. All discovery cache implementation implementations support the following basic properties described below.
Property | Default | Description |
---|---|---|
initWaitTime | 5 | Time (in seconds) to wait after sending the solicit packets for entities to join Upon construction, cache members solicit entity advertisements from remote members to populate its local cache. The initial wait time is the time that the cache constructor will sleep waiting for remote entities to be populated in the local cache. The default value for this parameter is 5 seconds. It can be changed via the initWaitTime property in the cache descriptor e.g. mcast:224.0.1.200:4090&initWaitTime=10 would increase the initial wait time to 10 seconds. |
maxEntityAge | 30 | Time (in seconds) that can elapse without receiving an ESA before an entity is deemed dead. The maximum age associated with each entity created by the local cache member. See The default value for this parameter is 30 seconds. It can be changed via the maxEntityAge property in the cache descriptor. For example, mcast:224.0.1.200:4090&maxEntityAge=20 would decrease the an entity's maximum age to 20. This parameter works hand in hand with the maxEsaLoss parameter. The cache uses both these parameters to determine how often to transmit ESAs. |
maxEsaLoss | 6 | Number of ESAs, if lost, that would cause an entity to be expired i.e. num ESA to advertise within the maxEntityAge interval A cache member manages the lifecyle lifecycle of discovered entities via its maximum age. The member uses a timer to periodically increment the entity's age. When the age reaches the maximum age, it is considered expired and removed from the cache. Entity owners preempt expiry of an entity by continually broadcasting ESAs for the entity. The ESAs cause the entity's age to be reset in the remote caches. An entity owner determines how often to broadcast ESAs using the maxEntityAge and maxESALoss parameters i.e. ESAs are broadcast every maxEntityAge / maxESALoss seconds. The default value for this parameter is 6. It can be changed via the maxEsaLoss property in the cache descriptor. For example, mcast:224.0.1.200:4090&maxEsaLoss=10 would increase the ESA loss tolerance to 10. |
memberName | Each discovery cache member is uniquely identified by a name. The member name is used to identify entity ownership. By default, each member is uniquely identified by a UUID. However, the user can override the use of UUIDs for identification through the use of the memberName property in the cache descriptor. For example, mcast:224.0.1.200:4090&memberName=m1 would identify the cache member opening a cache using the above descriptor as 'm1'. |
...
Talon broadcasts Applications, XVMs and ODS Stores via discovery. Unless configured otherwise, these will be done using the default (global) discovery cache singleton in the JVM. The default discovery descriptor use ip uses IP multicast and defaults to "mcast://224.0.1.200:4090" This can be changed by configuring the environment property nv.discovery.descriptor:
...
This section lists the discovery providers that are available out of the box with talonTalon.
Multicast
Anchor | ||||
---|---|---|---|---|
|
...
Note | ||
---|---|---|
| ||
The Yosemite OS X version and beyond create a virtual interface (awdl0) for Airplay that states it has multicast enabled but multicast does not work if that interface is discovered by the multicast provider which chooses the first multicast-enabled interface it finds when the localIfAddr parameter is not specified. There is a tool called WiFried that allows one to selectively disable this interface temporarily. Once disabled the multicast discovery provider in X won't select that interface for multicast. WiFriedX can be downloaded from: https://en.freedownloadmanager.org/Mac-OS/WiFriedX-FREE.html |
...
Example SMA discovery descriptors
Provider | ||||||||
---|---|---|---|---|---|---|---|---|
solaceSolace | When using the solace provider, consider using the single_session=true property to reduce the number of thread created by the solace binding. The solace bindings created by the SMA discovery provider are marked as administrative and as such platform auto tuning autotuning will not result in busy spinning threads.
| |||||||
loopbackLoopback | The loopback provider uses the loopback bus and can be used for disovery discovery within the same process, it can be useful in testing scenarios to simulate a message based discovery provider, but it is often more efficient to use the local discovery provider described below.
| |||||||
jmsJMS | Configuring a generic JMS discovery provider would use jndi:
| |||||||
activemqActiveMQ |
|
...
The local discovery provider is a simple provider that can be used to find other entities in the same process. It is similar to the SMA loopback provider, but has lower overhead. The local discovery provider can be particularly useful when writing unit tests that are launching all applications in the same jvmJVM.
Code Block | ||||
---|---|---|---|---|
| ||||
<env> <nv> <discovery> <descriptor>local://.</descriptor> </discovery> </nv> </env> |