The OpenJAUS SDK implements the Discovery service server and a Discovery service client such that they are available out of the box. While configurable, since the Discovery client behavior is not defined by the JAUS standard (see Understanding the Discovery Service), the client implementation provided with the SDK may not cover your needs. In that case, you will either need to implement your own version of the Discovery client or you can contact us to discuss possible options for adding support.


Any Component that inherits from one of the Base Component classes (HowTo: Create a Component) will include code to support the Discovery server and Discovery client which can be configured using the OpenJAUS Configuration (ojconf) file. We recommended using the OpenJAUS Configuration Editor to configure this file.



Discovery Server


The Discovery server on each Component can be enabled/disabled under the Discovery Server section of the Component’s tab in the Configuration Editor (figure 1).


Note: The built-in Discovery server does not currently monitor that the registered Components are online and as such the Discovery server may report stale information. If you need to guarantee that the Discovery server only lists Components that are online, you may need to override the default implementation.


 

Figure 1. Enable/disable the Discovery server in the OpenJAUS Configuration Editor.



Discovery Client


The built in Discovery client is configurable on a per Application basis (i.e. the Discovery client on all Components will function the same). Most of the settings can be found under the Discovery Client section of the Services: Global tab in the Configuration Editor (figure 2), however there are some additional settings which are not yet available in the Configuration Editor. Below we will explain the behavior for the built-in Discovery client as we go through the possible settings.




Figure 2. Configure the Discovery client in the OpenJAUS Configuration Editor.



Query Identification Behavior


When the Component starts, the built-in Discovery client will broadcast a QueryIdentification message in an attempt to find a Discovery server (as described in Understanding the Discovery Service). This setting controls how long the QueryIdentification message will be broadcast.



Once At Startup:


The Discovery client will broadcast the QueryIdentification message once. The Discovery server must already be online otherwise it will not be found and this Component will not be registered/discoverable.



Until Discovery Found:


The Discovery client will broadcast the QueryIdentification message until it receives a ReportIdentification response from a Discovery server.


Note: If a Discovery server is also enabled on the same Component, in-Component Discovery server will respond with a ReportIdentification message which will cause the broadcast to stop. If the desired behavior is to have the Discovery client register with a different Discovery server, you will need to disable the in-Component Discovery server, broadcast the QueryIdentification message continuously, or implement a custom Discovery client.



Continuous


The Discovery client will continuously broadcast the QueryIdentification message.

Note: Every time a ReportIdentification message is received, the built-in Discovery client will perform the registration process. As such, this setting will increase the likelihood that the Component is registered with a (all) Discovery servers at the expense of network bandwidth.



Disabled (Not Available in Config Editor):


The Discovery client will not automatically broadcast a QueryIdentification message when the Component starts.


Note: This just prevents the Discovery client from initiating the Discovery process but does not disable it. If a ReportIdentification message is ever received, the built-in Discovery client code will attempt to register itself with the Discovery server on that Component. The only way to guarantee that the Discovery client is disabled is to override the built-in behavior with custom code.



Query Identification Interval


If Query Identification Behavior is set to “Until Discovery Found” or “Continuous” this setting controls the period at which the QueryIdentification message is sent.



Discovery Level


Controls the JAUS broadcast address to which the QueryIdentifcation message is sent. This controls the maximum level in the JAUS hierarchy at which a Discovery server can be found. Setting to “System” will broadcast the message to JAUS address 65535.255.255 which means that any/all Discovery servers in the entire JAUS System can be found with which to register. Setting to “Subsystem” will broadcast the message to JAUS address {MySubsystemID}.255.255 which means only Discovery servers that are part of the same Subsystem as the Component can be found with which to register.



Verify Services Interval


If enabled, the Discovery client will verify that it’s hosting Component has been correctly registered with the Discovery server by querying the Discovery server and checking if it is listed. If the hosting Component is not listed, the Discovery client will retry the registration process again. The specified interval controls how often the Discovery client will attempt the verification process.

 


Verify Discovery Server Liveness Interval (Not Available in Config Editor)

If enabled, after registering with a Discovery server, the built-in Discovery client will periodically send a QueryIdentification message to the Discovery server to ensure that it is still available. If a response is not received within the specified interval, the Discovery client will restart the Discovery process (i.e. broadcast a QueryIdentification message).


Note: Only the registration with a single Discovery server is tracked, so if there are multiple Discovery servers in the system, it may be hard to figure out which Discovery server is being monitored.

 


Register Services Broadcast


If enabled, the Discovery client will periodically broadcast the RegisterServices message to the Subsystem (JAUS address = {MySubsystemID}.255.255) and the specified interval. Since this is a broadcast message, the sequences described previously do not need to occur (such as finding the Discovery server using the QueryIdentification message) and the Component will be registered with all Discovery servers that can be reached via the JAUS broadcast.