This topic describes the dispatcher application and how to utilize it.
The dispatcher is a standalone application that acts as an intermediary between large Location Awareness Services for WebSphere® Premises Server event providers, such as hubs that process more than 300 messages per second, and one or more devices. The dispatcher retrieves all location messages from the event providers it is connected to and distributes them to one or more Location Awareness Services for WebSphere Premises Server devices. Using the dispatcher enables Location Awareness Services for WebSphere Premises Server to increase the number of location messages it processes.
The dispatcher is shipped with Location Awareness Services for WebSphere Premises Server and is located in the LAS_HOME\samples\AtlasStandaloneDispatcher directory.
The dispatcher connects to the event providers as a socket server using the IP address and port that are specified in the dispatcher.bat file. When the dispatcher establishes a connection, it receives all location messages sent by the provider and distributes them to the connected devices. Each device receives a subset of the location messages from the event provider.
If the dispatcher cannot connect, it tries again every 30 seconds. If an existing connection to an event provider drops, the dispatcher tries to reconnect in time intervals increasing from one to 30 seconds.
The dispatcher communicates with a device as if it were an event provider. The dispatcher waits for a device, which is a client application to the dispatcher, to connect. You specify the number of clients and associated ports that can connect to the dispatcher in the dispatcher.bat file. Each client must use an individual port.
When the dispatcher connects to a device, it forwards all location messages assigned to that device. All messages have the same format and content as when they are received from the event providers.
If there are no active Location Awareness Services for WebSphere Premises Server devices, the dispatcher discards the location messages from the provider. The dispatcher considers only active devices, and forwards all messages arriving from the location event providers to them. If a device cannot keep up with the number of messages provided, the dispatcher queues the outstanding messages.